42_solong/libftx/printf/ft_dprintflag.c

24 lines
1.1 KiB
C
Raw Normal View History

2022-12-22 11:54:17 -05:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 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));
}