-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstructions2.c
More file actions
50 lines (46 loc) · 1.46 KB
/
instructions2.c
File metadata and controls
50 lines (46 loc) · 1.46 KB
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
46
47
48
49
50
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* instructions2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aelmsafe <aelmsafe@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/09 18:38:06 by aelmsafe #+# #+# */
/* Updated: 2025/03/06 00:37:02 by aelmsafe ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void ss(t_dlist_t **a, t_dlist_t **b)
{
swap(a, 'c');
swap(b, 'c');
write(1, "ss\n", 3);
}
void rr(t_dlist_t **a, t_dlist_t **b)
{
rotate(a, 'c');
rotate(b, 'c');
write(1, "rr\n", 3);
}
void rrr(t_dlist_t **a, t_dlist_t **b)
{
reverse_rotate(a, 'c');
reverse_rotate(b, 'c');
write(1, "rrr\n", 4);
}
/*#include <stdio.h>
void print_stack(t_dlist_t *stack, char c)
{
if (stack == NULL)
printf("\n -------- There's no stack! --------\n");
else
{
printf("\n Stack %c\n", c);
while (stack)
{
printf("%d\n", stack->data);
stack = stack->next;
}
}
}
*/