-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_stacks.c
More file actions
22 lines (20 loc) · 1.16 KB
/
init_stacks.c
File metadata and controls
22 lines (20 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* :::::::: */
/* init_stacks.c :+: :+: */
/* +:+ */
/* By: lsmienk <lsmienk@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2020/01/03 13:35:38 by lsmienk #+# #+# */
/* Updated: 2020/01/03 13:36:07 by lsmienk ######## odam.nl */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void init_stacks(t_setting *set, int argc)
{
set->a = (t_stack *)malloc(sizeof(t_stack));
set->b = (t_stack *)malloc(sizeof(t_stack));
set->a->stack = (int *)malloc(sizeof(int) * (argc));
set->b->stack = (int *)ft_memalloc(sizeof(int) * (argc));
set->b->len = 0;
}