push_swap/includes/push_swap.h
Tanguy MAZE 62764dc5e7 the week-end party goes on \o\ /o/
finished transition to t_psdata format
corrected some pointer formating
started testing on parser function:
	- weird valgrind errors about uninitialised values
	- some read/write/free errors still hanging around

** END TRANSMISSION **
2019-02-24 18:15:56 +01:00

51 lines
1.6 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/21 14:13:53 by tmaze #+# #+# */
/* Updated: 2019/02/24 14:56:19 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PUSH_SWAP_H
# define PUSH_SWAP_H
# include <stdlib.h>
# include <unistd.h>
# include "libft.h"
#include <stdio.h>
typedef struct s_stack
{
int nb;
struct s_stack *next;
} t_stack;
typedef struct s_psdata
{
t_stack *a;
t_stack *b;
size_t size_a;
size_t size_b;
t_list *op;
} t_psdata;
t_stack *ps_stknew(int nb);
void ps_stkpsh(t_psdata *data, char c, t_stack *new);
t_stack *ps_stkpop(t_psdata *data, char c);
void ps_stkclean(t_psdata *data);
void ps_swap(t_psdata *data, char c);
void ps_sswap(t_psdata *data);
void ps_push(t_psdata *data, char c);
void ps_rot(t_psdata *data, char c);
void ps_rrot(t_psdata *data);
void ps_rerot(t_psdata *data, char c);
void ps_rrerot(t_psdata *data);
#endif