26 lines
346 B
C
26 lines
346 B
C
|
|
#include "pushswap.h"
|
|
|
|
void print_result(t_list *result)
|
|
{
|
|
while (result)
|
|
{
|
|
ft_printf("%s\n", result->content);
|
|
result = result->next;
|
|
}
|
|
}
|
|
|
|
void print_stack(t_stack *stack, char c)
|
|
{
|
|
ft_printf(" %c | ", c);
|
|
while (stack)
|
|
{
|
|
ft_printf("%i", stack->n);
|
|
stack = stack->next;
|
|
if (stack)
|
|
ft_putstr(" ");
|
|
}
|
|
ft_putchar('\n');
|
|
}
|
|
|