Define SPECIFIERS macro and use it everyhere.

This commit is contained in:
gbaconni
2022-04-29 09:12:07 +02:00
parent 38021fb98f
commit 5734b6b29b
6 changed files with 16 additions and 14 deletions

View File

@@ -6,7 +6,7 @@
/* By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/04/25 13:15:32 by gbaconni #+# #+# */
/* Updated: 2022/04/26 17:18:20 by gbaconni ### ########.fr */
/* Updated: 2022/04/29 08:59:37 by gbaconni ### lausanne.ch */
/* */
/* ************************************************************************** */
@@ -32,9 +32,9 @@ int ft_vprintf_flags_bonus(const char *format, va_list ap)
ret |= F_SPACE;
else if (*f == '+')
ret |= F_PLUS;
else if (*f >= '0' && *f <= '9')
else if (ft_isdigit(*f))
break ;
if (*f == 'c' || *f == 's' || *f == 'p' || *f == 'd' || *f == 'i' || *f == 'u' || *f == 'x' || *f == 'X' || *f == '%')
if (ft_strchr(SPECIFIERS, *f) != NULL)
break ;
f++;
}