-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
29 lines (26 loc) · 1.16 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: amalsago <amalsago@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/25 11:04:28 by amalsago #+# #+# */
/* Updated: 2018/12/01 20:47:42 by amalsago ### ########.fr */
/* */
/* ************************************************************************** */
#include "get_next_line.h"
#include "libft/includes/libft.h"
#include <fcntl.h>
#include <stdio.h>
int main(int argc, char **argv)
{
char *line;
int fd1;
(void)argc;
fd1 = open(argv[1], O_RDONLY);
while (get_next_line(1000000, &line) == 1)
ft_putendl(line);
close(fd1);
return (0);
}