diff options
Diffstat (limited to 'lib/libc/stdlib/heapsort.c')
-rw-r--r-- | lib/libc/stdlib/heapsort.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/stdlib/heapsort.c b/lib/libc/stdlib/heapsort.c index 16c1bfe..3f4a894 100644 --- a/lib/libc/stdlib/heapsort.c +++ b/lib/libc/stdlib/heapsort.c @@ -138,6 +138,12 @@ typedef DECLARE_BLOCK(int, heapsort_block, const void *, const void *); } \ } +#ifdef I_AM_HEAPSORT_B +int heapsort_b(void *vbase, size_t nmemb, size_t size, heapsort_block compar); +#else +int heapsort(void *vbase, size_t nmemb, size_t size, + int (*compar)(const void *, const void *)); +#endif /* * Heapsort -- Knuth, Vol. 3, page 145. Runs in O (N lg N), both average * and worst. While heapsort is faster than the worst case of quicksort, |