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 | |
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')
-rw-r--r-- | libft/src/ft_printf_init_struct.c | 6 | ||||
-rw-r--r-- | libft/src/ft_printf_parts.c | 12 | ||||
-rw-r--r-- | libft/src/ft_printf_process.c | 3 | ||||
-rw-r--r-- | libft/src/ft_printf_put_char.c | 6 | ||||
-rw-r--r-- | libft/src/ft_printf_put_hex.c | 9 | ||||
-rw-r--r-- | libft/src/ft_printf_put_int.c | 19 |
6 files changed, 20 insertions, 35 deletions
diff --git a/libft/src/ft_printf_init_struct.c b/libft/src/ft_printf_init_struct.c index 8c65046..3bbd2fd 100644 --- a/libft/src/ft_printf_init_struct.c +++ b/libft/src/ft_printf_init_struct.c @@ -14,8 +14,7 @@ #include <stddef.h> #include <stdlib.h> -t_printflist - *ft_printf_init_struct(const char *format) +t_printflist *ft_printf_init_struct(const char *format) { t_printflist *pflist; @@ -31,8 +30,7 @@ t_printflist return (pflist); } -void - ft_printf_reinit_struct(t_printflist *pflist) +void ft_printf_reinit_struct(t_printflist *pflist) { pflist->conv = 0; pflist->actconv = 0; diff --git a/libft/src/ft_printf_parts.c b/libft/src/ft_printf_parts.c index f29d680..ce5057a 100644 --- a/libft/src/ft_printf_parts.c +++ b/libft/src/ft_printf_parts.c @@ -14,8 +14,7 @@ #include <stddef.h> #include <stdlib.h> -int - ft_printf_get_partlen(const char *format) +int ft_printf_get_partlen(const char *format) { int ret; @@ -26,11 +25,10 @@ int return (ret); } -int - ft_printf_putpart(const char *format, - int start, - int len, - t_printflist *pflist) +int ft_printf_putpart(const char *format, + int start, + int len, + t_printflist *pflist) { char *nstr; int ret; diff --git a/libft/src/ft_printf_process.c b/libft/src/ft_printf_process.c index 92f4601..d6ecd88 100644 --- a/libft/src/ft_printf_process.c +++ b/libft/src/ft_printf_process.c @@ -22,8 +22,7 @@ ** FT_PRINTF_CONV_CHARSET "cspdiuxX%" */ -void - ft_printf_process(const char *format, va_list arg, t_printflist *pflist) +void ft_printf_process(const char *format, va_list arg, t_printflist *pflist) { int conv; void (*fun_ptr[9])(va_list, t_printflist *); diff --git a/libft/src/ft_printf_put_char.c b/libft/src/ft_printf_put_char.c index f9cc6e5..42d8212 100644 --- a/libft/src/ft_printf_put_char.c +++ b/libft/src/ft_printf_put_char.c @@ -17,8 +17,7 @@ #include <inttypes.h> #include <unistd.h> -void - ft_printf_put_c(va_list arg, t_printflist *pflist) +void ft_printf_put_c(va_list arg, t_printflist *pflist) { char c; @@ -29,8 +28,7 @@ void ft_printf_put_width_post(pflist); } -void - ft_printf_put_perc(va_list arg, t_printflist *pflist) +void ft_printf_put_perc(va_list arg, t_printflist *pflist) { (void)arg; pflist->putlen += 1; diff --git a/libft/src/ft_printf_put_hex.c b/libft/src/ft_printf_put_hex.c index 68126a4..546c4fa 100644 --- a/libft/src/ft_printf_put_hex.c +++ b/libft/src/ft_printf_put_hex.c @@ -16,8 +16,7 @@ #include <stdarg.h> #include <inttypes.h> -static unsigned long - ft_printf_get_xlh(va_list arg, int8_t lh, uint8_t zflag) +static unsigned long ft_printf_get_xlh(va_list arg, int8_t lh, uint8_t zflag) { if (zflag == 1) return (va_arg(arg, size_t)); @@ -34,8 +33,7 @@ static unsigned long return (va_arg(arg, unsigned int)); } -void - ft_printf_put_x(va_list arg, t_printflist *pflist) +void ft_printf_put_x(va_list arg, t_printflist *pflist) { unsigned long x; char *str; @@ -59,8 +57,7 @@ void ft_printf_put_width_post(pflist); } -void - ft_printf_put_big_x(va_list arg, t_printflist *pflist) +void ft_printf_put_big_x(va_list arg, t_printflist *pflist) { unsigned long x; char *str; 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'; |