27 lines
1.1 KiB
C
27 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_vdprintf.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/10/06 16:39:25 by cchauvet #+# #+# */
|
|
/* Updated: 2022/10/10 19:12:04 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "printf.h"
|
|
|
|
int ft_vdprintf(int fd, const char *format, va_list va)
|
|
{
|
|
char *str;
|
|
int rv;
|
|
|
|
str = ft_strdup("");
|
|
str = ft_vsprintf(str, format, va);
|
|
rv = ft_strlen(str);
|
|
ft_putstr_fd(str, fd);
|
|
free(str);
|
|
return (rv);
|
|
}
|