-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
29 lines (26 loc) · 1.15 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: opodolia <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/17 16:39:04 by opodolia #+# #+# */
/* Updated: 2017/03/17 17:06:19 by opodolia ### ########.fr */
/* */
/* ************************************************************************** */
#include "get_next_line.h"
//#include "libft/libft.h"
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
int main(int argc, char **argv)
{
int fd;
char *line;
line = 0;
fd = open(argv[1], O_RDONLY);
while (get_next_line(fd, &line))
printf("%s\n", line);
return (0);
}