petite mise en avant des fonctions print test
This commit is contained in:
32
srcs/stop.c
32
srcs/stop.c
@@ -1,6 +1,31 @@
|
||||
|
||||
#include "push_swap.h"
|
||||
|
||||
void print_test(t_list *lst, char *s)
|
||||
{
|
||||
t_stack **tmpa;
|
||||
t_stack **tmpb;
|
||||
t_stack *a;
|
||||
t_stack *b;
|
||||
|
||||
tmpa = lst->content;
|
||||
tmpb = lst->next->content;
|
||||
a = *tmpa;
|
||||
b = *tmpb;
|
||||
ft_printf("%s -> a: %12i . %12i . ", s, tmpa, a);
|
||||
if (a)
|
||||
ft_printf("%12i", a->n);
|
||||
else
|
||||
ft_printf(" NULL");
|
||||
ft_printf(" | b: %12i . %12i . ", tmpb, b);
|
||||
if (b)
|
||||
ft_printf("%12i \n", b->n);
|
||||
else
|
||||
ft_printf(" NULL\n");
|
||||
|
||||
//ft_printf("%s -> a: %i , %i , %i / b: %i , %i, %i \n", s, tmpa, a, a->n, tmpb, b, b->n);
|
||||
}
|
||||
|
||||
void ps_usage(void)
|
||||
{
|
||||
ft_printf("usage :\n");
|
||||
@@ -36,7 +61,7 @@ void ps_stop(t_stack *stack, t_list *lst, int err)
|
||||
(void)solution;
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
t_list *tmp;
|
||||
t_stack **aa;
|
||||
t_stack **bb;
|
||||
@@ -67,9 +92,10 @@ void ps_stop(t_stack *stack, t_list *lst, int err)
|
||||
}
|
||||
(void)a;
|
||||
(void)b;
|
||||
*/
|
||||
*/
|
||||
|
||||
print_test(lst, "ps_stop ");
|
||||
|
||||
print_test(lst, "ps_stop ");
|
||||
if (err < 0)
|
||||
return ;
|
||||
else if (err > 0)
|
||||
|
||||
Reference in New Issue
Block a user