add: ft_dprintf

This commit is contained in:
Camille Chauvet 2023-02-21 13:28:45 +01:00
parent cfd1dffbcf
commit e2a40e07fc
3 changed files with 17 additions and 3 deletions

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/26 14:47:54 by cchauvet #+# #+# */
/* Updated: 2023/02/17 16:24:42 by cchauvet ### ########.fr */
/* Updated: 2023/02/21 13:28:19 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
@ -19,6 +19,8 @@
char *ft_ultoa_base(unsigned long long n, char *base);
int ft_printf(const char *format, ...);
int ft_eprintf(const char *format, ...);
int ft_dprintf(int fd, const char *format, ...);
int ft_dprintf(int fd, const char *format, ...);
char *get_next_line(int fd);
size_t ft_random_generator(size_t start, size_t stop);
void ft_freer_tab_ultimate(size_t len, ...);

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/06 22:01:28 by cchauvet #+# #+# */
/* Updated: 2022/10/12 16:34:31 by cchauvet ### ########.fr */
/* Updated: 2023/02/21 13:27:31 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
@ -22,3 +22,14 @@ int ft_printf(const char *format, ...)
va_end(va);
return (i);
}
int ft_dprintf(int fd, const char *format, ...)
{
va_list va;
int i;
va_start(va, format);
i = ft_vdprintf(fd, format, va);
va_end(va);
return (i);
}

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/26 14:47:54 by cchauvet #+# #+# */
/* Updated: 2023/02/17 16:29:18 by cchauvet ### ########.fr */
/* Updated: 2023/02/21 13:27:51 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
@ -32,6 +32,7 @@ int ft_dprintarg(int fd, int c, va_list va);
int ft_dprintstrtab(int fd, char **tab);
int ft_printf(const char *format, ...);
int ft_dprintf(int fd, const char *format, ...);
int ft_eprintf(const char *format, ...);
int ft_vdprintf(int fd, const char *format, va_list va);