-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush_swap.h
62 lines (53 loc) · 2 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dlana <dlana@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/09/29 20:20:07 by dlana #+# #+# */
/* Updated: 2021/10/02 13:48:47 by dlana ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PUSH_SWAP_H
# define PUSH_SWAP_H
# include <limits.h>
# include <stdlib.h>
# include <unistd.h>
typedef struct s_list
{
int id_new;
int numb;
struct s_list *next;
struct s_list *prev;
} t_list;
typedef struct s_point
{
int need_sort;
int checker;
int count_a;
int count_b;
t_list *a;
t_list *b;
t_list *empty_list;
} t_point;
void ft_parser(t_point *points, char **argc, int count);
void ft_error(void);
void ft_create_a(t_point *points, int numb, int i);
void ft_swap_a(t_point *points);
void ft_swap_b(t_point *points);
void ft_swap_a_and_b(t_point *points);
void ft_push_a(t_point *points);
void ft_push_b(t_point *points);
void ft_rotate_a(t_point *points);
void ft_rotate_b(t_point *points);
void ft_rotate_a_and_b(t_point *points);
void ft_reverse_rotate_a(t_point *points);
void ft_reverse_rotate_b(t_point *points);
void ft_reverse_rotate_a_and_b(t_point *points);
void ft_cut_list(t_list **cut_list, t_list **p_to_struct);
void ft_paste_list(t_list **paste_list, t_list **stack);
void ft_sort_array(t_point *points);
void ft_sort_long_list(t_point *points);
void ft_sort_short_list(t_point *points);
#endif