diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-01 16:44:52 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-01 16:44:52 +0200 |
commit | d5a11fcb60022edfc96bf83c9ab8cdb03e6b762a (patch) | |
tree | 680241a07574d5ca389c602a6a546899f665754c /src/p_args.c | |
parent | Update (diff) | |
download | 42-minishell-d5a11fcb60022edfc96bf83c9ab8cdb03e6b762a.tar.gz 42-minishell-d5a11fcb60022edfc96bf83c9ab8cdb03e6b762a.tar.bz2 42-minishell-d5a11fcb60022edfc96bf83c9ab8cdb03e6b762a.tar.xz 42-minishell-d5a11fcb60022edfc96bf83c9ab8cdb03e6b762a.tar.zst 42-minishell-d5a11fcb60022edfc96bf83c9ab8cdb03e6b762a.zip |
Cool
Diffstat (limited to '')
-rw-r--r-- | src/p_args.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/p_args.c b/src/p_args.c index 6b285da..d8ca029 100644 --- a/src/p_args.c +++ b/src/p_args.c @@ -14,16 +14,39 @@ #include <stdint.h> #include <stdlib.h> +/* ================= */ +/* TODO: DELETE THIS */ +/* ================= */ + +static void +p_print(char *words[]) +{ + char **ptr; + + ptr = words; + while (*ptr != NULL) + { + ft_printf("[%s]\n", *ptr); + ptr++; + } +} + +/* ================== */ +/* TODO: DELETE ABOVE */ +/* ================== */ + char **p_split_args(const char word[], int8_t redir) { char **words; - (void)word; + ft_printf("word at start: [%s]\n", word); if (redir == 0) { + p_print(words); return (words); } + p_print(words); return (words); /* char **words; */ /* char *subst; */ |