diff --git a/42sh/includes/exec.h b/42sh/includes/exec.h index df7f3d02..71991239 100644 --- a/42sh/includes/exec.h +++ b/42sh/includes/exec.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/27 20:29:56 by jhalford #+# #+# */ -/* Updated: 2017/03/10 13:10:03 by jhalford ### ########.fr */ +/* Updated: 2017/03/10 13:19:04 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index e0b83080..52efea58 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -161,7 +161,6 @@ struct s_redir int n; char *word; char *heredoc_data; - /* int close; */ }; struct s_cmd diff --git a/42sh/src/exec/redirect_dless.c b/42sh/src/exec/redirect_dless.c index 9a1a7873..67511e4f 100644 --- a/42sh/src/exec/redirect_dless.c +++ b/42sh/src/exec/redirect_dless.c @@ -17,7 +17,8 @@ int redirect_dless(t_redir *redir) char *str; pipe(fds); - str = redir->word; + str = redir->heredoc_data; + DG("[%s]", str); write(fds[PIPE_WRITE], str, ft_strlen(str)); close(fds[PIPE_WRITE]); dup2(fds[PIPE_READ], 0); diff --git a/42sh/src/lexer/lexer_heredoc.c b/42sh/src/lexer/lexer_heredoc.c index 7f0d9c63..966d2821 100644 --- a/42sh/src/lexer/lexer_heredoc.c +++ b/42sh/src/lexer/lexer_heredoc.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/08 15:51:17 by jhalford #+# #+# */ -/* Updated: 2017/03/08 23:19:57 by ariard ### ########.fr */ +/* Updated: 2017/03/10 13:16:54 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index 3ccd3935..0d9b5b15 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/03/10 13:13:51 by jhalford ### ########.fr */ +/* Updated: 2017/03/10 13:19:01 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_redir.c b/42sh/src/parser/add_redir.c index 85d0e6cd..28bd864c 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/09 18:29:45 by ariard ### ########.fr */ +/* Updated: 2017/03/10 13:19:14 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/heredoc_parser.c b/42sh/src/parser/heredoc_parser.c index 888bb42f..6ed353a9 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/09 17:34:31 by ariard ### ########.fr */ +/* Updated: 2017/03/10 13:19:06 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */