-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_dlstinsert.c
27 lines (23 loc) · 1.12 KB
/
ft_dlstinsert.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_dlstinsert.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lrocigno <lrocigno@student.42sp.org.br> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/06 16:46:41 by lrocigno #+# #+# */
/* Updated: 2021/11/08 14:17:28 by lrocigno ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** Insert one item above the current one.
*/
void ft_dlstinsert(void *content, t_dlist *d_list)
{
t_dlist *insert;
insert = ft_dlstnew(content);
insert->next = d_list;
insert->prev = d_list->prev;
d_list->prev = insert;
}