2023-01-31 08:40:15 -05:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* ::: :::::::: */
|
|
|
|
/* ft_dprintstrtab.c :+: :+: :+: */
|
|
|
|
/* +:+ +:+ +:+ */
|
|
|
|
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
|
|
|
/* +#+#+#+#+#+ +#+ */
|
|
|
|
/* Created: 2023/01/05 17:26:55 by cchauvet #+# #+# */
|
2023-02-03 10:02:52 -05:00
|
|
|
/* Updated: 2023/02/03 12:54:44 by cchauvet ### ########.fr */
|
2023-01-31 08:40:15 -05:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#include "ft_printf.h"
|
|
|
|
|
|
|
|
int ft_dprintstrtab(int fd, char **tab)
|
|
|
|
{
|
|
|
|
size_t index;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
index = 0;
|
|
|
|
while (tab[index] != NULL)
|
|
|
|
{
|
2023-02-03 10:02:52 -05:00
|
|
|
i += ft_putstr_fd_p(fd, tab[index]) + 1;
|
2023-01-31 08:40:15 -05:00
|
|
|
ft_putchar_fd(fd, '\n');
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
return (i);
|
|
|
|
}
|