cast argument to is* to unsigned char

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14502 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-01-08 23:16:44 +00:00
parent bfbbff5ad9
commit ee872ac323
2 changed files with 7 additions and 7 deletions

View File

@@ -60,7 +60,7 @@ domacro(int argc, char **argv)
TOP: TOP:
cp1 = macros[i].mac_start; cp1 = macros[i].mac_start;
while (cp1 != macros[i].mac_end) { while (cp1 != macros[i].mac_end) {
while (isspace(*cp1)) { while (isspace((unsigned char)*cp1)) {
cp1++; cp1++;
} }
cp2 = line; cp2 = line;
@@ -70,9 +70,9 @@ TOP:
*cp2++ = *++cp1; *cp2++ = *++cp1;
break; break;
case '$': case '$':
if (isdigit(*(cp1+1))) { if (isdigit((unsigned char)*(cp1+1))) {
j = 0; j = 0;
while (isdigit(*++cp1)) { while (isdigit((unsigned char)*++cp1)) {
j = 10*j + *cp1 - '0'; j = 10*j + *cp1 - '0';
} }
cp1--; cp1--;

View File

@@ -74,7 +74,7 @@ makeargv()
} }
while ((c = *cp)) { while ((c = *cp)) {
int inquote = 0; int inquote = 0;
while (isspace(c)) while (isspace((unsigned char)c))
c = *++cp; c = *++cp;
if (c == '\0') if (c == '\0')
break; break;
@@ -96,7 +96,7 @@ makeargv()
} else if (c == '\'') { } else if (c == '\'') {
inquote = '\''; inquote = '\'';
continue; continue;
} else if (isspace(c)) } else if (isspace((unsigned char)c))
break; break;
} }
*cp2++ = c; *cp2++ = c;
@@ -2026,11 +2026,11 @@ cmdrc(char *m1, char *m2)
if (line[0] == '#') if (line[0] == '#')
continue; continue;
if (gotmachine) { if (gotmachine) {
if (!isspace(line[0])) if (!isspace((unsigned char)line[0]))
gotmachine = 0; gotmachine = 0;
} }
if (gotmachine == 0) { if (gotmachine == 0) {
if (isspace(line[0])) if (isspace((unsigned char)line[0]))
continue; continue;
if (strncasecmp(line, m1, l1) == 0) if (strncasecmp(line, m1, l1) == 0)
strncpy(line, &line[l1], sizeof(line) - l1); strncpy(line, &line[l1], sizeof(line) - l1);