leaks and leaks with errors should be ok
This commit is contained in:
@@ -4,22 +4,22 @@ void ps_error(int err)
|
||||
{
|
||||
if (err == 1)
|
||||
ft_printf("usage :\nlaunch executable : ./push_swap [flag -p] nb nb nb nb nb ...\n");
|
||||
if (err == 2)
|
||||
if (err >= 2)
|
||||
ft_putstr_fd("Error\n", 2);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/*
|
||||
** if err < 0, the parameter list is just a t_stack *list
|
||||
** if err = 0, the list are freed but the program doesn't stop
|
||||
** if err > 0, a message is printed and the program stop
|
||||
** if err = 1, 2 or 3, a message is printed and the program stop
|
||||
** if err = 3, the parameter list is just a t_stack *list
|
||||
*/
|
||||
void ps_stop(t_list *lst, int err)
|
||||
{
|
||||
t_stack **a;
|
||||
t_stack **b;
|
||||
|
||||
if (err < 0)
|
||||
if (err == 3)
|
||||
ft_lstclear(&lst, NULL);
|
||||
else if (lst)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user