rra fonctionne
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user