/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* push_swap.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: gechavia +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/09/04 17:36:00 by gechavia #+# #+# */ /* Updated: 2025/09/04 17:36:26 by gechavia ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef PUSH_SWAP_H # define PUSH_SWAP_H # include # include # include typedef struct s_stack { int *array; int size; int capacity; } t_stack; void init_stacks(t_stack *a, t_stack *b); void error_exit(t_stack *a, t_stack *b); int parse_and_validate(char **argv, t_stack *a, t_stack *b); void free_stacks(t_stack *a, t_stack *b); int has_duplicates(t_stack *a); void write_op(const char *s); void normalize_stack(t_stack *a); void swap(t_stack *s); void push(t_stack *from, t_stack *to); void rotate(t_stack *s); void rrotate(t_stack *s); void sort_three(t_stack *a); void sort_five(t_stack *a, t_stack *b); void sort_stack(t_stack *a, t_stack *b); #endif