heredoc debug en cours
This commit is contained in:
parent
84f83bb14c
commit
2f2b0301b6
5 changed files with 12 additions and 2 deletions
BIN
42sh/read_on_stdin
Executable file
BIN
42sh/read_on_stdin
Executable file
Binary file not shown.
3
42sh/simple_text_file
Normal file
3
42sh/simple_text_file
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
LINE_1
|
||||
LINE_2
|
||||
LINE_3
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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);
|
||||
|
|
|
|||
BIN
42sh/write_on_stdout_and_stderr
Executable file
BIN
42sh/write_on_stdout_and_stderr
Executable file
Binary file not shown.
Loading…
Reference in a new issue