hewow owo
added header, libft and all basic interactions with stack
This commit is contained in:
40
includes/push_swap.h
Normal file
40
includes/push_swap.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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
|
Reference in New Issue
Block a user