-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
33 lines (29 loc) · 1.17 KB
/
main.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mbin-nas <mbin-nas@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/27 18:46:30 by mbin-nas #+# #+# */
/* Updated: 2022/10/24 16:43:07 by mbin-nas ### ########.fr */
/* */
/* ************************************************************************** */
#include "get_next_line.h"
int main(void)
{
int fd;
char *line;
fd = open("test.txt", O_RDONLY);
printf("%d\n", fd);
line = get_next_line(fd);
printf("%s", line);
free(line);
// while (line != NULL)
// {
// printf("%s", line);
// free(line);
// line = get_next_line(fd);
// }
return (0);
}