libft/sources/pf_srcs/process_b.c
void	ft_process_b(t_format *f)
{
	long nb;

	nb = va_arg(f->list, long);
	if (f->len_mod == L || f->len_mod == nomod)
		f->out_str = ft_ultoa_base((unsigned int)nb, 2, 0);
	else if (f->len_mod == hh)
		f->out_str = ft_ultoa_base((unsigned char)nb, 2, 0);
	else if (f->len_mod == h)
		f->out_str = ft_ultoa_base((unsigned short)nb, 2, 0);
	else if (f->len_mod == l || f->len_mod == ll)
		f->out_str = ft_ultoa_base((unsigned long)nb, 2, 0);
	else
		ft_error(f);
	ft_print_b(f);
	f->i++;
}
/*
** b Conversion
** The unsigned int argument is converted to unsigned binary notation.
** The precision, if any, gives the minimum number of digits that must
** appear; if the converted value requires fewer digits, it is padded
** on the left with zeros. The default precision is 1.
** When 0 is printed with an explicit precision 0, the output is empty.
*/
b Conversion
The unsigned int argument is converted to unsigned binary notation.
The precision, if any, gives the minimum number of digits that must
appear; if the converted value requires fewer digits, it is padded
on the left with zeros. The default precision is 1.
When 0 is printed with an explicit precision 0, the output is empty.
b Conversion The unsigned int argument is converted to unsigned binary notation . The precision if any gives the minimum number of digits that must appear ; if the converted value requires fewer digits it is padded on the left with zeros . The default precision is 1 . When 0 is printed with an explicit precision 0 the output is empty .
void	ft_process_b(t_format *f)
{
	long nb;
	nb = va_arg(f->list, long);
	if (f->len_mod == L || f->len_mod == nomod)
		f->out_str = ft_ultoa_base((unsigned int)nb, 2, 0);
	else if (f->len_mod == hh)
		f->out_str = ft_ultoa_base((unsigned char)nb, 2, 0);
	else if (f->len_mod == h)
		f->out_str = ft_ultoa_base((unsigned short)nb, 2, 0);
	else if (f->len_mod == l || f->len_mod == ll)
		f->out_str = ft_ultoa_base((unsigned long)nb, 2, 0);
	else
		ft_error(f);
	ft_print_b(f);
	f->i++;
}
void ft_process_b ( t_format * f ) { long nb ; nb = va_arg ( f -> list , long ) ; if ( f -> len_mod == L || f -> len_mod == nomod ) f -> out_str = ft_ultoa_base ( ( unsigned int ) nb , 2 , 0 ) ; else if ( f -> len_mod == hh ) f -> out_str = ft_ultoa_base ( ( unsigned char ) nb , 2 , 0 ) ; else if ( f -> len_mod == h ) f -> out_str = ft_ultoa_base ( ( unsigned short ) nb , 2 , 0 ) ; else if ( f -> len_mod == l || f -> len_mod == ll ) f -> out_str = ft_ultoa_base ( ( unsigned long ) nb , 2 , 0 ) ; else ft_error ( f ) ; ft_print_b ( f ) ; f -> i ++ ; }
b Conversion
The unsigned int argument is converted to unsigned binary notation.
b Conversion The unsigned int argument is converted to unsigned binary notation .