rra fonctionne

This commit is contained in:
hugogogo
2021-06-15 17:02:15 +02:00
parent dc99227f94
commit 9842a20f6e
14 changed files with 58 additions and 12 deletions

View File

@@ -9,7 +9,7 @@
void is_valid(int ac, char **av)
{
if (ac < 2)
ps_stop(NULL, NULL, NULL, 1);
ps_stop(NULL, NULL, 1);
(void)av;
// check more error
}
@@ -39,7 +39,7 @@ t_stack *init_stack(int ac, char **av)
while (--ac)
{
if (!(start = ft_calloc(1, sizeof(t_stack))))
ps_stop(start, NULL, NULL, 2);
ps_stop(NULL, NULL, 2);
start->n = ft_atoi(av[ac]);
start->next = tmp;
tmp = start;
@@ -90,5 +90,6 @@ int main(int ac, char **av)
stack = init_stack(ac, av);
result = launch_algo(stack);
print_result(result, flag);
ps_stop(NULL, result, 0);
return(0);
}