28 lines
1.1 KiB
C
28 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lstnew.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: tosuman <timo42@proton.me> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/06/09 14:55:31 by tosuman #+# #+# */
|
|
/* Updated: 2023/06/24 17:36:37 by tosuman ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
t_list *ft_lstnew(void *content)
|
|
{
|
|
t_list *new;
|
|
|
|
new = malloc(sizeof(*new));
|
|
if (!new)
|
|
return (0);
|
|
new->content = content;
|
|
new->next = (void *)0;
|
|
return (new);
|
|
}
|