diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/p_args.c | 25 | ||||
-rw-r--r-- | src/s_com.c | 1 |
2 files changed, 25 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; */ diff --git a/src/s_com.c b/src/s_com.c index 75a5040..99b3158 100644 --- a/src/s_com.c +++ b/src/s_com.c @@ -116,6 +116,7 @@ t_com return (NULL); if ((words = p_split_args(word, com->redir)) == NULL) return (NULL); + /* TODO: subst vars is before getting words fuck my life */ if ((words = p_subst_vars(words, msh)) == NULL) return (NULL); if ((words = p_subst_home(words, msh)) == NULL) |