-
Notifications
You must be signed in to change notification settings - Fork 0
/
push.c
33 lines (28 loc) · 1.23 KB
/
push.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kristori <kristori@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/19 15:44:49 by kristori #+# #+# */
/* Updated: 2022/12/20 13:24:26 by kristori ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void ft_pa(t_stack **stack_a, t_stack **stack_b)
{
int tmp;
tmp = stack_b[0]->data;
ft_remove_first_node(stack_b);
ft_add_first(stack_a, tmp);
write(1, "pa\n", 3);
}
void ft_pb(t_stack **stack_a, t_stack **stack_b)
{
int tmp;
tmp = stack_a[0]->data;
ft_remove_first_node(stack_a);
ft_add_first(stack_b, tmp);
write(1, "pb\n", 3);
}