Add (unsigned char) cast to ctype functions
This commit is contained in:
parent
235e7412c1
commit
43371ff1ac
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: crunchgen.c,v 1.63 2004/09/25 21:48:15 wiz Exp $ */
|
||||
/* $NetBSD: crunchgen.c,v 1.64 2004/10/30 17:17:35 dsl Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994 University of Maryland
|
||||
* All Rights Reserved.
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if !defined(lint)
|
||||
__RCSID("$NetBSD: crunchgen.c,v 1.63 2004/09/25 21:48:15 wiz Exp $");
|
||||
__RCSID("$NetBSD: crunchgen.c,v 1.64 2004/10/30 17:17:35 dsl Exp $");
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -320,14 +320,14 @@ parse_line(char *line, int *fc, char **fv, int nf)
|
|||
p = line;
|
||||
*fc = 0;
|
||||
for (;;) {
|
||||
while (isspace(*p))
|
||||
while (isspace((unsigned char)*p))
|
||||
p++;
|
||||
if (*p == '\0' || *p == '#')
|
||||
break;
|
||||
|
||||
if (*fc < nf)
|
||||
fv[(*fc)++] = p;
|
||||
while (*p && !isspace(*p) && *p != '#')
|
||||
while (*p && !isspace((unsigned char)*p) && *p != '#')
|
||||
p++;
|
||||
if (*p == '\0' || *p == '#')
|
||||
break;
|
||||
|
@ -718,16 +718,16 @@ fillin_program_objs(prog_t *p, char *dirpath)
|
|||
continue;
|
||||
}
|
||||
cp = line + 6;
|
||||
while (isspace(*cp))
|
||||
while (isspace((unsigned char)*cp))
|
||||
cp++;
|
||||
while (*cp) {
|
||||
obj = cp;
|
||||
while (*cp && !isspace(*cp))
|
||||
while (*cp && !isspace((unsigned char)*cp))
|
||||
cp++;
|
||||
if (*cp)
|
||||
*cp++ = '\0';
|
||||
add_string(&p->objs, obj);
|
||||
while (isspace(*cp))
|
||||
while (isspace((unsigned char)*cp))
|
||||
cp++;
|
||||
}
|
||||
}
|
||||
|
@ -889,7 +889,7 @@ genident(char *str)
|
|||
if (*s == '-')
|
||||
*d++ = '_';
|
||||
else
|
||||
if (*s == '_' || isalnum(*s))
|
||||
if (*s == '_' || isalnum((unsigned char)*s))
|
||||
*d++ = *s;
|
||||
}
|
||||
*d = '\0';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: eject.c,v 1.18 2004/04/21 01:05:47 christos Exp $ */
|
||||
/* $NetBSD: eject.c,v 1.19 2004/10/30 17:20:01 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\n\
|
|||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: eject.c,v 1.18 2004/04/21 01:05:47 christos Exp $");
|
||||
__RCSID("$NetBSD: eject.c,v 1.19 2004/10/30 17:20:01 dsl Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -338,9 +338,9 @@ unmount_dev(char *name)
|
|||
|
||||
/* Set len to strip off the partition name: */
|
||||
len = strlen(dn);
|
||||
if (!isdigit(dn[len - 1]))
|
||||
if (!isdigit((unsigned char)dn[len - 1]))
|
||||
len--;
|
||||
if (!isdigit(dn[len - 1])) {
|
||||
if (!isdigit((unsigned char)dn[len - 1])) {
|
||||
errx(1, "Can't figure out base name for dev name %s", dn);
|
||||
}
|
||||
for (i = 0; i < nmnts; i++) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: util.c,v 1.21 2003/08/07 11:13:46 agc Exp $ */
|
||||
/* $NetBSD: util.c,v 1.22 2004/10/30 17:21:15 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -72,7 +72,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)util.c 8.3 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: util.c,v 1.21 2003/08/07 11:13:46 agc Exp $");
|
||||
__RCSID("$NetBSD: util.c,v 1.22 2004/10/30 17:21:15 dsl Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -153,7 +153,7 @@ expandusername(gecos, login, buf, buflen)
|
|||
if (*p == '&') {
|
||||
/* interpolate full name */
|
||||
snprintf(bp, buflen - (bp - buf), "%s", login);
|
||||
*bp = toupper(*bp);
|
||||
*bp = toupper((unsigned char)*bp);
|
||||
bp += strlen(bp);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fmt.c,v 1.17 2003/08/07 11:13:47 agc Exp $ */
|
||||
/* $NetBSD: fmt.c,v 1.18 2004/10/30 17:23:40 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)fmt.c 8.1 (Berkeley) 7/20/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: fmt.c,v 1.17 2003/08/07 11:13:47 agc Exp $");
|
||||
__RCSID("$NetBSD: fmt.c,v 1.18 2004/10/30 17:23:40 dsl Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <ctype.h>
|
||||
|
@ -166,10 +166,10 @@ fmt(FILE *fi)
|
|||
cp = fgets(linebuf, BUFSIZ, fi);
|
||||
if (!cp)
|
||||
return;
|
||||
while (*cp && isspace(*cp))
|
||||
while (*cp && isspace((unsigned char)*cp))
|
||||
cp++;
|
||||
cp2 = cp + strlen(cp) - 1;
|
||||
while (cp2 > cp && isspace(*cp2))
|
||||
while (cp2 > cp && isspace((unsigned char)*cp2))
|
||||
cp2--;
|
||||
if (cp == cp2)
|
||||
putchar('\n');
|
||||
|
|
Loading…
Reference in New Issue