42_ft_printf/ft_dprintflag.c
Camille Chauvet 31feb3fe3c final
2022-10-23 19:01:50 +02:00

24 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_dprintflag.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/11 16:30:39 by cchauvet #+# #+# */
/* Updated: 2022/10/23 18:59:55 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_dprintflag(int fd, const char *flag, va_list va)
{
if (ft_skipflag(flag) == 0)
return (-1);
flag++;
while (ft_isdigit(flag[0]))
flag += 1;
return (ft_dprintarg(fd, flag[0], va));
}