summaryrefslogtreecommitdiffstats
path: root/src/p_args.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/p_args.c27
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);