42-archive/42sh/src/exec/set_process_while.c

20 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* set_process_while.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/07 19:38:10 by wescande #+# #+# */
/* Updated: 2017/03/07 20:51:24 by wescande ### ########.fr */
/* */
/* ************************************************************************** */
#include "exec.h"
int set_process_while(t_process *p, t_btree *ast, t_cmd *cmd)
{
p->data.d_while.condition = ast_copy(ast->left);
p->data.d_while.content = ast_copy(ast->right);
return (0);
}