From 3db384424bd7398ffbb7a355cab8f15f3add009f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 2 Oct 2016 19:24:58 +0200 Subject: New upstream version 1.9.1+repack --- h/sort.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'h/sort.h') diff --git a/h/sort.h b/h/sort.h index 98bee8f..8440425 100644 --- a/h/sort.h +++ b/h/sort.h @@ -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 */ -- cgit v1.2.3