char -> unsigned char

This commit is contained in:
christos 1998-11-06 23:06:38 +00:00
parent 051c69de86
commit c3203395bd
9 changed files with 48 additions and 48 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fortran.c,v 1.4 1997/10/18 13:18:37 lukem Exp $ */
/* $NetBSD: fortran.c,v 1.5 1998/11/06 23:06:38 christos Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)fortran.c 8.3 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: fortran.c,v 1.4 1997/10/18 13:18:37 lukem Exp $");
__RCSID("$NetBSD: fortran.c,v 1.5 1998/11/06 23:06:38 christos Exp $");
#endif
#endif /* not lint */
@ -68,7 +68,7 @@ PF_funcs()
lbp = lbuf;
if (*lbp == '%') /* Ratfor escape to fortran */
++lbp;
for (; isspace(*lbp); ++lbp)
for (; isspace((unsigned char)*lbp); ++lbp)
continue;
if (!*lbp)
continue;
@ -79,7 +79,7 @@ PF_funcs()
break;
case 'd':
if (cicmp("double")) {
for (; isspace(*lbp); ++lbp)
for (; isspace((unsigned char)*lbp); ++lbp)
continue;
if (!*lbp)
continue;
@ -101,7 +101,7 @@ PF_funcs()
takeprec();
break;
}
for (; isspace(*lbp); ++lbp)
for (; isspace((unsigned char)*lbp); ++lbp)
continue;
if (!*lbp)
continue;
@ -120,7 +120,7 @@ PF_funcs()
default:
continue;
}
for (; isspace(*lbp); ++lbp)
for (; isspace((unsigned char)*lbp); ++lbp)
continue;
if (!*lbp)
continue;
@ -161,15 +161,15 @@ cicmp(cp)
static void
takeprec()
{
for (; isspace(*lbp); ++lbp)
for (; isspace((unsigned char)*lbp); ++lbp)
continue;
if (*lbp == '*') {
for (++lbp; isspace(*lbp); ++lbp)
for (++lbp; isspace((unsigned char)*lbp); ++lbp)
continue;
if (!isdigit(*lbp))
if (!isdigit((unsigned char)*lbp))
--lbp; /* force failure */
else
while (isdigit(*++lbp))
while (isdigit((unsigned char)*++lbp))
continue;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lisp.c,v 1.4 1997/10/18 13:18:45 lukem Exp $ */
/* $NetBSD: lisp.c,v 1.5 1998/11/06 23:06:38 christos Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)lisp.c 8.3 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: lisp.c,v 1.4 1997/10/18 13:18:45 lukem Exp $");
__RCSID("$NetBSD: lisp.c,v 1.5 1998/11/06 23:06:38 christos Exp $");
#endif
#endif /* not lint */
@ -79,9 +79,9 @@ l_entries()
if (cicmp("wrapper") || cicmp("whopper"))
special = YES;
}
for (; !isspace(*lbp); ++lbp)
for (; !isspace((unsigned char)*lbp); ++lbp)
continue;
for (; isspace(*lbp); ++lbp)
for (; isspace((unsigned char)*lbp); ++lbp)
continue;
for (cp = lbp; *cp && *cp != '\n'; ++cp)
continue;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cut.c,v 1.12 1998/08/25 20:59:36 ross Exp $ */
/* $NetBSD: cut.c,v 1.13 1998/11/06 23:07:39 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#if 0
static char sccsid[] = "@(#)cut.c 8.3 (Berkeley) 5/4/95";
#endif
__RCSID("$NetBSD: cut.c,v 1.12 1998/08/25 20:59:36 ross Exp $");
__RCSID("$NetBSD: cut.c,v 1.13 1998/11/06 23:07:39 christos Exp $");
#endif /* not lint */
#include <ctype.h>
@ -160,13 +160,13 @@ get_list(list)
++p;
setautostart = 1;
}
if (isdigit(*p)) {
if (isdigit((unsigned char)*p)) {
start = stop = strtol(p, &p, 10);
if (setautostart && start > autostart)
autostart = start;
}
if (*p == '-') {
if (isdigit(p[1]))
if (isdigit((unsigned char)p[1]))
stop = strtol(p + 1, &p, 10);
if (*p == '-') {
++p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: filter.c,v 1.4 1997/10/18 14:44:28 lukem Exp $ */
/* $NetBSD: filter.c,v 1.5 1998/11/06 23:10:08 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)filter.c 8.1 (Berkeley) 6/6/93";
#endif
__RCSID("$NetBSD: filter.c,v 1.4 1997/10/18 14:44:28 lukem Exp $");
__RCSID("$NetBSD: filter.c,v 1.5 1998/11/06 23:10:08 christos Exp $");
#endif /* not lint */
#include <sys/types.h>
@ -200,7 +200,7 @@ discardit(errorp)
}
}
/* check if the argument to the error message is to be ignored*/
if (ispunct(lastchar(errorp->error_text[2])))
if (ispunct((unsigned char)lastchar(errorp->error_text[2])))
clob_last(errorp->error_text[2], '\0');
if (search_ignore(errorp->error_text[errorclass == C_NONSPEC ? 0 : 2]) >= 0){
return(C_NULLED);

View File

@ -1,4 +1,4 @@
/* $NetBSD: input.c,v 1.6 1998/10/08 01:29:27 wsanchez Exp $ */
/* $NetBSD: input.c,v 1.7 1998/11/06 23:10:08 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 6/6/93";
#endif
__RCSID("$NetBSD: input.c,v 1.6 1998/10/08 01:29:27 wsanchez Exp $");
__RCSID("$NetBSD: input.c,v 1.7 1998/11/06 23:10:08 christos Exp $");
#endif /* not lint */
#include <stdio.h>
@ -134,7 +134,7 @@ erroradd(errorlength, errorv, errorclass, errorsubclass)
if (errorclass == C_TRUE){
/* check canonicalization of the second argument*/
for(cp = errorv[1]; *cp && isdigit(*cp); cp++)
for(cp = errorv[1]; *cp && isdigit((unsigned char)*cp); cp++)
continue;
errorclass = (*cp == '\0') ? C_TRUE : C_NONSPEC;
#ifdef FULLDEBUG
@ -228,7 +228,7 @@ cpp()
*/
if ( (language != INLD) /* loader errors have almost same fmt*/
&& (lastchar(wordv[1]) == ':')
&& (isdigit(firstchar(wordv[2])))
&& (isdigit((unsigned char)firstchar(wordv[2])))
&& (lastchar(wordv[2]) == ':') ){
language = INCPP;
clob_last(wordv[1], '\0');
@ -252,7 +252,7 @@ pccccom()
&& (lastchar(wordv[1]) == ',')
&& (next_lastchar(wordv[1]) == '"')
&& (strcmp(wordv[2],"line") == 0)
&& (isdigit(firstchar(wordv[3])))
&& (isdigit((unsigned char)firstchar(wordv[3])))
&& (lastchar(wordv[3]) == ':') ){
clob_last(wordv[1], '\0'); /* drop last , */
clob_last(wordv[1], '\0'); /* drop last " */
@ -286,7 +286,7 @@ richieccom()
if (lastchar(wordv[1]) == ':'){
cp = wordv[1] + strlen(wordv[1]) - 1;
while (isdigit(*--cp))
while (isdigit((unsigned char)*--cp))
continue;
if (*cp == ':'){
clob_last(wordv[1], '\0'); /* last : */
@ -506,7 +506,7 @@ ri()
if ( (firstchar(wordv[1]) == '"')
&&(lastchar(wordv[1]) == '"')
&&(lastchar(wordv[2]) == ':')
&&(isdigit(firstchar(wordv[2]))) ){
&&(isdigit((unsigned char)firstchar(wordv[2]))) ){
clob_last(wordv[1], '\0'); /* drop the last " */
wordv[1]++; /* skip over the first " */
clob_last(wordv[2], '\0');
@ -537,7 +537,7 @@ troff()
&& (lastchar(wordv[1]) == ',')
&& (next_lastchar(wordv[1]) == '\'')
&& (strcmp(wordv[2],"line") == 0)
&& (isdigit(firstchar(wordv[3])))
&& (isdigit((unsigned char)firstchar(wordv[3])))
&& (lastchar(wordv[3]) == ':') ){
clob_last(wordv[1], '\0'); /* drop last , */
clob_last(wordv[1], '\0'); /* drop last " */
@ -562,7 +562,7 @@ mod2()
||(strcmp(wordv[1], "File") == 0)) /* later version */
&& (lastchar(wordv[2]) == ',') /* file name */
&& (strcmp(wordv[3], "line") == 0)
&& (isdigit(firstchar(wordv[4]))) /* line number */
&& (isdigit((unsigned char)firstchar(wordv[4]))) /* line number */
&& (lastchar(wordv[4]) == ':') /* line number */
){
clob_last(wordv[2], '\0'); /* drop last , on file name */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pi.c,v 1.5 1998/10/08 01:29:28 wsanchez Exp $ */
/* $NetBSD: pi.c,v 1.6 1998/11/06 23:10:08 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)pi.c 8.1 (Berkeley) 6/6/93";
#endif
__RCSID("$NetBSD: pi.c,v 1.5 1998/10/08 01:29:28 wsanchez Exp $");
__RCSID("$NetBSD: pi.c,v 1.6 1998/11/06 23:10:08 christos Exp $");
#endif /* not lint */
#include <stdio.h>
@ -171,7 +171,7 @@ boolean
alldigits(string)
char *string;
{
for (; *string && isdigit(*string); string++)
for (; *string && isdigit((unsigned char)*string); string++)
continue;
return(*string == '\0');
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr.c,v 1.5 1997/10/18 14:44:40 lukem Exp $ */
/* $NetBSD: subr.c,v 1.6 1998/11/06 23:10:08 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 6/6/93";
#endif
__RCSID("$NetBSD: subr.c,v 1.5 1997/10/18 14:44:40 lukem Exp $");
__RCSID("$NetBSD: subr.c,v 1.6 1998/11/06 23:10:08 christos Exp $");
#endif /* not lint */
#include <ctype.h>
@ -200,7 +200,7 @@ persperdexplode(string, r_perd, r_pers)
if ( (length >= 4)
&& (string[length - 1] == ')' ) ){
for (cp = &string[length - 2];
(isdigit(*cp)) && (*cp != '(');
(isdigit((unsigned char)*cp)) && (*cp != '(');
--cp)
continue;
if (*cp == '('){
@ -233,7 +233,7 @@ qpersperdexplode(string, r_perd, r_pers)
if ( (length >= 4)
&& (string[length - 1] == ')' ) ){
for (cp = &string[length - 2];
(isdigit(*cp)) && (*cp != '(');
(isdigit((unsigned char)*cp)) && (*cp != '(');
--cp)
continue;
if (*cp == '(' && *(cp - 1) == '"'){
@ -343,21 +343,21 @@ wordvbuild(string, r_wordc, r_wordv)
int wordindex;
for (wordcount = 0, cp = string; *cp; wordcount++){
while (*cp && isspace(*cp))
while (*cp && isspace((unsigned char)*cp))
cp++;
if (*cp == 0)
break;
while (!isspace(*cp))
while (!isspace((unsigned char)*cp))
cp++;
}
wordv = (char **)Calloc(wordcount + 1, sizeof (char *));
for (cp=string,wordindex=0; wordcount; wordindex++,--wordcount){
while (*cp && isspace(*cp))
while (*cp && isspace((unsigned char)*cp))
cp++;
if (*cp == 0)
break;
wordv[wordindex] = cp;
while(!isspace(*cp))
while(!isspace((unsigned char)*cp))
cp++;
*cp++ = '\0';
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: expand.c,v 1.6 1997/10/18 14:45:57 lukem Exp $ */
/* $NetBSD: expand.c,v 1.7 1998/11/06 23:10:40 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "@(#)expand.c 8.1 (Berkeley) 6/9/93";
#endif
__RCSID("$NetBSD: expand.c,v 1.6 1997/10/18 14:45:57 lukem Exp $");
__RCSID("$NetBSD: expand.c,v 1.7 1998/11/06 23:10:40 christos Exp $");
#endif /* not lint */
#include <stdio.h>
@ -70,7 +70,7 @@ main(argc, argv)
int n;
/* handle obsolete syntax */
while (argc > 1 && argv[1][0] && isdigit(argv[1][1])) {
while (argc > 1 && argv[1][0] && isdigit((unsigned char)argv[1][1])) {
getstops(&argv[1][1]);
argc--; argv++;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: is_tar.c,v 1.9 1998/09/20 15:27:16 christos Exp $ */
/* $NetBSD: is_tar.c,v 1.10 1998/11/06 23:11:26 christos Exp $ */
/*
* is_tar() -- figure out whether file is a tar archive.
@ -25,7 +25,7 @@
#if 0
FILE_RCSID("@(#)Id: is_tar.c,v 1.10 1998/06/27 13:23:39 christos Exp ")
#else
__RCSID("$NetBSD: is_tar.c,v 1.9 1998/09/20 15:27:16 christos Exp $");
__RCSID("$NetBSD: is_tar.c,v 1.10 1998/11/06 23:11:26 christos Exp $");
#endif
#endif
@ -95,7 +95,7 @@ from_oct(digs, where)
{
register int value;
while (isspace(*where)) { /* Skip spaces */
while (isspace((unsigned char)*where)) { /* Skip spaces */
where++;
if (--digs <= 0)
return -1; /* All blank field */
@ -106,7 +106,7 @@ from_oct(digs, where)
--digs;
}
if (digs > 0 && *where && !isspace(*where))
if (digs > 0 && *where && !isspace((unsigned char)*where))
return -1; /* Ended on non-space/nul */
return value;