-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpb.c
26 lines (23 loc) · 1.1 KB
/
pb.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pb.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ebeiline <ebeiline@42wolfsburg.de> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/13 14:42:06 by ebeiline #+# #+# */
/* Updated: 2021/11/15 15:18:11 by ebeiline ### ########.fr */
/* */
/* ************************************************************************** */
#include "pushswap.h"
void ft_pb(t_list **src, t_list **dst, t_list **commands)
{
t_list *tmp;
if (*src)
{
tmp = ft_lstnew((*src)->content);
ft_lstadd_front(dst, tmp);
ft_delete_head(src);
ft_lstadd(commands, "pb");
}
}