-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putchar_fd.c
32 lines (29 loc) · 1.18 KB
/
ft_putchar_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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putchar_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: amitcul <amitcul@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/17 17:03:50 by alexmitcul #+# #+# */
/* Updated: 2022/11/26 13:34:46 by amitcul ### ########.fr */
/* */
/* ************************************************************************** */
/**
* - Description:
* Outputs the character 'c' to the given file descriptor.
*
* - Parameters:
* c: The character to output.
* fd: The file descriptor on which to write.
*
* - Return value:
* None
**/
#include "libft.h"
void ft_putchar_fd(char c, int fd)
{
if (fd < 0)
return ;
write(fd, &c, 1);
}