diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-10-02 19:24:58 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-10-02 19:24:58 +0200 |
commit | 3db384424bd7398ffbb7a355cab8f15f3add009f (patch) | |
tree | 4536961c62454aca3ac87ee88229e4d20c0d44fa /h/sort.h | |
parent | d479dd1aab1c1cb907932c6595b0ef33523fc797 (diff) |
New upstream version 1.9.1+repackupstream/1.9.1+repack
Diffstat (limited to 'h/sort.h')
-rw-r--r-- | h/sort.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,4 +1,6 @@ +#ifndef SORT_H + /* * Copyright 1996 - 2010 Graeme W. Gill * All rights reserved. @@ -7,13 +9,17 @@ * see the License2.txt file for licencing details. */ +#ifdef __cplusplus + extern "C" { +#endif + /* * Heapsort macro - sort smallest to largest. * Heapsort is guaranteed nlogn, doesn't need any * extra storage, but often isn't as fast as quicksort. */ -/* Need to #define HEAP_COMPARE(A,B) so it returns true if A < B */ +/* To sort ascenting, need to #define HEAP_COMPARE(A,B) so it returns true if A < B */ /* Note that A will be ARRAY[a], and B will be ARRAY[b] where a and b are indexes. */ /* TYPE should be the type of each entry of the ARRAY */ #define HEAPSORT(TYPE,ARRAY,NUMBER) \ @@ -60,3 +66,9 @@ } \ } +#ifdef __cplusplus + } +#endif + +#define SORT_H +#endif /* SORT_H */ |