about summary refs log tree commit diff
path: root/editor/pamsistoaglyph.c
diff options
context:
space:
mode:
Diffstat (limited to 'editor/pamsistoaglyph.c')
-rw-r--r--editor/pamsistoaglyph.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/editor/pamsistoaglyph.c b/editor/pamsistoaglyph.c
index 9866b7bd..6b093520 100644
--- a/editor/pamsistoaglyph.c
+++ b/editor/pamsistoaglyph.c
@@ -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 );