diff --git a/42sh/read_on_stdin b/42sh/read_on_stdin new file mode 100755 index 00000000..facf8b6b Binary files /dev/null and b/42sh/read_on_stdin differ diff --git a/42sh/simple_text_file b/42sh/simple_text_file new file mode 100644 index 00000000..90a8d85f --- /dev/null +++ b/42sh/simple_text_file @@ -0,0 +1,3 @@ +LINE_1 +LINE_2 +LINE_3 diff --git a/42sh/src/parser/add_redir.c b/42sh/src/parser/add_redir.c index f3886954..5f9acfe1 100644 --- a/42sh/src/parser/add_redir.c +++ b/42sh/src/parser/add_redir.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 16:39:05 by ariard #+# #+# */ -/* Updated: 2017/03/11 17:28:03 by ariard ### ########.fr */ +/* Updated: 2017/03/11 18:41:34 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/heredoc_parser.c b/42sh/src/parser/heredoc_parser.c index ae0ea276..a254efdd 100644 --- a/42sh/src/parser/heredoc_parser.c +++ b/42sh/src/parser/heredoc_parser.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/08 16:21:05 by ariard #+# #+# */ -/* Updated: 2017/03/11 16:20:21 by ariard ### ########.fr */ +/* Updated: 2017/03/11 18:50:14 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -32,10 +32,17 @@ int pop_heredoc(t_list **lst) temp2 = temp->next; free(temp); data_singleton()->heredoc_queue = temp2; + DG("type is :%s", read_state(head->type)); + DG("heredoc data after clear: %s", head->heredoc_data); } else + { + DG("type is :%s", read_state(head->type)); head->heredoc_data = ft_strjoin(head->heredoc_data, token->data); + head->heredoc_data = ft_strjoin(head->heredoc_data, "\n"); + DG("heredoc data + one: %s", head->heredoc_data); + } } ft_lstdel(lst, &token_free); return (1); diff --git a/42sh/write_on_stdout_and_stderr b/42sh/write_on_stdout_and_stderr new file mode 100755 index 00000000..43af5a5e Binary files /dev/null and b/42sh/write_on_stdout_and_stderr differ