diff --git a/42sh/src/builtin/builtin_func.c b/42sh/src/builtin/builtin_func.c index 81353fec..48a6efdd 100644 --- a/42sh/src/builtin/builtin_func.c +++ b/42sh/src/builtin/builtin_func.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/24 15:03:02 by wescande #+# #+# */ -/* Updated: 2017/03/24 17:04:11 by gwojda ### ########.fr */ +/* Updated: 2017/03/24 17:11:50 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_bquote.c b/42sh/src/lexer/lexer_bquote.c index c2749334..ff9fff8c 100644 --- a/42sh/src/lexer/lexer_bquote.c +++ b/42sh/src/lexer/lexer_bquote.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 22:03:48 by jhalford #+# #+# */ -/* Updated: 2017/03/23 15:17:27 by jhalford ### ########.fr */ +/* Updated: 2017/03/24 17:02:40 by wescande ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,10 +25,8 @@ int lexer_bquote(t_list **alst, t_lexer *lexer) if (get_lexer_stack(*lexer) != BQUOTE) push(&lexer->stack, lexer->state); else - { lexer->state = pop(&lexer->stack) && get_lexer_stack(*lexer) == DQUOTE ? DQUOTE : DEFAULT; - } } else if (lexer->str[lexer->pos] == '\\' && (back = 1)) { diff --git a/42sh/src/main/shell_init.c b/42sh/src/main/shell_init.c index 16844a6f..c1882171 100644 --- a/42sh/src/main/shell_init.c +++ b/42sh/src/main/shell_init.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/12 17:23:59 by jhalford #+# #+# */ -/* Updated: 2017/03/24 15:12:31 by jhalford ### ########.fr */ +/* Updated: 2017/03/24 17:05:29 by wescande ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,10 +29,9 @@ int get_c_arg(char ***av, t_data *data) return (0); } -static int get_input_fd(t_data *data) +static int get_input_fd(t_data *data, char *file) { static int fds[2] = {-1, STDIN}; - char *file; struct stat buf; if (data->opts & SH_OPTS_LC && (file = data->c_arg)) @@ -94,7 +93,7 @@ int shell_init(int ac, char **av) } if (!isatty(STDIN) || *data->av_data) data->opts &= ~(SH_INTERACTIVE | SH_OPTS_JOBC); - if ((data->fd = get_input_fd(data)) < 0) + if ((data->fd = get_input_fd(data, NULL)) < 0) return (-1); if (SH_IS_INTERACTIVE(data->opts) && interactive_settings() < 0) return (-1);