Merge branch 'master' of https://github.com/jzck/42sh
This commit is contained in:
commit
d2add7891e
3 changed files with 5 additions and 6 deletions
|
|
@ -6,14 +6,14 @@
|
|||
# By: wescande <wescande@student.42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2016/08/29 21:32:58 by wescande #+# #+# #
|
||||
# Updated: 2017/03/27 03:12:30 by ariard ### ########.fr #
|
||||
# Updated: 2017/03/27 15:09:22 by ariard ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
NAME = 42sh
|
||||
|
||||
CC = gcc
|
||||
FLAGS = -Wall -Wextra -Werror #-fsanitize=address
|
||||
FLAGS = -Wall -Wextra -Werror -fsanitize=address
|
||||
D_FLAGS = -g
|
||||
|
||||
DELTA = $$(echo "$$(tput cols)-47"|bc)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2017/03/07 20:33:45 by wescande #+# #+# */
|
||||
/* Updated: 2017/03/22 22:10:26 by ariard ### ########.fr */
|
||||
/* Updated: 2017/03/27 15:05:49 by ariard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -26,6 +26,7 @@ int exec_case_branch(t_btree **ast)
|
|||
if (av && (ft_strcmp(av[0], ((char **)exec->case_pattern)[0]) == 0))
|
||||
{
|
||||
exec->attrs |= EXEC_CASE_BRANCH;
|
||||
ft_tabdel(&exec->case_pattern);
|
||||
ft_exec(&(*ast)->right);
|
||||
}
|
||||
ft_tabdel(&av);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2017/03/07 19:02:23 by wescande #+# #+# */
|
||||
/* Updated: 2017/03/27 03:47:36 by ariard ### ########.fr */
|
||||
/* Updated: 2017/03/27 15:06:42 by ariard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -18,8 +18,6 @@ int plaunch_case(t_process *p)
|
|||
|
||||
exec = &data_singleton()->exec;
|
||||
exec->attrs &= ~EXEC_CASE_BRANCH;
|
||||
if (exec->case_pattern && *exec->case_pattern)
|
||||
ft_tabdel(&exec->case_pattern);
|
||||
exec->case_pattern = token_to_argv(p->data.d_case.token, 1);
|
||||
ft_exec(&p->data.d_case.content);
|
||||
ft_tabdel(&exec->case_pattern);
|
||||
|
|
|
|||
Loading…
Reference in a new issue