Push the final version
This commit is contained in:
commit
d0fe1fb2fb
28 changed files with 1459 additions and 0 deletions
26
libft/ft_lstnew.c
Executable file
26
libft/ft_lstnew.c
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lstnew.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/13 12:07:45 by rparodi #+# #+# */
|
||||
/* Updated: 2024/03/06 12:15:50 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../includes/push_swap.h"
|
||||
|
||||
t_list *ft_lstnew(int value)
|
||||
{
|
||||
t_list *new;
|
||||
|
||||
new = (t_list *) malloc(sizeof(*new));
|
||||
if (!new)
|
||||
return (NULL);
|
||||
new->value = value;
|
||||
new->index = -1;
|
||||
new->next = NULL;
|
||||
return (new);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue