-
Notifications
You must be signed in to change notification settings - Fork 0
/
checker_rotate.c
43 lines (36 loc) · 1.4 KB
/
checker_rotate.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* checker_rotate.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kristori <kristori@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/11 11:05:06 by kristori #+# #+# */
/* Updated: 2023/01/11 11:05:38 by kristori ### ########.fr */
/* */
/* ************************************************************************** */
#include "checker.h"
void ft_ra_checker(t_stack **stack_a)
{
int tmp;
tmp = stack_a[0]->data;
ft_remove_first_node(stack_a);
ft_add_last(stack_a, tmp);
}
void ft_rb_checker(t_stack **stack_b)
{
int tmp;
tmp = stack_b[0]->data;
ft_remove_first_node(stack_b);
ft_add_last(stack_b, tmp);
}
void ft_rr_checker(t_stack **stack_a, t_stack **stack_b)
{
int tmp;
tmp = stack_a[0]->data;
ft_remove_first_node(stack_a);
ft_add_last(stack_a, tmp);
tmp = stack_b[0]->data;
ft_remove_first_node(stack_b);
ft_add_last(stack_b, tmp);
}