Make it so it should be possible to compile on MacOS

This commit is contained in:
Maieul BOYER 2024-08-04 12:58:25 +00:00
parent 51b0ecda20
commit 531134f575
8 changed files with 37 additions and 70 deletions

View file

@ -5,7 +5,10 @@ ast_alloc/ast_alloc \
ast_alloc/ast_alloc_scripting \
ast_free/ast_free \
ast_free/ast_free_scripting \
from_node/arithmetic_node2 \
from_node/artihmetic_node \
from_node/from_node \
from_node/node_utils \
print_ast/ast_print_command \
print_ast/ast_print_global \
print_ast/ast_print_node \

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/26 10:55:52 by rparodi #+# #+# */
/* Updated: 2024/08/04 11:54:08 by rparodi ### ########.fr */
/* Updated: 2024/08/04 12:43:56 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -103,8 +103,8 @@ void ast_set_term(t_ast_node *node, t_ast_terminator_kind term)
(void)(void_storage);
}
t_ast_vec _append_scripting(\
t_ast_node node, t_ast_node redirection)
t_vec_ast *_append_scripting(\
t_ast_node node)
{
if (node->kind == AST_WHILE)
return (&node->data.while_.suffixes_redirections);
@ -137,8 +137,8 @@ void _append_redirection(t_ast_node node, t_ast_node redirection)
vec = &node->data.pipeline.suffixes_redirections;
if (node->kind == AST_SUBSHELL)
vec = &node->data.subshell.suffixes_redirections;
if (_append_scripting(node, redirection) != NULL)
vec = _append_scripting(node, redirection);
if (vec == NULL)
vec = _append_scripting(node);
if (vec != NULL)
vec_ast_push(vec, redirection);
else