From 61edb97bdfabf1ab313fbec5f47f5e6c8a79da1a Mon Sep 17 00:00:00 2001 From: Love Hörnquist Åstrand Date: Tue, 12 Jul 2005 22:22:59 +0000 Subject: r8394: Make sure the argument to ctype is*(3) macros are unsigned char as required by ISO C99. (This used to be commit 56fd21c806e816cf4c3d23881f26474f858b45e2) --- source4/lib/ejs/var.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source4/lib/ejs') diff --git a/source4/lib/ejs/var.c b/source4/lib/ejs/var.c index 7cbf8a0b7f..9d2afe5306 100644 --- a/source4/lib/ejs/var.c +++ b/source4/lib/ejs/var.c @@ -1730,18 +1730,18 @@ MprVar mprParseVar(char *buf, MprType preferredType) } else if (isdigit((int) *buf)) { type = MPR_NUM_VAR; cp = buf; - if (*cp && tolower(cp[1]) == 'x') { + if (*cp && tolower((unsigned char)cp[1]) == 'x') { cp = &cp[2]; } for (cp = buf; *cp; cp++) { - if (! isdigit((int) *cp)) { + if (! isdigit((unsigned char) *cp)) { break; } } if (*cp != '\0') { #if BLD_FEATURE_FLOATING_POINT - if (*cp == '.' || tolower(*cp) == 'e') { + if (*cp == '.' || tolower((unsigned char)*cp) == 'e') { type = MPR_TYPE_FLOAT; } else #endif @@ -1993,11 +1993,11 @@ int64 mprParseInteger64(char *str) } } else { cp++; - if (tolower(*cp) == 'x') { + if (tolower((unsigned char)*cp) == 'x') { cp++; radix = 16; while (*cp) { - c = tolower(*cp); + c = tolower((unsigned char)*cp); if (isdigit(c)) { num64 = (c - '0') + (num64 * radix); } else if (c >= 'a' && c <= 'f') { @@ -2011,7 +2011,7 @@ int64 mprParseInteger64(char *str) } else{ radix = 8; while (*cp) { - c = tolower(*cp); + c = tolower((unsigned char)*cp); if (isdigit(c) && c < '8') { num64 = (c - '0') + (num64 * radix); } else { @@ -2110,11 +2110,11 @@ int mprParseInteger(char *str) } } else { cp++; - if (tolower(*cp) == 'x') { + if (tolower((unsigned char)*cp) == 'x') { cp++; radix = 16; while (*cp) { - c = tolower(*cp); + c = tolower((unsigned char)*cp); if (isdigit(c)) { num = (c - '0') + (num * radix); } else if (c >= 'a' && c <= 'f') { @@ -2128,7 +2128,7 @@ int mprParseInteger(char *str) } else{ radix = 8; while (*cp) { - c = tolower(*cp); + c = tolower((unsigned char)*cp); if (isdigit(c) && c < '8') { num = (c - '0') + (num * radix); } else { -- cgit