-
Notifications
You must be signed in to change notification settings - Fork 0
/
pushfunctions.c
33 lines (30 loc) · 1.17 KB
/
pushfunctions.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pushfunctions.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gotunc <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/09/05 19:09:30 by gotunc #+# #+# */
/* Updated: 2023/09/06 01:28:15 by gotunc ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void pusha(t_list *data)
{
ft_downone_a(data);
data->lena++;
data->a[0] = data->b[0];
ft_upone_b(data);
data->lenb--;
print("pa\n");
}
void pushb(t_list *data)
{
ft_downone_b(data);
data->lenb++;
data->b[0] = data->a[0];
ft_upone_a(data);
data->lena--;
print("pb\n");
}