-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putendl_fd.c
33 lines (29 loc) · 1.1 KB
/
ft_putendl_fd.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tpouget <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/14 17:04:37 by tpouget #+# #+# */
/* Updated: 2020/05/14 17:06:09 by tpouget ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putendl_fd(char *s, int fd)
{
while (*s)
{
write(fd, s, 1);
s++;
}
write(fd, "\n", 1);
}
/*
int main (int argc, char **argv)
{
ft_putendl_fd(argv[1], 1);
ft_putendl_fd(argv[1], 2);
return 0;
}
*/