32 lines
1.1 KiB
C
32 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_rr.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/11/28 16:50:03 by cchauvet #+# #+# */
|
|
/* Updated: 2022/12/09 18:38:14 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "pushswap.h"
|
|
|
|
static void ft_rr(unsigned int *tab)
|
|
{
|
|
int i;
|
|
|
|
i = ft_tablen(tab) - 1;
|
|
while (i > 0)
|
|
{
|
|
ft_swap(tab + i - 1, tab + i);
|
|
i--;
|
|
}
|
|
}
|
|
|
|
void ft_rra(unsigned int *tab)
|
|
{
|
|
ft_rr(tab);
|
|
ft_putstr("rra\n");
|
|
}
|