diff --git a/get_next_line.c b/get_next_line.c index 0c2a8f4..9301892 100644 --- a/get_next_line.c +++ b/get_next_line.c @@ -6,7 +6,7 @@ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/12/11 00:27:09 by hulamy #+# #+# */ -/* Updated: 2019/12/11 00:56:54 by hulamy ### ########.fr */ +/* Updated: 2019/12/12 23:01:04 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/testt/get_next_line.c b/testt/get_next_line.c index 2267dee..0b4b559 100644 --- a/testt/get_next_line.c +++ b/testt/get_next_line.c @@ -169,28 +169,18 @@ int get_next_line(int fd, char **line) int main(int ac, char **av) { int fd1; - int fd2; int i; char *line; line = NULL; fd1 = open(av[1], O_RDONLY); - fd2 = open(av[2], O_RDONLY); if (ac < 2) return (0); while ((i = get_next_line(fd1, &line)) > 0) { - printf("%i", i); printf("%s\n",line); free(line); - if ((i = get_next_line(fd2, &line)) > 0) - { - printf("%s\n",line); - free(line); - } - printf("%i", i); } - printf("%i", i); while (1); return (0); } diff --git a/testt/test.txt b/testt/test.txt new file mode 100644 index 0000000..9ed0e16 --- /dev/null +++ b/testt/test.txt @@ -0,0 +1,2 @@ +asdfghjklasdfghjklasdfghjkl +