24 lines
1.1 KiB
C
24 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lstnew.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: grobledo <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/02/21 19:40:32 by grobledo #+# #+# */
|
|
/* Updated: 2023/02/21 22:58:42 by grobledo ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
#include "libft.h"
|
|
|
|
t_list *ft_lstnew(void *content)
|
|
{
|
|
t_list *new;
|
|
|
|
new = malloc(sizeof(t_list));
|
|
if (new == 0)
|
|
return (NULL);
|
|
new->content = content;
|
|
new->next = NULL;
|
|
return (new);
|
|
}
|