-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
34 lines (31 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
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncolomer <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/11 16:29:19 by ncolomer #+# #+# */
/* Updated: 2019/11/14 19:20:21 by ncolomer ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include "get_next_line.h"
int
main(void)
{
int r;
char *line;
line = NULL;
while ((r = get_next_line(&line)) > 0)
{
printf("%s\n", line);
free(line);
line = NULL;
}
printf("%s", line);
free(line);
line = NULL;
}