42-archive/42sh/src/exec/pset_case.c
2017-03-23 00:32:41 +01:00

22 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pset_case.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/07 20:36:04 by wescande #+# #+# */
/* Updated: 2017/03/23 00:31:39 by ariard ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int pset_case(t_process *p, t_btree *ast)
{
p->data.d_case.token = ft_ld_copy(((t_astnode *)ast->item)->data.cmd.token,
tab_esc_copy);
p->data.d_case.content = btree_map(ast->right, &node_copy);
p->type = PROCESS_CASE;
return (0);
}