-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_dlstnew.c
28 lines (24 loc) · 1.15 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
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_dlstnew.c :+: :+: */
/* +:+ */
/* By: jaberkro <[email protected]> +#+ */
/* +#+ */
/* Created: 2022/02/24 12:19:07 by jaberkro #+# #+# */
/* Updated: 2022/04/14 12:27:31 by jaberkro ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
t_dlist *ft_dlstnew(int value)
{
t_dlist *out;
out = malloc(sizeof(t_dlist));
if (out == NULL)
return (NULL);
out->val = value;
out->previous = NULL;
out->next = NULL;
return (out);
}
/* Make a new element that can be added to a list / creates a new list. */