From da6f69b57554e2b67a2847b21eee1fcc950f609b Mon Sep 17 00:00:00 2001 From: whaffman Date: Thu, 27 Mar 2025 10:45:45 +0100 Subject: [PATCH] unused parameter --- README.md | 8 ++++++++ inc/parser.h | 5 ++--- src/parser/parser_get_arguments.c | 4 ++-- src/parser/parser_process_token.c | 4 ++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3f29449..d03675d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,14 @@ A lot of amazing shell stuff - libreadline-dev - libncurses-dev + +##EVALS + +- [ ] exit code niet perse de laatste command race condition? +- [ ] heredoc quote + variable expansion + + + ## Comments on work - Checked if path is a directory and send appropriate message - `executor_absolute_path` => extracted some code into helpers to make it norminette compliant diff --git a/inc/parser.h b/inc/parser.h index f0675a1..326f604 100644 --- a/inc/parser.h +++ b/inc/parser.h @@ -6,7 +6,7 @@ /* By: qmennen +#+ */ /* +#+ */ /* Created: 2025/02/11 14:03:03 by qmennen #+# #+# */ -/* Updated: 2025/03/17 14:00:03 by whaffman ######## odam.nl */ +/* Updated: 2025/03/25 10:54:35 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ @@ -26,7 +26,6 @@ char **parser_get_arguments(t_minishell *msh, int parser_validate_command(t_command *command); int parser_count_arguments(t_list *list); char *parser_concatenate(t_minishell *msh, char *str1, char *str2); -char *parser_process_token(t_minishell *msh, - t_list *prev, t_list *t_head); +char *parser_process_token(t_minishell *msh, t_list *t_head); #endif diff --git a/src/parser/parser_get_arguments.c b/src/parser/parser_get_arguments.c index 09c13eb..a83f394 100644 --- a/src/parser/parser_get_arguments.c +++ b/src/parser/parser_get_arguments.c @@ -6,7 +6,7 @@ /* By: qmennen +#+ */ /* +#+ */ /* Created: 2025/02/11 16:20:09 by qmennen #+# #+# */ -/* Updated: 2025/03/17 13:59:28 by whaffman ######## odam.nl */ +/* Updated: 2025/03/25 10:55:15 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ @@ -46,7 +46,7 @@ char **parser_get_arguments(t_minishell *msh, { if (token_from_list(cur)->type < 3) { - str = parser_process_token(msh, token_list_index(list, i - 1), cur); + str = parser_process_token(msh, cur); if (parser_should_concact(msh, i, cur, prev)) args[i - 1] = parser_concatenate(msh, args[i - 1], str); else if (str) diff --git a/src/parser/parser_process_token.c b/src/parser/parser_process_token.c index 027097b..d346526 100644 --- a/src/parser/parser_process_token.c +++ b/src/parser/parser_process_token.c @@ -6,7 +6,7 @@ /* By: qmennen +#+ */ /* +#+ */ /* Created: 2025/03/05 21:12:15 by qmennen #+# #+# */ -/* Updated: 2025/03/25 09:44:22 by whaffman ######## odam.nl */ +/* Updated: 2025/03/25 10:54:00 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ @@ -42,7 +42,7 @@ static int parser_should_expand(t_list *value) //TODO: Make an exception for this `echo hey""you "" test`. // here echo actually interprets "" as an extra space. Just check if // its empty and surrounded by spaces or sth. Can't be asked rn -char *parser_process_token(t_minishell *msh, t_list *prev, t_list *t_head) +char *parser_process_token(t_minishell *msh, t_list *t_head) { char *str; t_token *token;