diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-03-08 14:53:44 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-03-08 14:53:44 +0000 |
| commit | 1f2b1e5470ed526202b938e6d796f4cd232704c2 (patch) | |
| tree | 7acc781c07e715885bb58b3d9a6904a7e33d8439 | |
| parent | 51d37642ba4f9071ac178328cec7d421d4724187 (diff) | |
Added (unsigned) cast to isxyz() calls to get rid of compiler warnings.
git-svn-id: file:///fltk/svn/fltk/trunk@375 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/numericsort.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/numericsort.c b/src/numericsort.c index 438f63a82..288074da4 100644 --- a/src/numericsort.c +++ b/src/numericsort.c @@ -1,5 +1,5 @@ /* - * "$Id: numericsort.c,v 1.9 1999/01/07 19:17:47 mike Exp $" + * "$Id: numericsort.c,v 1.10 1999/03/08 14:53:44 mike Exp $" * * Numeric sorting routine for the Fast Light Tool Kit (FLTK). * @@ -58,20 +58,20 @@ int numericsort(struct dirent **A, struct dirent **B) { const char* b = (*B)->d_name; int ret = 0; for (;;) { - if (isdigit(*a) && isdigit(*b)) { + if (isdigit((unsigned)*a) && isdigit((unsigned)*b)) { int diff,magdiff; while (*a == '0') a++; while (*b == '0') b++; - while (isdigit(*a) && *a == *b) {a++; b++;} - diff = (isdigit(*a) && isdigit(*b)) ? *a - *b : 0; + while (isdigit((unsigned)*a) && *a == *b) {a++; b++;} + diff = (isdigit((unsigned)*a) && isdigit((unsigned)*b)) ? *a - *b : 0; magdiff = 0; - while (isdigit(*a)) {magdiff++; a++;} - while (isdigit(*b)) {magdiff--; b++;} + while (isdigit((unsigned)*a)) {magdiff++; a++;} + while (isdigit((unsigned)*b)) {magdiff--; b++;} if (magdiff) {ret = magdiff; break;} /* compare # of significant digits*/ if (diff) {ret = diff; break;} /* compare first non-zero digit */ } else { #if 1 - if ((ret = tolower(*a)-tolower(*b))) break; /* compare case-insensitve */ + if ((ret = tolower((unsigned)*a)-tolower((unsigned)*b))) break; /* compare case-insensitve */ #else if ((ret = *a-*b)) break; /* compare case-sensitive */ #endif @@ -84,5 +84,5 @@ int numericsort(struct dirent **A, struct dirent **B) { } /* - * End of "$Id: numericsort.c,v 1.9 1999/01/07 19:17:47 mike Exp $". + * End of "$Id: numericsort.c,v 1.10 1999/03/08 14:53:44 mike Exp $". */ |
