-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstnew.c
26 lines (23 loc) · 1.09 KB
/
ft_lstnew.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ibenaait <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/22 14:44:12 by ibenaait #+# #+# */
/* Updated: 2023/02/07 22:28:53 by ibenaait ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
t_stack *ft_lstnew(int content, int i)
{
t_stack *node;
node = malloc(sizeof(t_stack));
if (!node)
return (0);
node->num = content;
node->index = i;
node->next = NULL;
return (node);
}