-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrabin.c
25 lines (23 loc) · 1.14 KB
/
rabin.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rabin.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yst-laur <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/09 22:35:48 by yst-laur #+# #+# */
/* Updated: 2022/03/09 22:35:51 by yst-laur ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void rabin(char **stack_a)
{
char *temp;
int stack_a_size;
stack_a_size = strstack_size(stack_a);
temp = ft_strdup(stack_a[0]);
binshiftup(stack_a, stack_a_size);
ft_strcpy(stack_a[stack_a_size - 1], temp);
write(1, "ra\n", 3);
free(temp);
}