Move callback functions into the same file
[TD_C.git] / TP_13 / exo1 / lib / sort.h
... / ...
CommitLineData
1#ifndef SORT_H
2#define SORT_H
3
4#include <stdbool.h>
5
6typedef bool(*c_criteria_cb)(int a);
7
8bool is_even(int a);
9bool is_odd(int a);
10
11typedef bool(*s_criteria_cb)(int a, int b);
12
13/* sort criteria */
14bool ascending(int a, int b);
15bool descending(int a, int b);
16bool ascending_and_even(int a, int b);
17bool ascending_and_odd(int a, int b);
18
19void sort_bubble_array(int* array, unsigned length, s_criteria_cb sort_criteria);
20
21#endif /* SORT_H */