void morc_tri_r(t_all *res, int debut, int fin, int base) { int i; int ind; i = debut; ind = 0; while (i++ <= fin) if (res->a->pile[res->a->len - 1] < base) push_b(res); else { if (res->a->pile[res->a->len - 1] == base) { push_b(res); rotate_b(res); } else { rotate_a(res); ind++; } } if ((fin - debut) != (res->a->len + res->b->len - 1)) while (ind-- > 0) reverse_rotate_a(res); reverse_rotate_b(res); }
void reverse_rotate_r(t_env *env, t_flags *flag) { reverse_rotate_a(env, flag); reverse_rotate_b(env, flag); env->count -= 1; ft_putstr("\033[35mrrr \033[37m"); if (flag->v == 1) stack_status(env); }