-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_swap_b.c
29 lines (25 loc) · 1.15 KB
/
ft_swap_b.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_swap_b.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dlana <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/09/29 20:24:49 by dlana #+# #+# */
/* Updated: 2021/09/30 21:04:33 by dlana ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void ft_swap_b(t_point *points)
{
t_list *cut_list;
t_list *p_next;
if (points->count_b > 1)
{
ft_cut_list(&cut_list, &points->b);
p_next = points->b->next;
ft_paste_list(&cut_list, &p_next);
if (points->checker == 0)
write (1, "sb\n", 3);
}
}