char -> unsigned char

This commit is contained in:
christos 1998-11-06 22:29:44 +00:00
parent 2de3ba714e
commit 1a67b18deb
3 changed files with 25 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: apropos.c,v 1.13 1998/07/06 14:23:31 kleink Exp $ */
/* $NetBSD: apropos.c,v 1.14 1998/11/06 22:29:44 christos Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@ -44,7 +44,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)apropos.c 8.8 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: apropos.c,v 1.13 1998/07/06 14:23:31 kleink Exp $");
__RCSID("$NetBSD: apropos.c,v 1.14 1998/11/06 22:29:44 christos Exp $");
#endif
#endif /* not lint */
@ -228,7 +228,7 @@ lowstr(from, to)
char ch;
while ((ch = *from++) && ch != '\n')
*to++ = isupper(ch) ? tolower(ch) : ch;
*to++ = isupper((unsigned char)ch) ? tolower(ch) : ch;
*to = '\0';
}
@ -240,7 +240,10 @@ void
usage()
{
extern char *__progname;
(void)fprintf(stderr,
"usage: apropos [-C file] [-M path] [-m path] keyword ...\n");
"Usage: %s [-C file] [-M path] [-m path] keyword ...\n",
__progname);
exit(1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: config.c,v 1.8 1997/10/17 06:42:09 mikel Exp $ */
/* $NetBSD: config.c,v 1.9 1998/11/06 22:33:47 christos Exp $ */
/*
* Copyright (c) 1989, 1993, 1995
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)config.c 8.8 (Berkeley) 1/31/95";
#else
__RCSID("$NetBSD: config.c,v 1.8 1997/10/17 06:42:09 mikel Exp $");
__RCSID("$NetBSD: config.c,v 1.9 1998/11/06 22:33:47 christos Exp $");
#endif
#endif /* not lint */
@ -93,12 +93,12 @@ config(fname)
p[len - 1] = '\0'; /* Terminate the line. */
/* Skip leading space. */
for (; *p != '\0' && isspace(*p); ++p);
for (; *p != '\0' && isspace((unsigned char)*p); ++p);
/* Skip empty/comment lines. */
if (*p == '\0' || *p == '#')
continue;
/* Find first token. */
for (t = p; *t && !isspace(*t); ++t);
for (t = p; *t && !isspace((unsigned char)*t); ++t);
if (*t == '\0') /* Need more than one token.*/
continue;
*t = '\0';
@ -117,7 +117,7 @@ config(fname)
* has only a single token on it.
*/
if (!strcmp(p, "_build")) {
while (*++t && isspace(*t));
while (*++t && isspace((unsigned char)*t));
if ((ep = malloc(sizeof(ENTRY))) == NULL ||
(ep->s = strdup(t)) == NULL)
err(1, "malloc");

View File

@ -1,4 +1,4 @@
/* $NetBSD: man.c,v 1.14 1998/10/08 01:36:04 wsanchez Exp $ */
/* $NetBSD: man.c,v 1.15 1998/11/06 22:33:47 christos Exp $ */
/*
* Copyright (c) 1987, 1993, 1994, 1995
@ -44,7 +44,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993, 1994, 1995\n\
#if 0
static char sccsid[] = "@(#)man.c 8.17 (Berkeley) 1/31/95";
#else
__RCSID("$NetBSD: man.c,v 1.14 1998/10/08 01:36:04 wsanchez Exp $");
__RCSID("$NetBSD: man.c,v 1.15 1998/11/06 22:33:47 christos Exp $");
#endif
#endif /* not lint */
@ -439,7 +439,7 @@ manual(page, tag, pg)
for (found = 0;
e_sufp != NULL; e_sufp = e_sufp->q.tqe_next) {
for (p = e_sufp->s;
*p != '\0' && !isspace(*p); ++p);
*p != '\0' && !isspace((unsigned char)*p); ++p);
if (*p == '\0')
continue;
*p = '\0';
@ -540,7 +540,8 @@ build_page(fmt, pathp)
intmpp = addlist("_intmp");
/* Move to the printf(3) format string. */
for (; *fmt && isspace(*fmt); ++fmt);
for (; *fmt && isspace((unsigned char)*fmt); ++fmt)
continue;
/*
* Get a temporary file and build a version of the file
@ -609,7 +610,8 @@ how(fname)
else {
for(; lcnt; --lcnt)
(void)putchar('\n');
for (p = buf; isspace(*p); ++p);
for (p = buf; isspace((unsigned char)*p); ++p)
continue;
(void)fputs(p, stdout);
}
}
@ -660,13 +662,14 @@ check_pager(name)
* if the user uses "more", we make it "more -s"; watch out for
* PAGER = "mypager /usr/ucb/more"
*/
for (p = name; *p && !isspace(*p); ++p);
for (p = name; *p && !isspace((unsigned char)*p); ++p)
continue;
for (; p > name && *p != '/'; --p);
if (p != name)
++p;
/* make sure it's "more", not "morex" */
if (!strncmp(p, "more", 4) && (!p[4] || isspace(p[4]))){
if (!strncmp(p, "more", 4) && (!p[4] || isspace((unsigned char)p[4]))){
save = name;
/* allocate space to add the "-s" */
if (!(name =
@ -749,7 +752,9 @@ cleanup()
static void
usage()
{
extern char *__progname;
(void)fprintf(stderr,
"usage: man [-achw] [-C file] [-M path] [-m path] [section] title ...\n");
"Usage: %s [-achw] [-C file] [-M path] [-m path] [section] title ...\n",
__progname);
exit(1);
}