diff --git a/Minishell.mk b/Minishell.mk index e31a4944..8955a6ab 100644 --- a/Minishell.mk +++ b/Minishell.mk @@ -6,7 +6,7 @@ # By: maiboyer +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/04/28 17:28:30 by maiboyer #+# #+# # -# Updated: 2024/09/26 18:27:18 by maiboyer ### ########.fr # +# Updated: 2024/10/03 21:41:55 by maiboyer ### ########.fr # # # # **************************************************************************** # @@ -82,6 +82,12 @@ $(NAME): $(LIBS_FILES) @echo -e '$(GREY) Linking \t$(END)$(GOLD)$(NAME)$(END)' @$(CC) $(CFLAGS) -o $(NAME) -L$(BUILD_DIR) $(call link_group,$(LIBS_FLAGS)) +# REMOVE THIS ONE DAY +libast.a: $(BUILD_DIR)/libast.a +$(BUILD_DIR)/libast.a: + @echo -e '$(GREY) Mocking \t$(END)$(GOLD)libast.a$(END)' + @ar rcs $(BUILD_DIR)/libast.a + lib$(ANAME).a: $(BUILD_DIR)/lib$(ANAME).a $(BUILD_DIR)/lib$(ANAME).a: $(OBJ) diff --git a/exec/src/run_ast/run_command.c b/exec/src/run_ast/run_command.c index deb87f4d..7ab7fdd2 100644 --- a/exec/src/run_ast/run_command.c +++ b/exec/src/run_ast/run_command.c @@ -6,7 +6,7 @@ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/14 12:23:53 by maiboyer #+# #+# */ -/* Updated: 2024/09/16 19:08:04 by maiboyer ### ########.fr */ +/* Updated: 2024/10/03 21:43:42 by maiboyer ### ########.fr */ /* */ /* ************************************************************************** */ @@ -53,8 +53,7 @@ t_error run_command(t_ast_command *command, t_state *state, t_cmd_pipe cmd_pipe, if (command == NULL || state == NULL || out == NULL) return (ERROR); hmap_env_clear(state->tmp_var); - red.redirections = vec_ast_new(command->suffixes_redirections.len, \ - ast_free); + red.redirections = vec_ast_new(command->suffixes_redirections.len, NULL); red.cmd_pipe = cmd_pipe; i = 0; while (i < command->prefixes.len) diff --git a/sources/_helper_main.c b/sources/_helper_main.c index 2d005d85..84abc222 100644 --- a/sources/_helper_main.c +++ b/sources/_helper_main.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/06 16:31:41 by rparodi #+# #+# */ -/* Updated: 2024/10/03 21:09:35 by maiboyer ### ########.fr */ +/* Updated: 2024/10/03 21:44:22 by maiboyer ### ########.fr */ /* */ /* ************************************************************************** */ @@ -59,7 +59,7 @@ void exec_shcat(t_state *state) if (state->ast != NULL && run_program(\ &state->ast->data.program, state, &prog_res)) printf("Error when execting the Command \n"); - ast_free(state->ast); + // ast_free(state->ast); } void ft_take_args(t_state *state)