From 4f56de1c249e0f79296341dc3f88d79e00c9cd7e Mon Sep 17 00:00:00 2001 From: Adam Joly Date: Mon, 15 Jul 2024 18:19:07 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=94=A8=E3=80=8D=20fix:=20fixed?= =?UTF-8?q?=20quote=20in=20$?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/error_msg.h | 4 ++-- src/exec/format_quotes.c | 12 +++++++++++- src/parsing/check_error/check_quote.c | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/error_msg.h b/include/error_msg.h index ed9d1fc..6c3ab51 100644 --- a/include/error_msg.h +++ b/include/error_msg.h @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/05/20 20:25:06 by adjoly #+# #+# */ -/* Updated: 2024/07/03 19:07:12 by adjoly ### ########.fr */ +/* Updated: 2024/07/15 18:05:05 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,7 +23,7 @@ # define ERROR_NO_EOF "need delimiter to heredoc" # define ERROR_NO_FILE "No such file or directory" # define ERROR_CMD_PIPE "No command after pipe" -# define ERROR_NO_CMD "No command in the pipe" +# define ERROR_NO_CMD "command not found" # define ERROR_COREDUMP "(core dumped)" diff --git a/src/exec/format_quotes.c b/src/exec/format_quotes.c index d73e79b..35fa51f 100644 --- a/src/exec/format_quotes.c +++ b/src/exec/format_quotes.c @@ -6,7 +6,7 @@ /* By: mmoussou +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/21 11:59:34 by adjoly #+# #+# */ -/* Updated: 2024/06/30 16:11:23 by adjoly ### ########.fr */ +/* Updated: 2024/07/15 18:16:52 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,7 +24,7 @@ size_t count_quote(char *readline, t_quote type) while (*tmp) { if (*tmp == type) - count++; + count += search_for_next_quote(tmp, type) - tmp; tmp++; } return (count);