-
Notifications
You must be signed in to change notification settings - Fork 0
/
push_swap.h
49 lines (43 loc) · 1.66 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lbrandy <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/06/20 15:49:52 by lbrandy #+# #+# */
/* Updated: 2021/06/30 17:44:04 by lbrandy ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PUSH_SWAP_H
# define PUSH_SWAP_H
#include <stdio.h>
typedef struct s_num
{
int numeric;
int index;
int keep_in_stack;
} t_num;
typedef struct s_stacks
{
t_num *stack_a;
t_num *stack_b;
int top_a;
int top_b;
} t_stacks;
void sa(t_num *stack_a, int top_a);
void pa(t_stacks *stacks);
void ra(t_num *stack_a, int top_a);
void rra(t_num *stack_a, int top_a);
void sb(t_num *stack_b, int top_b);
void pb(t_stacks* stacks);
void rb(t_num *stack_b, int top_b);
void rrb(t_num *stack_b, int top_b);
void ss(t_stacks *stacks);
void rr(t_stacks *stacks);
void rrr(t_stacks *stacks);
int greater_count(t_num *stack_a, int top_a, int i);
int markup_greater(t_num *stack_a, int top_a);
void markup_index(t_num *stack_a, int top_a);
int index_count(t_num *stack_a, int top_a, int i);
#endif