diff options
Diffstat (limited to 'libft/src/dlst/ft_dlstnew.c')
| -rw-r--r-- | libft/src/dlst/ft_dlstnew.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libft/src/dlst/ft_dlstnew.c b/libft/src/dlst/ft_dlstnew.c new file mode 100644 index 0000000..6eb9346 --- /dev/null +++ b/libft/src/dlst/ft_dlstnew.c @@ -0,0 +1,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); +} |
