- The documentation on the header allow u to see on the files where the header is inclued
27 lines
1.1 KiB
C
27 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lstnew.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/11/12 11:44:02 by rparodi #+# #+# */
|
|
/* Updated: 2025/09/05 16:14:05 by rparodi ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "list.h"
|
|
#include <stdlib.h>
|
|
|
|
t_list *ft_lstnew(void *content)
|
|
{
|
|
t_list *to_return;
|
|
|
|
to_return = NULL;
|
|
to_return = (t_list *)malloc(sizeof(t_list));
|
|
if (!to_return)
|
|
return (NULL);
|
|
to_return->content = content;
|
|
to_return->next = NULL;
|
|
return (to_return);
|
|
}
|