mirror of
https://github.com/Ladebeze66/libft.git
synced 2025-12-13 04:36:55 +01:00
26 lines
1.1 KiB
C
Executable File
26 lines
1.1 KiB
C
Executable File
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lstnew.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/02/22 17:09:25 by fgras-ca #+# #+# */
|
|
/* Updated: 2023/11/14 17:06:38 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
t_list *ft_lstnew(void *content)
|
|
{
|
|
t_list *new;
|
|
|
|
new = malloc(sizeof(t_list));
|
|
if (!new)
|
|
return (0);
|
|
new->content = content;
|
|
new->next = 0;
|
|
return (new);
|
|
}
|