-
Notifications
You must be signed in to change notification settings - Fork 0
/
ops_push.c
37 lines (32 loc) · 1.21 KB
/
ops_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
34
35
36
37
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ops_push.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mehkekli <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/04 15:13:33 by mehkekli #+# #+# */
/* Updated: 2024/01/04 15:13:35 by mehkekli ### ########.fr */
/* */
/* ************************************************************************** */
#include "lib/libft/libft.h"
static void ft_push(t_list **src, t_list **dst)
{
t_list *tmp;
if (!src || !*src)
return ;
tmp = *src;
*src = (*src)->next;
tmp->next = *dst;
*dst = tmp;
}
void ft_pa(t_list **a, t_list **b)
{
ft_push(b, a);
ft_printf("pa\n");
}
void ft_pb(t_list **a, t_list **b)
{
ft_push(a, b);
ft_printf("pb\n");
}