mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 00:41:57 +00:00
adding the flags
This commit is contained in:
@@ -21,3 +21,12 @@ void stack_clear_all(t_stack *stack, t_stack *first)
|
||||
stack_clear_all(stack->next, first);
|
||||
free(stack);
|
||||
}
|
||||
|
||||
void free_all(t_stacks *piles)
|
||||
{
|
||||
if (piles->a)
|
||||
stack_clear_all(piles->a, piles->a);
|
||||
if (piles->b)
|
||||
stack_clear_all(piles->b, piles->b);
|
||||
free(piles);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user