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

@@ -1,6 +1,31 @@
#include "push_swap.h"
t_list *rra(t_stack **stack, t_list **lst);
t_list *rrb(t_stack **stack, t_list **lst);
t_list *rra(t_stack **stack, t_list **lst)
{
t_stack *tmp;
t_stack *before;
tmp = *stack;
if (!tmp || !(tmp->next))
return (NULL);
while (tmp->next)
{
before = tmp;
tmp = tmp->next;
}
tmp->next = *stack;
*stack = tmp;
before->next = NULL;
fill_solution(*lst, ft_strdup("rra"));
return (NULL);
}
t_list *rrb(t_stack **stack, t_list **lst)
{
t_stack *tmp;
tmp = *stack;
return (NULL);
}
t_list *rrr(t_stack **a, t_stack **b, t_list **lst);