summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-06-20 19:28:00 +0000
committerjmallett <jmallett@FreeBSD.org>2002-06-20 19:28:00 +0000
commit7ae269b640ce2a9a3e61037bf7d97c5313b6e1d5 (patch)
tree4d221d2c1ba4050e24db2b640c3601afe91956f1 /usr.bin/make
parent619c88aeeb99f6aa38801e896d23cbb5def3a151 (diff)
downloadFreeBSD-src-7ae269b640ce2a9a3e61037bf7d97c5313b6e1d5.zip
FreeBSD-src-7ae269b640ce2a9a3e61037bf7d97c5313b6e1d5.tar.gz
Diff reduction for great justice against NetBSD, cast to unsigned char when
passing an argument to isspace(3).
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/arch.c6
-rw-r--r--usr.bin/make/cond.c2
-rw-r--r--usr.bin/make/job.c2
-rw-r--r--usr.bin/make/parse.c26
4 files changed, 18 insertions, 18 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index f925d79..438bc01 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -231,11 +231,11 @@ Arch_ParseArchive (linePtr, nodeLst, ctxt)
*/
Boolean doSubst = FALSE; /* TRUE if need to substitute in memName */
- while (*cp != '\0' && *cp != ')' && isspace (*cp)) {
+ while (*cp != '\0' && *cp != ')' && isspace ((unsigned char) *cp)) {
cp++;
}
memName = cp;
- while (*cp != '\0' && *cp != ')' && !isspace (*cp)) {
+ while (*cp != '\0' && *cp != ')' && !isspace ((unsigned char) *cp)) {
if (*cp == '$') {
/*
* Variable spec, so call the Var module to parse the puppy
@@ -414,7 +414,7 @@ Arch_ParseArchive (linePtr, nodeLst, ctxt)
*/
do {
cp++;
- } while (*cp != '\0' && isspace (*cp));
+ } while (*cp != '\0' && isspace ((unsigned char) *cp));
*linePtr = cp;
return (SUCCESS);
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index d02452f..64e7f1a 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -707,7 +707,7 @@ do_string_compare:
}
} else {
char *c = CondCvtArg(rhs, &right);
- if (*c != '\0' && !isspace(*c))
+ if (*c != '\0' && !isspace((unsigned char) *c))
goto do_string_compare;
if (rhs == condExpr) {
/*
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 7f7b3dc..096b437 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -2663,7 +2663,7 @@ Job_ParseShell(line)
Shell newShell;
Boolean fullSpec = FALSE;
- while (isspace(*line)) {
+ while (isspace((unsigned char) *line)) {
line++;
}
words = brk_string(line, &wordCount, TRUE);
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 90bdaf0..c82bf3b 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -723,7 +723,7 @@ ParseDoDependency (line)
do {
for (cp = line;
- *cp && !isspace (*cp) &&
+ *cp && !isspace ((unsigned char) *cp) &&
(*cp != '!') && (*cp != ':') && (*cp != '(');
cp++)
{
@@ -948,7 +948,7 @@ ParseDoDependency (line)
Parse_Error(PARSE_WARNING, "Extra target ignored");
}
} else {
- while (*cp && isspace (*cp)) {
+ while (*cp && isspace ((unsigned char) *cp)) {
cp++;
}
}
@@ -1006,7 +1006,7 @@ ParseDoDependency (line)
/*
* Get to the first source
*/
- while (*cp && isspace (*cp)) {
+ while (*cp && isspace ((unsigned char) *cp)) {
cp++;
}
line = cp;
@@ -1096,7 +1096,7 @@ ParseDoDependency (line)
* has no valid suffix.
*/
char savec;
- while (*cp && !isspace (*cp)) {
+ while (*cp && !isspace ((unsigned char) *cp)) {
cp++;
}
savec = *cp;
@@ -1124,7 +1124,7 @@ ParseDoDependency (line)
if (savec != '\0') {
cp++;
}
- while (*cp && isspace (*cp)) {
+ while (*cp && isspace ((unsigned char) *cp)) {
cp++;
}
line = cp;
@@ -1139,7 +1139,7 @@ ParseDoDependency (line)
* specifications (i.e. things with left parentheses in them)
* and handle them accordingly.
*/
- while (*cp && !isspace (*cp)) {
+ while (*cp && !isspace ((unsigned char) *cp)) {
if ((*cp == '(') && (cp > line) && (cp[-1] != '$')) {
/*
* Only stop for a left parenthesis if it isn't at the
@@ -1177,7 +1177,7 @@ ParseDoDependency (line)
ParseDoSrc (tOp, line, curSrcs);
}
- while (*cp && isspace (*cp)) {
+ while (*cp && isspace ((unsigned char) *cp)) {
cp++;
}
line = cp;
@@ -1350,7 +1350,7 @@ Parse_DoVar (line, ctxt)
* Skip to operator character, nulling out whitespace as we go
*/
for (cp = line + 1; *cp != '='; cp++) {
- if (isspace (*cp)) {
+ if (isspace ((unsigned char) *cp)) {
*cp = '\0';
}
}
@@ -1406,7 +1406,7 @@ Parse_DoVar (line, ctxt)
break;
}
- while (isspace (*cp)) {
+ while (isspace ((unsigned char) *cp)) {
cp++;
}
@@ -1548,12 +1548,12 @@ static void
ParseDoError(errmsg)
char *errmsg; /* error message */
{
- if (!isspace(*errmsg)) {
+ if (!isspace((unsigned char) *errmsg)) {
Parse_Error(PARSE_WARNING, "invalid syntax: .error%s", errmsg);
return;
}
- while (isspace(*errmsg))
+ while (isspace((unsigned char) *errmsg))
errmsg++;
errmsg = Var_Subst(NULL, errmsg, VAR_GLOBAL, FALSE);
@@ -2391,7 +2391,7 @@ Parse_File(name, stream)
* Lines that begin with the special character are either
* include or undef directives.
*/
- for (cp = line + 1; isspace (*cp); cp++) {
+ for (cp = line + 1; isspace ((unsigned char) *cp); cp++) {
continue;
}
if (strncmp (cp, "include", 7) == 0) {
@@ -2430,7 +2430,7 @@ Parse_File(name, stream)
#ifndef POSIX
shellCommand:
#endif
- for (cp = line + 1; isspace (*cp); cp++) {
+ for (cp = line + 1; isspace ((unsigned char) *cp); cp++) {
continue;
}
if (*cp) {
OpenPOWER on IntegriCloud