void exec_1(t_process **proc) { if (PROC->op == LIVE) ft_live(proc); else if (PROC->op == LD) ft_ld(proc); else if (PROC->op == ST) ft_st(proc); else if (PROC->op == ADD) ft_add(proc); else if (PROC->op == SUB) ft_sub(proc); else if (PROC->op == AND) ft_and(proc); else if (PROC->op == OR) ft_or(proc); else if (PROC->op == XOR) ft_xor(proc); }
int ft_opcode_tree(t_op **tmp, t_data *env, int flag) { int ret; ret = 0; (void)env; if ((*tmp)->code == 0) ret = ft_semicol(tmp, env); else if ((*tmp)->code == 1) ret = ft_and(tmp, env); else if ((*tmp)->code == 2) ret = ft_or(tmp, env); else if ((*tmp)->code == 3) ret = ft_pipe(tmp, env); else if ((*tmp)->code == 4) ret = ft_ar_lft(tmp, env); else if ((*tmp)->code == 5) ret = ft_ar_rgt(tmp, env); else if ((*tmp)->code == 6) ret = ft_db_ar_rgt(tmp, env); else if ((*tmp)->code == 7) ret = ft_db_ar_lft(tmp, env, flag); return (ret); }