diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-29 19:24:45 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-29 19:24:45 +0200 |
commit | 4bfa73662700068af84f59a8028118d0af991987 (patch) | |
tree | dfa74a6f615edbe9df8b6737411af10aa4f9d34f /libft/src/ft_printf_put_width.c | |
parent | Again (diff) | |
download | 42-minishell-4bfa73662700068af84f59a8028118d0af991987.tar.gz 42-minishell-4bfa73662700068af84f59a8028118d0af991987.tar.bz2 42-minishell-4bfa73662700068af84f59a8028118d0af991987.tar.xz 42-minishell-4bfa73662700068af84f59a8028118d0af991987.tar.zst 42-minishell-4bfa73662700068af84f59a8028118d0af991987.zip |
in progress
Diffstat (limited to 'libft/src/ft_printf_put_width.c')
-rw-r--r-- | libft/src/ft_printf_put_width.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libft/src/ft_printf_put_width.c b/libft/src/ft_printf_put_width.c index e649a65..c6da76c 100644 --- a/libft/src/ft_printf_put_width.c +++ b/libft/src/ft_printf_put_width.c @@ -13,8 +13,7 @@ #include <libft.h> #include <stdlib.h> -static int - ft_printf_get_len(t_printflist *pflist) +static int ft_printf_get_len(t_printflist *pflist) { int len; int width; @@ -44,8 +43,7 @@ static int ** when needed using pflist->width */ -void - ft_printf_put_width_pre(t_printflist *pflist) +void ft_printf_put_width_pre(t_printflist *pflist) { char *str; @@ -74,8 +72,7 @@ void } } -void - ft_printf_put_width_post(t_printflist *pflist) +void ft_printf_put_width_post(t_printflist *pflist) { char *str; @@ -83,7 +80,7 @@ void - (pflist->precision - pflist->putlen) >= 0 && pflist->isreverse) { if (!(str = (char*)malloc((ft_printf_get_len(pflist) + 1) - * sizeof(char)))) + * sizeof(char)))) return ; str = ft_memset(str, ' ', ft_printf_get_len(pflist)); *(str + ft_printf_get_len(pflist)) = '\0'; @@ -94,7 +91,7 @@ void && pflist->isreverse) { if (!(str = (char*)malloc((ft_printf_get_len(pflist) + 1) - * sizeof(char)))) + * sizeof(char)))) return ; str = ft_memset(str, ' ', ft_printf_get_len(pflist)); *(str + ft_printf_get_len(pflist)) = '\0'; |