diff --git a/ast/src/print_ast/ast_print_redirection.c b/ast/src/print_ast/ast_print_redirection.c index 38a93e37..12b17ee9 100644 --- a/ast/src/print_ast/ast_print_redirection.c +++ b/ast/src/print_ast/ast_print_redirection.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/07/26 13:07:12 by rparodi #+# #+# */ -/* Updated: 2024/10/24 22:30:02 by maiboyer ### ########.fr */ +/* Updated: 2024/10/24 23:04:06 by maiboyer ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,8 +15,8 @@ void ast_print_node_file_redirection_heredoc(t_ast_node self) { if (self == NULL || self->kind != AST_HEREDOC_REDIRECTION) - return; - printf("<<%s", self->data.heredoc_redirection.delimiter); + return ; + printf("<<%s ", self->data.heredoc_redirection.delimiter); } //{ // if (self->data.file_redirection.op == AST_REDIR_HEREDOC) diff --git a/exec/src/run_ast/_ast_into_str_main.c b/exec/src/run_ast/_ast_into_str_main.c index f414fbf4..b13f7a27 100644 --- a/exec/src/run_ast/_ast_into_str_main.c +++ b/exec/src/run_ast/_ast_into_str_main.c @@ -6,7 +6,7 @@ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/14 12:26:51 by maiboyer #+# #+# */ -/* Updated: 2024/10/24 22:48:26 by maiboyer ### ########.fr */ +/* Updated: 2024/10/24 23:05:59 by maiboyer ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,12 +21,12 @@ t_error _word_handle_star(t_ast_word *word, t_state *state, t_vec_str *out); t_error list_files_in_current_directory(t_vec_str *out); t_error _word_into_str_inner(struct s_word_str_args args); -t_error _word_split_loop_expand(\ - t_expandable_str val, t_vec_str *append, t_string *tmp) +t_error _word_split_loop_expand(\ + t_expandable_str val, t_vec_str *append, t_string *tmp) { t_vec_str split; t_str stmp; - + if (val.do_expand) { if (val.value == NULL) @@ -36,7 +36,7 @@ t_error _word_split_loop_expand(\ if (split.len != 0) { vec_str_push(append, tmp->buf); - *tmp = string_new(16); + *tmp = string_new(16); } while (!vec_str_pop_front(&split, &stmp)) vec_str_push(append, stmp); @@ -47,11 +47,9 @@ t_error _word_split_loop_expand(\ return (NO_ERROR); } - t_error _word_split_loop(\ bool do_split, t_expandable_str val, t_vec_str *append, t_string *tmp) { - if (do_split) return (_word_split_loop_expand(val, append, tmp)); else