TP 13 exo1: Give more explicits name to callbacks
[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(*s_criteria_cb)(int a, int b);
7
8/* sort criteria */
9bool ascending(int a, int b);
10bool descending(int a, int b);
11bool ascending_and_even(int a, int b);
12bool ascending_and_odd(int a, int b);
13
14void sort_bubble_array(int* array, unsigned length, s_criteria_cb sort_criteria);
15
16#endif /* SORT_H */