mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-05-14 00:08:47 +02:00
「✨」 feat(libft): added a very cool feature !
This commit is contained in:
25
libft/lst/ft_lstnew.c
Normal file
25
libft/lst/ft_lstnew.c
Normal file
@ -0,0 +1,25 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lstnew.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/11 15:30:32 by adjoly #+# #+# */
|
||||
/* Updated: 2024/02/04 14:58:59 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../libft.h"
|
||||
|
||||
t_list *ft_lstnew(void *content)
|
||||
{
|
||||
t_list *lst;
|
||||
|
||||
lst = malloc(sizeof(t_list));
|
||||
if (!lst)
|
||||
return (NULL);
|
||||
lst[0].content = content;
|
||||
lst[0].next = NULL;
|
||||
return (lst);
|
||||
}
|
Reference in New Issue
Block a user