/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_vprintf.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/01/20 11:43:52 by gbaconni #+# #+# */ /* Updated: 2022/04/26 12:04:14 by gbaconni ### ########.fr */ /* */ /* ************************************************************************** */ #include "libftprintf.h" int ft_vprintf(char const *format, va_list ap) { int ret; const char *fmt; ret = 0; fmt = format; while (*fmt != 0) { if (*fmt == '%') { fmt++; fmt += ft_eoflags(fmt); ret += ft_vprintf_percent(fmt, ap); } else ret += ft_vprintf_other(fmt, ap); fmt++; } return (ret); }