-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_dlstnew.c
30 lines (26 loc) · 1.16 KB
/
ft_dlstnew.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_dlstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kakiba <kotto555555@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/10 11:33:11 by kakiba #+# #+# */
/* Updated: 2022/12/15 15:32:55 by kakiba ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
//if content is NULL OK
t_dlist *ft_dlstnew(int content)
{
t_dlist *ndptr;
ndptr = malloc(sizeof(t_dlist));
if (!ndptr)
return (NULL);
ndptr -> content = content;
ndptr -> times = 0;
ndptr -> i_done = 0;
ndptr -> prev = NULL;
ndptr -> next = NULL;
return (ndptr);
}