42_minishell/libftx/printf/ft_dprintstrtab.c
Camille Chauvet 5a102e93a1 init
2023-01-31 14:40:15 +01:00

30 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_dprintstrtab.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/05 17:26:55 by cchauvet #+# #+# */
/* Updated: 2023/01/05 18:52:56 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_dprintstrtab(int fd, char **tab)
{
size_t index;
int i;
i = 0;
index = 0;
while (tab[index] != NULL)
{
i += ft_putstr_fd(fd, tab[index]) + 1;
ft_putchar_fd(fd, '\n');
index++;
}
return (i);
}