41 lines
1.5 KiB
C
41 lines
1.5 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* push_swap.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2019/02/21 14:13:53 by tmaze #+# #+# */
|
|
/* Updated: 2019/02/21 16:05:33 by tmaze ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef PUSH_SWAP_H
|
|
# define PUSH_SWAP_H
|
|
|
|
# include <stdlib.h>
|
|
# include <unistd.h>
|
|
# include "libft.h"
|
|
|
|
typedef struct s_stack
|
|
{
|
|
int nb;
|
|
struct s_stack *next;
|
|
} t_stack;
|
|
|
|
t_stack *ps_stknew(int nb);
|
|
void *ps_stkpsh(t_stack **s, t_stack *new);
|
|
t_stack *ps_stkpop(t_stack **s);
|
|
|
|
size_t ps_stksize(t_stack *s);
|
|
|
|
void ps_swap(t_stack **s);
|
|
void ps_sswap(t_stack **a, t_stack **b);
|
|
void ps_push(t_stack **s1, t_stack **s2);
|
|
void ps_rot(t_stack **s);
|
|
void ps_rrot(t_stack **a, t_stack **b);
|
|
void ps_rerot(t_stack **s);
|
|
void ps_rrerot(t_stack **a, t_stack **b);
|
|
|
|
#endif
|