From 050919103f76dbe4aebaa8ac8a1e2633713ee571 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 9 Aug 2002 03:17:30 +0000 Subject: More shadow variable changes... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2567 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/numericsort.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/numericsort.c') diff --git a/src/numericsort.c b/src/numericsort.c index cd6bd4ece..f7dc09eea 100644 --- a/src/numericsort.c +++ b/src/numericsort.c @@ -1,5 +1,5 @@ /* - * "$Id: numericsort.c,v 1.10.2.4.2.5 2002/05/04 18:41:55 easysw Exp $" + * "$Id: numericsort.c,v 1.10.2.4.2.6 2002/08/09 03:17:30 easysw Exp $" * * Numeric sorting routine for the Fast Light Tool Kit (FLTK). * @@ -60,15 +60,15 @@ static int numericsort(struct dirent **A, struct dirent **B, int cs) { const char* b = (*B)->d_name; int ret = 0; for (;;) { - if (isdigit((unsigned)*a) && isdigit((unsigned)*b)) { + if (isdigit(*a & 255) && isdigit(*b & 255)) { int diff,magdiff; while (*a == '0') a++; while (*b == '0') b++; - while (isdigit((unsigned)*a) && *a == *b) {a++; b++;} - diff = (isdigit((unsigned)*a) && isdigit((unsigned)*b)) ? *a - *b : 0; + while (isdigit(*a & 255) && *a == *b) {a++; b++;} + diff = (isdigit(*a & 255) && isdigit(*b & 255)) ? *a - *b : 0; magdiff = 0; - while (isdigit((unsigned)*a)) {magdiff++; a++;} - while (isdigit((unsigned)*b)) {magdiff--; b++;} + while (isdigit(*a & 255)) {magdiff++; a++;} + while (isdigit(*b & 255)) {magdiff--; b++;} if (magdiff) {ret = magdiff; break;} /* compare # of significant digits*/ if (diff) {ret = diff; break;} /* compare first non-zero digit */ } else { @@ -77,7 +77,7 @@ static int numericsort(struct dirent **A, struct dirent **B, int cs) { if ((ret = *a-*b)) break; } else { /* compare case-insensitve */ - if ((ret = tolower((unsigned)*a)-tolower((unsigned)*b))) break; + if ((ret = tolower(*a & 255)-tolower(*b & 255))) break; } if (!*a) break; @@ -105,5 +105,5 @@ int fl_numericsort(struct dirent **A, struct dirent **B) { } /* - * End of "$Id: numericsort.c,v 1.10.2.4.2.5 2002/05/04 18:41:55 easysw Exp $". + * End of "$Id: numericsort.c,v 1.10.2.4.2.6 2002/08/09 03:17:30 easysw Exp $". */ -- cgit v1.2.3