49 lines
625 B
C
49 lines
625 B
C
|
|
#ifndef PUSH_SWAP_H
|
|
# define PUSH_SWAP_H
|
|
# include "libft.h"
|
|
// # include "../libft/includes/libft.h"
|
|
# include <unistd.h> // read(), write(), sleep()
|
|
# include <stdlib.h> // malloc(), free(), exit(), atoi()
|
|
|
|
|
|
typedef struct s_list
|
|
{
|
|
int n;
|
|
struct s_list *next;
|
|
} t_list;
|
|
|
|
/*
|
|
** swap
|
|
*/
|
|
int swap(t_list **list);
|
|
int sa();
|
|
int sb();
|
|
int ss();
|
|
|
|
/*
|
|
** push
|
|
*/
|
|
int push(t_list **dst, t_list **src);
|
|
int pa();
|
|
int pb();
|
|
int pp();
|
|
|
|
/*
|
|
** rotate
|
|
*/
|
|
int rotate(t_list **list);
|
|
int ra();
|
|
int rb();
|
|
int rr();
|
|
|
|
/*
|
|
** reverse rotate
|
|
*/
|
|
int reverse_rotate(t_list **list);
|
|
int rra();
|
|
int rrb();
|
|
int rrr();
|
|
|
|
#endif
|