-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putendl_fd.c
28 lines (26 loc) · 1.21 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ana-lda- <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/15 10:54:33 by ana-lda- #+# #+# */
/* Updated: 2024/04/30 14:36:37 by ana-lda- ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/** @brief Produz a string 's' para o descritor de arquivo fornecido
seguido por uma nova linha.
@param s string para printar
@param fd o file descriptor em qual se quer escrever*/
void ft_putendl_fd(char *s, int fd)
{
while (*s)
write(fd, s++, 1);
write (fd, "\n", 1);
}
/*int main(void)
{
ft_putendl_fd("ana", 1);
}*/