summaryrefslogtreecommitdiffstats
path: root/src/p_args_escape.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-05 15:57:20 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-05 15:57:20 +0200
commit8e8508c068111729d74d43d51bd6f2f9b9e1cdc0 (patch)
tree71ae106df2588c5a25c60b76da47e16a38debf5d /src/p_args_escape.c
parentcommit (diff)
download42-minishell-8e8508c068111729d74d43d51bd6f2f9b9e1cdc0.tar.gz
42-minishell-8e8508c068111729d74d43d51bd6f2f9b9e1cdc0.tar.bz2
42-minishell-8e8508c068111729d74d43d51bd6f2f9b9e1cdc0.tar.xz
42-minishell-8e8508c068111729d74d43d51bd6f2f9b9e1cdc0.tar.zst
42-minishell-8e8508c068111729d74d43d51bd6f2f9b9e1cdc0.zip
In progress
Diffstat (limited to 'src/p_args_escape.c')
-rw-r--r--src/p_args_escape.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/p_args_escape.c b/src/p_args_escape.c
index e6c9a24..6052991 100644
--- a/src/p_args_escape.c
+++ b/src/p_args_escape.c
@@ -12,11 +12,21 @@
#include <stddef.h>
+#include "d_define.h"
+
+static void
+ p_escape_arg(char *ptr)
+{
+ while (*ptr != C_NULL)
+ {
+ ptr++;
+ }
+}
+
void
p_args_escape_chars(char *words[])
{
/* TODO: escape \ */
- /* TODO: escape $vars */
/* TODO: escape $# special vars */
/* TODO: escape my life */
char **ptr;
@@ -24,7 +34,7 @@ void
ptr = words;
while (*ptr != NULL)
{
- /* if (**ptr != C_SQUOTE) */
+ p_escape_arg(*ptr);
ptr++;
}
}