diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/darray.h | 5 | ||||
-rw-r--r-- | include/hashtable.h | 1 | ||||
-rw-r--r-- | include/qsort.h | 15 |
3 files changed, 20 insertions, 1 deletions
diff --git a/include/darray.h b/include/darray.h index 2859cd4..ff592ce 100644 --- a/include/darray.h +++ b/include/darray.h @@ -5,6 +5,11 @@ extern "C" {
#endif
+#include "types.h"
+
+typedef int (*SortFunction)(const void *, const void *);
+typedef BOOL (*MapFunction)(const void *, s32);
+
typedef struct DArray {
s32 size;
s32 capacity;
diff --git a/include/hashtable.h b/include/hashtable.h index b4c0ad5..79acbf6 100644 --- a/include/hashtable.h +++ b/include/hashtable.h @@ -9,7 +9,6 @@ extern "C" { typedef s32 (*HashFunction)(void *, s32);
-
typedef struct HashTable {
DArray **chains;
s32 size;
diff --git a/include/qsort.h b/include/qsort.h new file mode 100644 index 0000000..c68b747 --- /dev/null +++ b/include/qsort.h @@ -0,0 +1,15 @@ +#ifndef POKEREVO_QSORT_H
+#define POKEREVO_QSORT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void qsort(void *base, size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_QSORT_H
|