-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_add_next_list_cir.c
26 lines (24 loc) · 1.1 KB
/
ft_add_next_list_cir.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_add_next_list_cir.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lbopp <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/15 11:16:50 by lbopp #+# #+# */
/* Updated: 2017/02/15 11:16:52 by lbopp ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_add_next_list_cir(t_list_cir **cour, t_list_cir *new)
{
if (*cour == NULL)
*cour = new;
else
{
(*cour)->next->prev = new;
new->next = (*cour)->next;
new->prev = *cour;
(*cour)->next = new;
}
}