-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.c
More file actions
34 lines (31 loc) · 1.19 KB
/
test.c
File metadata and controls
34 lines (31 loc) · 1.19 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dderevyn <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/08 19:15:14 by dderevyn #+# #+# */
/* Updated: 2019/02/08 19:50:33 by dderevyn ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft/libft.h"
#include "stdio.h"
int main(void)
{
int fd;
int i;
int ret;
char *line;
fd = open("libft/libft.h", O_RDONLY);
i = 1;
while ((ret = get_next_line(fd, (void*)0)) > 0 && i < 1)
{
++i;
printf("%d|%s|\n", ret, line);
free(line);
}
printf("%d|%s|\n", ret, line);
free(line);
return (0);
}