svn commit: samba r8405 - in
branches/SAMBA_4_0/source/lib/appweb/mpr: .
tridge at samba.org
tridge at samba.org
Wed Jul 13 00:47:54 GMT 2005
Author: tridge
Date: 2005-07-13 00:47:54 +0000 (Wed, 13 Jul 2005)
New Revision: 8405
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8405
Log:
update var.c from upstream
Modified:
branches/SAMBA_4_0/source/lib/appweb/mpr/var.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/appweb/mpr/var.c
===================================================================
--- branches/SAMBA_4_0/source/lib/appweb/mpr/var.c 2005-07-13 00:43:16 UTC (rev 8404)
+++ branches/SAMBA_4_0/source/lib/appweb/mpr/var.c 2005-07-13 00:47:54 UTC (rev 8405)
@@ -1711,11 +1711,13 @@
MprVar mprParseVar(char *buf, MprType preferredType)
{
- MprType type = MPR_TYPE_UNDEFINED;
+ MprType type;
char *cp;
mprAssert(buf);
+ type = preferredType;
+
if (preferredType == MPR_TYPE_UNDEFINED) {
if (*buf == '-') {
type = MPR_NUM_VAR;
@@ -1730,18 +1732,18 @@
} else if (isdigit((int) *buf)) {
type = MPR_NUM_VAR;
cp = buf;
- if (*cp && tolower((unsigned char)cp[1]) == 'x') {
+ if (*cp && tolower(cp[1]) == 'x') {
cp = &cp[2];
}
for (cp = buf; *cp; cp++) {
- if (! isdigit((unsigned char) *cp)) {
+ if (! isdigit((int) *cp)) {
break;
}
}
if (*cp != '\0') {
#if BLD_FEATURE_FLOATING_POINT
- if (*cp == '.' || tolower((unsigned char)*cp) == 'e') {
+ if (*cp == '.' || tolower(*cp) == 'e') {
type = MPR_TYPE_FLOAT;
} else
#endif
@@ -1750,8 +1752,6 @@
}
}
}
- } else {
- type = preferredType;
}
switch (type) {
@@ -1993,11 +1993,11 @@
}
} else {
cp++;
- if (tolower((unsigned char)*cp) == 'x') {
+ if (tolower(*cp) == 'x') {
cp++;
radix = 16;
while (*cp) {
- c = tolower((unsigned char)*cp);
+ c = tolower(*cp);
if (isdigit(c)) {
num64 = (c - '0') + (num64 * radix);
} else if (c >= 'a' && c <= 'f') {
@@ -2011,7 +2011,7 @@
} else{
radix = 8;
while (*cp) {
- c = tolower((unsigned char)*cp);
+ c = tolower(*cp);
if (isdigit(c) && c < '8') {
num64 = (c - '0') + (num64 * radix);
} else {
@@ -2110,11 +2110,11 @@
}
} else {
cp++;
- if (tolower((unsigned char)*cp) == 'x') {
+ if (tolower(*cp) == 'x') {
cp++;
radix = 16;
while (*cp) {
- c = tolower((unsigned char)*cp);
+ c = tolower(*cp);
if (isdigit(c)) {
num = (c - '0') + (num * radix);
} else if (c >= 'a' && c <= 'f') {
@@ -2128,7 +2128,7 @@
} else{
radix = 8;
while (*cp) {
- c = tolower((unsigned char)*cp);
+ c = tolower(*cp);
if (isdigit(c) && c < '8') {
num = (c - '0') + (num * radix);
} else {
More information about the samba-cvs
mailing list