adding the flags

This commit is contained in:
Maoake Teriierooiterai
2026-01-07 13:13:30 +01:00
parent 0d9b46c748
commit 93e8c10b27
8 changed files with 134 additions and 1 deletions

View File

@@ -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);
}