Push libft
125/100 corrected the 14/11/23
This commit is contained in:
commit
7bd66aee5b
45 changed files with 1462 additions and 0 deletions
26
ft_lstnew.c
Normal file
26
ft_lstnew.c
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lstnew.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/12 11:44:02 by rparodi #+# #+# */
|
||||
/* Updated: 2023/11/12 14:25:12 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue