Updating built in Io code to use += instead of x = x + y
[io/quag.git] / libs / basekit / source / Sorting.h
blob1e306fff55881fae80c383eedf5eed0091d715c1
1 #include "Common.h"
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
7 /*
8 The reason for using this instead of C's qsort is
9 that we need more context information than just the
10 two objects if we want to do something like use an
11 Io block to do the comparison and using globals is
12 unacceptable for several reasons.
15 typedef enum
17 SDQuickSort
18 //SDShellSort
19 } SDSortType;
21 typedef int (SDSortCompareCallback)(void *context, int i, int j);
22 typedef void (SDSortSwapCallback)(void *context, int i, int j);
24 BASEKIT_API void Sorting_context_comp_swap_size_type_(void *context,
25 SDSortCompareCallback *comp,
26 SDSortSwapCallback *swap,
27 size_t size,
28 SDSortType type);
30 #ifdef __cplusplus
32 #endif