From 6ca36c885455489fc3034c17378d790a82281dec Mon Sep 17 00:00:00 2001 From: yosyo Date: Sat, 6 Jul 2024 18:05:14 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=E2=9C=A8=E3=80=8D=20feat(quotes=5Fpar?= =?UTF-8?q?sing):=20quotes=20are=20now=20correctly=20parsed=20!=20:D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/exec/format_quotes.c | 108 ++++++--------------------------------- 1 file changed, 15 insertions(+), 93 deletions(-) diff --git a/src/exec/format_quotes.c b/src/exec/format_quotes.c index 367bd35..f2c0e86 100644 --- a/src/exec/format_quotes.c +++ b/src/exec/format_quotes.c @@ -6,87 +6,17 @@ /* By: mmoussou cmd); - new_cmd = format_quotes_string(cmd->cmd); - if (!new_cmd) - return (-1); - free(cmd->cmd); - cmd->cmd = new_cmd; - //printf("after : %s\n", cmd->cmd); + format_quotes_string(cmd->cmd); i = 0; while (cmd->argv[i]) { - //printf("before : %s\n", cmd->argv[i]); - new_cmd = format_quotes_string(cmd->argv[i]); - if (!new_cmd) - return (-1); - free(cmd->argv[i]); - cmd->argv[i] = new_cmd; - //printf("after : %s\n", cmd->argv[i]); + format_quotes_string(cmd->argv[i]); i++; } return (0); @@ -144,7 +67,6 @@ int format_quotes_cmd(t_cmd *cmd) int format_quotes(t_list *list_cmd) { - //printf("aled\n"); if (!list_cmd) return (0); while (list_cmd)