-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putchar_fd.c
27 lines (24 loc) · 1.07 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putchar_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ldel-val <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/05 10:53:37 by ldel-val #+# #+# */
/* Updated: 2024/10/10 18:38:42 by ldel-val ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putchar_fd(char c, int fd)
{
write(fd, &c, 1);
}
/*
#include <fcntl.h>
int main(void)
{
int fd = open("fdtest.txt", O_APPEND | O_RDWR);
ft_putchar_fd('a', fd);
close(fd);
}*/