From d1cfc560073dbe5bfcaa412b4fea16d6831e743e Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 24 Jul 2013 22:18:59 +0000 Subject: cleanup - declare qsort comparison routines as such git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1980 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- analyzer/ppmhist.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'analyzer/ppmhist.c') diff --git a/analyzer/ppmhist.c b/analyzer/ppmhist.c index 78e6d82a..321e4b3a 100644 --- a/analyzer/ppmhist.c +++ b/analyzer/ppmhist.c @@ -100,15 +100,29 @@ parseCommandLine(int argc, const char ** argv, +#ifndef LITERAL_FN_DEF_MATCH +static qsort_comparison_fn cmpfn; +#endif + static int countcompare(const void *ch1, const void *ch2) { +/*---------------------------------------------------------------------------- + This is a 'qsort' collation function. +-----------------------------------------------------------------------------*/ return ((colorhist_vector)ch2)->value - ((colorhist_vector)ch1)->value; } + +#ifndef LITERAL_FN_DEF_MATCH +static qsort_comparison_fn cmpfn; +#endif + static int rgbcompare(const void * arg1, const void * arg2) { - +/*---------------------------------------------------------------------------- + This is a 'qsort' collation function. +-----------------------------------------------------------------------------*/ colorhist_vector const ch1 = (colorhist_vector) arg1; colorhist_vector const ch2 = (colorhist_vector) arg2; -- cgit 1.4.1