From aaac3125e9a843ee34ad256625be0c728bd49be1 Mon Sep 17 00:00:00 2001 From: lalgarra Date: Fri, 24 Oct 2025 15:31:18 +0200 Subject: [PATCH] loop in test --- test001.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test001.c b/test001.c index a5aa930..a9e5af5 100644 --- a/test001.c +++ b/test001.c @@ -6,7 +6,7 @@ /* By: lalgarra +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/10/22 20:50:52 by lalgarra #+# #+# */ -/* Updated: 2025/10/22 21:12:07 by lalgarra ### ########.fr */ +/* Updated: 2025/10/24 14:34:28 by lalgarra ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,8 +15,17 @@ int main(int argc, char *argv[]) { + char *line; + int stop; + (void) argc; (void) argv; - printf("get_next_line():%s", get_next_line(0)); + stop = 0; + while (!stop) + { + line = get_next_line(0); + printf("%s", line); + stop = line == NULL; + } return (0); }