int ft_printf_hex(unsigned int n) { if (n >= 16) return (ft_printf_hex(n / 16) + ft_printf_hex(n % 16)); else return (ft_printf_char(HEX[n])); }
void ft_conv_hex(unsigned long long d, t_struct *details) { int pad; if (details->precision != -1) details->zero = 0; if (details->conv == 'O') details->conv = 'o'; if (details->conv == 'o') details->base = 8; pad = ft_count_hex(d, details, 1); if (details->precision != -1) pad = ft_count_digit(pad, details, 1); if (details->conv == 'p') { details->point = 1; details->conv = 'x'; details->diese = 1; details->digit = details->digit + 2; } ft_printf_hex(d, details, 1, pad); if (details->minus) ft_printf_pad(details, pad); }