20 lines
491 B
C
20 lines
491 B
C
|
#include <lcthw/darray_algos.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <bsd/stdlib.h>
|
||
|
|
||
|
int DArray_qsort(DArray *array, DArray_compare cmp)
|
||
|
{
|
||
|
qsort(array->contents, DArray_count(array), sizeof(void *), cmp);
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
int DArray_heapsort(DArray *array, DArray_compare cmp)
|
||
|
{
|
||
|
return heapsort(array->contents, DArray_count(array), sizeof(void *), cmp);
|
||
|
}
|
||
|
|
||
|
int DArray_mergesort(DArray *array, DArray_compare cmp)
|
||
|
{
|
||
|
return mergesort(array->contents, DArray_count(array), sizeof(void *), cmp);
|
||
|
}
|