-
Notifications
You must be signed in to change notification settings - Fork 0
/
push_swap.h
47 lines (43 loc) · 2.05 KB
/
push_swap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kalmheir <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/31 09:04:44 by kalmheir #+# #+# */
/* Updated: 2022/06/12 16:15:25 by kalmheir ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PUSH_SWAP_H
# define PUSH_SWAP_H
# include "libft.h"
typedef struct s_stack
{
int top;
int *data;
} t_stack;
void rt(unsigned char direction, t_stack *stack);
void st(t_stack *stack);
void pt(t_stack *dest, t_stack *from);
void rr(unsigned char direction, t_stack *a, t_stack *b);
void ss(t_stack *a, t_stack *b);
void swap(int *a, int *b);
void patelsort(t_stack *stack);
unsigned char is_sorted(t_stack *stack);
void sort(t_stack *a, t_stack *b);
void stack_sort(t_stack *a, t_stack *b);
void selectsort(t_stack *a, t_stack *b);
unsigned int find_extreme(t_stack *stack, unsigned char min);
void refactor_args(int *argc, char ***argv);
void move_to_top(t_stack *stack, unsigned int index, char name);
void ft_sort_int_tab(int *tab, int size);
int *tabint(int *list, int num, int n);
char *ft_strjoinsp(char const *s1, char const *s2);
void move_until(t_stack *dest, t_stack *src, char name,
unsigned char until);
int *find_half(t_stack *stack, int *list, int chunksize, int i);
void move_closest(t_stack *dest, t_stack *src, int high, int low);
void free_my_data(t_stack *a, t_stack *b, char ***argv);
unsigned char return_no(char **rep);
#endif