示例#1
0
文件: shelluse.c 项目: jaybi42/21sh
void	set_retcode(unsigned char ret_code)
{
	char	*s;

	handle_var(KV_SET, "?", (s = ft_litoa(ret_code)));
	ft_strdel(&s);
}
示例#2
0
文件: l.c 项目: gygy19/new_libft
char		*flag_l(t_string *string, short base)
{
	long long int		tmp;

	tmp = get_long_int(string);
	if (tmp < -9223372036854775807)
		return (min_long(string, base));
	if (tmp < 0)
	{
		tmp = -tmp;
		string->is_negative = 1;
	}
	if (base == 8)
		return (ft_itoabase(tmp, "01234567"));
	else if (base == 10)
		return (ft_litoa(tmp));
	else if (base == 16)
		return (ft_itoabase(tmp, "0123456789abcdef"));
	else if (base == 32)
		return (ft_itoabase(tmp, "0123456789ABCDEF"));
	return (NULL);
}