-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_operations.c
45 lines (39 loc) · 1.39 KB
/
run_operations.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
44
45
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* run_operations.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zhlim <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/08/01 17:16:11 by zhlim #+# #+# */
/* Updated: 2023/08/05 14:35:10 by zhlim ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void single_swap(t_list **stack, char *str)
{
swap(stack);
ft_printf(str);
}
void double_swap(t_list **stack_a, t_list **stack_b, char *str)
{
swap(stack_a);
swap(stack_b);
ft_printf(str);
}
void single_rotate(t_list **stack, char *str)
{
rotate(stack);
ft_printf(str);
}
void double_rotate(t_list **stack_a, t_list **stack_b, char *str)
{
rotate(stack_a);
rotate(stack_b);
ft_printf(str);
}
void single_reverse_rotate(t_list **stack, char *str)
{
reverse_rotate(stack);
ft_printf(str);
}