From 4ee0f246328ab4fa1ec80fcb766c1ae58e43380f Mon Sep 17 00:00:00 2001 From: Jack Halford Date: Wed, 8 Mar 2017 14:28:34 +0100 Subject: [PATCH] compils now --- 42sh/src/exec/launch_process.c | 2 +- 42sh/src/lexer/lexer_dless.c | 22 +++++++++++----------- 42sh/src/main/data_init.c | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/42sh/src/exec/launch_process.c b/42sh/src/exec/launch_process.c index 080c92e1..e812c0b3 100644 --- a/42sh/src/exec/launch_process.c +++ b/42sh/src/exec/launch_process.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 14:20:45 by jhalford #+# #+# */ -/* Updated: 2017/03/08 03:23:16 by wescande ### ########.fr */ +/* Updated: 2017/03/08 14:26:41 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_dless.c b/42sh/src/lexer/lexer_dless.c index 4ee8434c..16fb05f3 100644 --- a/42sh/src/lexer/lexer_dless.c +++ b/42sh/src/lexer/lexer_dless.c @@ -10,17 +10,17 @@ int lexer_dless(t_list **alst, t_lexer *lexer) (void)lexer; heredoc_lst = *(t_list**)lexer->heredoc_stack->content; heredoc_tok = heredoc_lst->content; - /* if (!(heredoc_lst->next)) */ - /* { */ - /* ft_dprintf(2, "{red}%s: parse error near `\\n'{eoc}\n", SHELL_NAME); */ - /* return (1); */ - /* } */ - /* eof_tok = heredoc_lst->next->content; */ - /* if (!(eof_tok->type == TK_WORD)) */ - /* { */ - /* ft_dprintf(2, "{red}%s: expected word token after <<{eoc}\n", SHELL_NAME); */ - /* return (1); */ - /* } */ + if (!(heredoc_lst->next)) + { + ft_dprintf(2, "{red}%s: parse error near `\\n'{eoc}\n", SHELL_NAME); + return (1); + } + eof_tok = heredoc_lst->next->content; + if (!(eof_tok->type == TK_WORD)) + { + ft_dprintf(2, "{red}%s: expected word token after <<{eoc}\n", SHELL_NAME); + return (1); + } /* DG("heredoc contains [%s]", heredoc_tok->data); */ /* DG("heredoc ends at [%s]", eof_tok->data); */ /* DG("input is [%s]", lexer->str + lexer->pos); */ diff --git a/42sh/src/main/data_init.c b/42sh/src/main/data_init.c index 462e0902..7e1bc423 100644 --- a/42sh/src/main/data_init.c +++ b/42sh/src/main/data_init.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/28 19:26:32 by jhalford #+# #+# */ -/* Updated: 2017/03/08 13:48:27 by jhalford ### ########.fr */ +/* Updated: 2017/03/08 14:26:44 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */