summaryrefslogtreecommitdiff
path: root/xfontsel.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:49:11 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:49:11 +0000
commitfbd548db7345a323d1d1f6948aed89b130b6b36d (patch)
tree86abb42b178e1c5cf9c4e334424e6283a38b00da /xfontsel.c
parentec7cff5eb04007f30e0fa732bca8a55882f5482f (diff)
merge latest (4.3.99.16) from XFree86 (vendor) branchXORG-RELEASE-1-BASEXEVIE-MERGEXEVIE-BASEXINERAMA_2XEVIE
Diffstat (limited to 'xfontsel.c')
-rw-r--r--xfontsel.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/xfontsel.c b/xfontsel.c
index 12c437d..3993e96 100644
--- a/xfontsel.c
+++ b/xfontsel.c
@@ -31,7 +31,7 @@ Author: Ralph R. Swick, DEC/MIT Project Athena
one weekend in November, 1989
Modified: Mark Leisher <mleisher@crl.nmsu.edu> to deal with UCS sample text.
*/
-/* $XFree86: xc/programs/xfontsel/xfontsel.c,v 1.7 2001/10/28 03:34:32 tsi Exp $ */
+/* $XFree86: xc/programs/xfontsel/xfontsel.c,v 1.8 2003/05/27 22:27:05 tsi Exp $ */
#include <stdio.h>
#include <stdlib.h>
@@ -797,9 +797,11 @@ static int strcmpn(const char *s1, const char *s2)
/* Order is *, (nil), rest */
-int AlphabeticSort(fval1, fval2)
- FieldValue *fval1, *fval2;
+int AlphabeticSort(_Xconst void *fval1, _Xconst void *fval2)
{
+# define fval1 ((_Xconst FieldValue *)fval1)
+# define fval2 ((_Xconst FieldValue *)fval2)
+
if (fval1->string && !strcmp(fval1->string, "*"))
return -1;
if (fval2->string && !strcmp(fval2->string, "*"))
@@ -808,14 +810,20 @@ int AlphabeticSort(fval1, fval2)
return -1;
if (!fval2->string)
return 1;
+
return strcmpn(fval1->string, fval2->string);
+
+# undef fval1
+# undef fval2
}
/* Order is *, (nil), rest */
-int NumericSort(fval1, fval2)
- FieldValue *fval1, *fval2;
+int NumericSort(_Xconst void *fval1, _Xconst void *fval2)
{
+# define fval1 ((_Xconst FieldValue *)fval1)
+# define fval2 ((_Xconst FieldValue *)fval2)
+
if (fval1->string && !strcmp(fval1->string, "*"))
return -1;
if (fval2->string && !strcmp(fval2->string, "*"))
@@ -824,7 +832,11 @@ int NumericSort(fval1, fval2)
return -1;
if (!fval2->string)
return 1;
+
return atoi(fval1->string) - atoi(fval2->string);
+
+# undef fval1
+# undef fval2
}