-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putendl_fd.c
30 lines (27 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: puttsche <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/17 19:07:54 by puttsche #+# #+# */
/* Updated: 2016/11/21 05:31:36 by puttsche ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putendl_fd(char const *s, int fd)
{
int x;
if (s != NULL)
{
x = 0;
while (s[x])
{
ft_putchar_fd(s[x], fd);
x++;
}
if (s[x] == '\0')
ft_putchar_fd('\n', fd);
}
}