diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-06 18:25:02 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-06 18:25:02 +0200 |
commit | 9ed927a6d4fd26dcdc7c094a0001521f072d8ae4 (patch) | |
tree | 1ad8c70b67ccc85d9776f39768aaf28e24ffcf7b /src/p_args.c | |
parent | Gitignore update (diff) | |
download | 42-minishell-9ed927a6d4fd26dcdc7c094a0001521f072d8ae4.tar.gz 42-minishell-9ed927a6d4fd26dcdc7c094a0001521f072d8ae4.tar.bz2 42-minishell-9ed927a6d4fd26dcdc7c094a0001521f072d8ae4.tar.xz 42-minishell-9ed927a6d4fd26dcdc7c094a0001521f072d8ae4.tar.zst 42-minishell-9ed927a6d4fd26dcdc7c094a0001521f072d8ae4.zip |
Update
Diffstat (limited to '')
-rw-r--r-- | src/p_args.c | 27 |
1 files changed, 14 insertions, 13 deletions
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); |