Commit | Line | Data |
---|---|---|
fac749d5 JB |
1 | #ifndef ARRAY_H |
2 | #define ARRAY_H | |
3 | ||
889d5862 JB |
4 | #include <stdbool.h> |
5 | ||
884e9557 JB |
6 | #include "sort.h" |
7 | ||
210f7f05 | 8 | typedef bool(*c_criteria_cb)(int a); |
889d5862 JB |
9 | |
10 | bool is_even(int a); | |
11 | bool is_odd(int a); | |
12 | ||
34f864c6 | 13 | int* create_tab(int tab[], unsigned tab_size); |
e4001676 | 14 | void free_tab(int tab[]); |
475ee86d | 15 | int* concat_tab(int tab1[], unsigned tab_size1, int tab2[], unsigned tab_size2); |
59941dc1 | 16 | int* resize_tab(int tab[], unsigned old_tab_size, unsigned new_tab_size); |
889d5862 | 17 | unsigned count_tab_element(int tab[], unsigned tab_size, int element); |
210f7f05 JB |
18 | unsigned count_tab_criteria(int tab[], unsigned tab_size, c_criteria_cb c_criteria); |
19 | void sort_tab(int tab[], unsigned tab_size, s_criteria_cb sort_criteria); | |
33b9c646 | 20 | |
fac749d5 | 21 | #endif /* ARRAY_H */ |