From 9ed927a6d4fd26dcdc7c094a0001521f072d8ae4 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 6 Sep 2020 18:25:02 +0200 Subject: Update --- src/p_args.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'src/p_args.c') diff --git a/src/p_args.c b/src/p_args.c index 7f5302f..79f66bd 100644 --- a/src/p_args.c +++ b/src/p_args.c @@ -24,18 +24,18 @@ /* TODO: DELETE THIS */ /* ================= */ -/* static void */ -/* p_print(char *words[]) */ -/* { */ -/* char **ptr; */ - -/* ptr = words; */ -/* while (*ptr != NULL) */ -/* { */ -/* ft_printf("[%s]\n", *ptr); */ -/* ptr++; */ -/* } */ -/* } */ +static void +p_print(char *words[]) +{ + char **ptr; + + ptr = words; + while (*ptr != NULL) + { + ft_printf("[%s]\n", *ptr); + ptr++; + } +} /* ================== */ /* TODO: DELETE ABOVE */ @@ -166,6 +166,8 @@ static char return (NULL); } p_args_escape_chars_and_quotes(words); + p_print(words); + exit(0); return (words); } @@ -179,7 +181,6 @@ char { if ((words = p_split_words_no_rdr(word)) == NULL) return (NULL); - exit(0); return (words); } return (words); -- cgit v1.2.3