-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush_swap.h
More file actions
50 lines (46 loc) · 2 KB
/
Copy pathpush_swap.h
File metadata and controls
50 lines (46 loc) · 2 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mdamouh <mdamouh@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/10 15:47:17 by mdamouh #+# #+# */
/* Updated: 2026/01/08 11:40:42 by mdamouh ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PUSH_SWAP_H
# define PUSH_SWAP_H
# include "ft_printf/ft_printf.h"
# include "libft/libft.h"
void sb(t_stack **stack);
void pa(t_stack **stackb, t_stack **stacka);
void pb(t_stack **stacka, t_stack **stackb);
void ra(t_stack **stack);
void rb(t_stack **stack);
void sa(t_stack **stack);
t_stack *ft_parse(int ac, char **av);
int *stack_to_sorted_array(t_stack *stack, int size);
int ft_lenlst(t_stack *lst);
void indexing(t_stack **stack, int *sorted, int size);
int get_chunk_size(int size);
void rra(t_stack **stack);
void rrb(t_stack **stack);
int ft_isdigit(int c);
int is_inchunk(int index, int start, int end);
int count_inchunk(t_stack *stack, int start, int end);
int get_max(t_stack *stack);
int is_sorted(t_stack *a);
int is_repeated(t_stack *stack);
void stack_frier(t_stack **stack);
void small_sort(t_stack *stack, t_stack *stackb, int size);
//bonus
void ss(t_stack **a, t_stack **b);
void rr(t_stack **a, t_stack **b);
void rrr(t_stack **a, t_stack **b);
//parsing
int ft_is_space(char c);
void error_exit(void);
int handle_overflow(int sign, long *result, char *s);
void free_split(char **split, int *numbers);
#endif