-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsa.c
26 lines (23 loc) · 1.09 KB
/
sa.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* sa.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ebeiline <ebeiline@42wolfsburg.de> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/13 14:20:13 by ebeiline #+# #+# */
/* Updated: 2021/11/19 15:14:47 by ebeiline ### ########.fr */
/* */
/* ************************************************************************** */
#include "pushswap.h"
void ft_sa(t_list **lst, t_list **commands)
{
t_list *tmp;
if (*lst)
{
tmp = (*lst)->next;
(*lst)->next = (*lst)->next->next;
ft_lstadd_front(lst, tmp);
ft_lstadd(commands, "sa");
}
}