blob: 6eb9346c484f02431d4302b21545622921226865 (
plain)
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
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_dlstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/03 15:21:38 by charles #+# #+# */
/* Updated: 2020/04/03 15:22:45 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft_dlst.h"
t_ftdlst *ft_dlstnew(void *data)
{
t_ftdlst *dlst;
if ((dlst = (t_ftdlst*)malloc(sizeof(t_ftdlst))) == NULL)
return (NULL);
dlst->prev = NULL;
dlst->next = NULL;
dlst->data = data;
return (dlst);
}
|