28 lines
1.1 KiB
C
28 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lstnew.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/07/05 18:42:06 by whaffman #+# #+# */
|
|
/* Updated: 2024/07/10 16:32:16 by whaffman ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <stdlib.h>
|
|
#include "libft.h"
|
|
|
|
t_list *ft_lstnew(void *content)
|
|
{
|
|
t_list *node;
|
|
|
|
node = malloc(sizeof(t_list));
|
|
if (node)
|
|
{
|
|
node->content = content;
|
|
node->next = NULL;
|
|
}
|
|
return (node);
|
|
}
|