From dff6b9fdfeb78fe21a66aa459ddc1d5f7e362dfa Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 27 Mar 2016 01:46:26 +0000 Subject: Promote Advanced (10.73) to Stable git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@2692 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pamsistoaglyph.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'editor/pamsistoaglyph.c') diff --git a/editor/pamsistoaglyph.c b/editor/pamsistoaglyph.c index 1c92658c..6b093520 100644 --- a/editor/pamsistoaglyph.c +++ b/editor/pamsistoaglyph.c @@ -83,7 +83,7 @@ parseCommandLine( int argc, const char ** const argv, opt.short_allowed = 1; opt.allowNegNum = 0; - optParseOptions3( &argc, (char **)argv, opt, sizeof(opt), 0 ); + pm_optParseOptions3( &argc, (char **)argv, opt, sizeof(opt), 0 ); if (argc-1 < 1) cmdlineP->inputFilename = "-"; @@ -247,12 +247,19 @@ findRegionEyeSeparation( gray ** const grayArray, +#ifndef LITERAL_FN_DEF_MATCH +static qsort_comparison_fn compareInts; +#endif + static int -compare_ints( const void * const firstP, - const void * const secondP ) { +compareInts(const void * const a, + const void * const b) { + + const int * const firstP = a; + const int * const secondP = b; - int const first = *(int *)firstP; - int const second = *(int *)secondP; + int const first = *firstP; + int const second = *secondP; int retval; @@ -311,7 +318,7 @@ findEyeSeparation( struct pam * const pamP, rowSeparation[numValidRows++] = sep; } if (numValidRows > 0) { - qsort( rowSeparation, numValidRows, sizeof(int), compare_ints ); + qsort(rowSeparation, numValidRows, sizeof(int), compareInts); bestSeparation = rowSeparation[numValidRows/2]; } free( rowSeparation ); -- cgit 1.4.1