From 69ecccb0fa674314d8e72084dbaae3b248494d19 Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Tue, 25 Nov 2003 19:29:13 +0000 Subject: XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks --- ULabel.c | 11 ++++++----- xfontsel.c | 22 +++++++++++++++++----- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/ULabel.c b/ULabel.c index c449ea3..0f4d1c3 100644 --- a/ULabel.c +++ b/ULabel.c @@ -47,7 +47,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/xfontsel/ULabel.c,v 1.3 2001/10/28 03:34:32 tsi Exp $ */ +/* $XFree86: xc/programs/xfontsel/ULabel.c,v 1.4 2003/10/24 20:38:18 tsi Exp $ */ /* * ULabel.c - UCSLabel widget @@ -274,10 +274,11 @@ static void _XawLabelDrawUCS(dpy, d, gc, x, y, str, n) XDrawString16(dpy, d, gc, x, y, buf2b, ptr - buf2b); } -static int _XawLabelWidthUCS(fs, str, n) - XFontStruct *fs; - char *str; - int n; +static int _XawLabelWidthUCS( + XFontStruct *fs, + char *str, + int n +) { char *ep; unsigned short codepoint; 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 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 #include @@ -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 } -- cgit v1.2.3