summaryrefslogtreecommitdiffstats
path: root/src/p_args_next.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-03 19:09:05 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-03 19:09:05 +0200
commit757801bea2d236148e061324716425fc0e6aa686 (patch)
treeebe2d3a0fd391cb9147aa0bcc9987786c83dfb96 /src/p_args_next.c
parentBetter conditions, fuck the norm niggas (diff)
download42-minishell-757801bea2d236148e061324716425fc0e6aa686.tar.gz
42-minishell-757801bea2d236148e061324716425fc0e6aa686.tar.bz2
42-minishell-757801bea2d236148e061324716425fc0e6aa686.tar.xz
42-minishell-757801bea2d236148e061324716425fc0e6aa686.tar.zst
42-minishell-757801bea2d236148e061324716425fc0e6aa686.zip
In progress
Diffstat (limited to 'src/p_args_next.c')
-rw-r--r--src/p_args_next.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/p_args_next.c b/src/p_args_next.c
index 28410cd..4d7f979 100644
--- a/src/p_args_next.c
+++ b/src/p_args_next.c
@@ -71,10 +71,22 @@ static char
ft_strlcpy(tmp,
word + start[i],
(p_arg_len(word, start[i]) - start[i]) + 1);
- /* TODO: remove quotes */
return (tmp);
}
+void
+ p_del_alloced_words(char *words[], uint16_t to_del)
+{
+ uint16_t i;
+
+ i = 0;
+ while (i < to_del)
+ {
+ ft_memdel((void*)&words[i]);
+ i++;
+ }
+}
+
uint16_t
p_dup_words(char *words[],
const char word[],