diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-29 19:22:13 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-29 19:22:13 +0200 |
commit | ba180eb2011a5c50e65aca3b81386fd3108fc20d (patch) | |
tree | 2f631d06deadfb2ffa3d0404ef36e36e1b76d018 /libft/src/ft_printf_put_int.c | |
parent | libft norm in progress (diff) | |
download | 42-minishell-ba180eb2011a5c50e65aca3b81386fd3108fc20d.tar.gz 42-minishell-ba180eb2011a5c50e65aca3b81386fd3108fc20d.tar.bz2 42-minishell-ba180eb2011a5c50e65aca3b81386fd3108fc20d.tar.xz 42-minishell-ba180eb2011a5c50e65aca3b81386fd3108fc20d.tar.zst 42-minishell-ba180eb2011a5c50e65aca3b81386fd3108fc20d.zip |
Again
Diffstat (limited to 'libft/src/ft_printf_put_int.c')
-rw-r--r-- | libft/src/ft_printf_put_int.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/libft/src/ft_printf_put_int.c b/libft/src/ft_printf_put_int.c index 09b8bf6..774fe71 100644 --- a/libft/src/ft_printf_put_int.c +++ b/libft/src/ft_printf_put_int.c @@ -16,8 +16,7 @@ #include <stdarg.h> #include <inttypes.h> -static long - ft_printf_get_dlh(va_list arg, int8_t lh) +static long ft_printf_get_dlh(va_list arg, int8_t lh) { if (lh == 0) return (va_arg(arg, int)); @@ -32,8 +31,7 @@ static long return (va_arg(arg, int)); } -static unsigned long - ft_printf_get_ulh(va_list arg, int8_t lh, uint8_t zflag) +static unsigned long ft_printf_get_ulh(va_list arg, int8_t lh, uint8_t zflag) { if (zflag == 1) return (va_arg(arg, size_t)); @@ -50,8 +48,7 @@ static unsigned long return (va_arg(arg, unsigned int)); } -static long - ft_printf_put_plus_minus(long d, t_printflist *pflist) +static long ft_printf_put_plus_minus(long d, t_printflist *pflist) { if (pflist->precision >= pflist->putlen && pflist->isneg == 1) { @@ -64,11 +61,10 @@ static long return (d); } -void - ft_printf_put_d(va_list arg, t_printflist *pflist) +void ft_printf_put_d(va_list arg, t_printflist *pflist) { - long d; char *str; + long d; d = ft_printf_get_dlh(arg, pflist->lh); (d < 0) ? (pflist->isneg = 1) @@ -91,11 +87,10 @@ void ft_printf_put_width_post(pflist); } -void - ft_printf_put_u(va_list arg, t_printflist *pflist) +void ft_printf_put_u(va_list arg, t_printflist *pflist) { - unsigned long d; char *str; + unsigned long d; d = ft_printf_get_ulh(arg, pflist->lh, pflist->zflag); pflist->conv = 'd'; |