-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putendl_fd.c
53 lines (50 loc) · 1.4 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: evdos-sa <evdos-sa@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/26 11:09:51 by evdos-sa #+# #+# */
/* Updated: 2022/11/27 12:28:21 by evdos-sa ### ########.fr */
/* */
/* ************************************************************************** */
/*
Parâmetros:
s: A string para saída.
fd: O descritor de arquivo no qual escrever.
Valor de retorno:
Nenhum
Funções externas:
Write
Descrição:
Emite a string 's' para o descritor de arquivo fornecido seguido por
uma nova linha.
*/
#include "libft.h"
void ft_putendl_fd(char *s, int fd)
{
if (s)
{
while (*s)
{
ft_putchar_fd(*s, fd);
s++;
}
ft_putchar_fd('\n', fd);
}
}
/*
void ft_putendl_fd(char *s, int fd)
{
if (s)
{
while (*s)
{
ft_putchar_fd(*s, fd);
s++;
}
ft_putchar_fd('\n', fd);
}
}
*/