-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putendl_fd.c
26 lines (24 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kyungkim <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/27 05:49:19 by kyungkim #+# #+# */
/* Updated: 2024/11/27 06:26:45 by kyungkim ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putendl_fd(char *s, int fd)
{
write(fd, s, ft_strlen(s));
write(fd, "\n", 1);
}
/*
int main(void)
{
int fd = open("test.txt", O_WRONLY | O_CREAT | O_APPEND, 0644);
ft_putendl_fd("hi 42 kay", fd);
}
*/