From 8dbbfcf1249dc3865d4a8f7887f9a883a181cd8b Mon Sep 17 00:00:00 2001 From: "Raphael (rparodi)" Date: Tue, 30 Jul 2024 18:32:42 +0200 Subject: [PATCH] Editing the function --- ast/src/ast_alloc/ast_alloc.c | 26 ++++++++++++------------- ast/src/ast_alloc/ast_alloc_scripting.c | 8 ++++---- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ast/src/ast_alloc/ast_alloc.c b/ast/src/ast_alloc/ast_alloc.c index 52febb4c..6b515201 100644 --- a/ast/src/ast_alloc/ast_alloc.c +++ b/ast/src/ast_alloc/ast_alloc.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/07/30 17:26:13 by rparodi #+# #+# */ -/* Updated: 2024/07/30 17:57:57 by rparodi ### ########.fr */ +/* Updated: 2024/07/30 18:32:26 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,15 +21,15 @@ #include #include -t_ast_node ast_alloc_boucle(t_ast_node_kind kind, t_ast_node ret); -t_ast_node ast_alloc_condition(t_ast_node_kind kind, t_ast_node ret); -t_ast_node ast_alloc_arith(t_ast_node_kind kind, t_ast_node ret); -t_ast_node ast_alloc_exec(t_ast_node_kind kind, t_ast_node ret); -t_ast_node ast_alloc_redirection(t_ast_node_kind kind, t_ast_node ret); -t_ast_node ast_alloc_expantion(t_ast_node_kind kind, t_ast_node ret); -t_ast_node ast_alloc_other(t_ast_node_kind kind, t_ast_node ret); +void ast_alloc_boucle(t_ast_node_kind kind, t_ast_node ret); +void ast_alloc_condition(t_ast_node_kind kind, t_ast_node ret); +void ast_alloc_arith(t_ast_node_kind kind, t_ast_node ret); +void ast_alloc_exec(t_ast_node_kind kind, t_ast_node ret); +void ast_alloc_redirection(t_ast_node_kind kind, t_ast_node ret); +void ast_alloc_expantion(t_ast_node_kind kind, t_ast_node ret); +void ast_alloc_other(t_ast_node_kind kind, t_ast_node ret); -t_ast_node ast_alloc_arith(t_ast_node_kind kind, t_ast_node ret) +void ast_alloc_arith(t_ast_node_kind kind, t_ast_node ret) { if (kind == AST_ARITHMETIC_EXPANSION) ret->data.arithmetic_expansion.expr = NULL; @@ -46,7 +46,7 @@ t_ast_node ast_alloc_arith(t_ast_node_kind kind, t_ast_node ret) } } -t_ast_node ast_alloc_exec(t_ast_node_kind kind, t_ast_node ret) +void ast_alloc_exec(t_ast_node_kind kind, t_ast_node ret) { if (kind == AST_COMMAND) { @@ -69,7 +69,7 @@ t_ast_node ast_alloc_exec(t_ast_node_kind kind, t_ast_node ret) } } -t_ast_node ast_alloc_redirection(t_ast_node_kind kind, t_ast_node ret) +void ast_alloc_redirection(t_ast_node_kind kind, t_ast_node ret) { if (kind == AST_FILE_REDIRECTION) { @@ -91,7 +91,7 @@ t_ast_node ast_alloc_redirection(t_ast_node_kind kind, t_ast_node ret) } } -t_ast_node ast_alloc_other(t_ast_node_kind kind, t_ast_node ret) +void ast_alloc_other(t_ast_node_kind kind, t_ast_node ret) { if (kind == AST_FUNCTION_DEFINITION) { @@ -122,7 +122,7 @@ t_ast_node ast_alloc_other(t_ast_node_kind kind, t_ast_node ret) t_ast_node ast_alloc(t_ast_node_kind kind) { - t_ast_node ret; + void ret; ret = mem_alloc(sizeof(*ret)); ret->kind = kind; diff --git a/ast/src/ast_alloc/ast_alloc_scripting.c b/ast/src/ast_alloc/ast_alloc_scripting.c index f5689296..e2c65718 100644 --- a/ast/src/ast_alloc/ast_alloc_scripting.c +++ b/ast/src/ast_alloc/ast_alloc_scripting.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/07/30 17:57:11 by rparodi #+# #+# */ -/* Updated: 2024/07/30 17:57:53 by rparodi ### ########.fr */ +/* Updated: 2024/07/30 18:32:33 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,7 +21,7 @@ #include #include -t_ast_node ast_alloc_expantion(t_ast_node_kind kind, t_ast_node ret) +void ast_alloc_expantion(t_ast_node_kind kind, t_ast_node ret) { if (kind == AST_RAW_STRING) { @@ -49,7 +49,7 @@ t_ast_node ast_alloc_expantion(t_ast_node_kind kind, t_ast_node ret) ret->data.regex.pattern = NULL; } -t_ast_node ast_alloc_boucle(t_ast_node_kind kind, t_ast_node ret) +void ast_alloc_boucle(t_ast_node_kind kind, t_ast_node ret) { if (kind == AST_IF) { @@ -77,7 +77,7 @@ t_ast_node ast_alloc_boucle(t_ast_node_kind kind, t_ast_node ret) } } -t_ast_node ast_alloc_condition(t_ast_node_kind kind, t_ast_node ret) +void ast_alloc_condition(t_ast_node_kind kind, t_ast_node ret) { if (kind == AST_CASE_ITEM) {