TP 13 exo1: Add libraries functions already written
[TD_C.git] / TP_13 / exo1 / lib / sort.h
index 86fd5c48d6803fe1b0b1c1d778d58f4bb745c467..57b51decddee5570580cb92e3b3c8fdcbd4f4c7f 100644 (file)
@@ -1,5 +1,14 @@
 #ifndef SORT_H
 #define SORT_H
 
+#include <stdbool.h>
+
+typedef bool(*criteria_cb)(int a, int b);
+
+/* sort criteria */
+bool ascending(int a, int b);
+bool descending(int a, int b);
+
+void sort_array(int* array, int length, criteria_cb criteria);
 
 #endif /* SORT_H */