Files
42_INT_06_pushwap/includes/pushswap.h
2021-06-11 20:56:15 +02:00

80 lines
962 B
C

#ifndef PUSH_SWAP_H
# define PUSH_SWAP_H
# include "../libft/includes/libft.h"
# include <unistd.h> // read(), write(), sleep()
# include <stdlib.h> // malloc(), free(), exit(), atoi()
typedef struct s_stack
{
int n;
struct s_stack *next;
} t_stack;
/*
** pushswap.c
*/
void is_valid(int ac, char **av);
t_stack *init_stack(int ac, char **av);
/*
** stop.c
*/
void ps_usage(void);
void ps_error(int err);
void ps_stop(t_stack *stb, t_stack *sta, t_list *lst, int i);
/*
** algo.c
*/
t_list *sort_algo(t_stack *stack);
/*
** print.c
*/
void print_stack(t_stack *stack);
/*
** swap
*/
/*
int swap(t_list **list);
void sa();
void sb();
void 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