Add (unsigned char) cast to ctype functions
This commit is contained in:
parent
7c1ffafac2
commit
5355c81879
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: command.c,v 1.10 2003/04/14 02:56:46 mrg Exp $ */
|
/* $NetBSD: command.c,v 1.11 2004/10/30 20:17:19 dsl Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1984-2002 Mark Nudelman
|
* Copyright (C) 1984-2002 Mark Nudelman
|
||||||
@ -416,7 +416,7 @@ mca_char(c)
|
|||||||
if (cmd_char(c) == CC_QUIT)
|
if (cmd_char(c) == CC_QUIT)
|
||||||
return (MCA_DONE);
|
return (MCA_DONE);
|
||||||
p = get_cmdbuf();
|
p = get_cmdbuf();
|
||||||
lc = islower(p[0]);
|
lc = islower((unsigned char)p[0]);
|
||||||
o = findopt_name(&p, &oname, NULL);
|
o = findopt_name(&p, &oname, NULL);
|
||||||
if (o != NULL)
|
if (o != NULL)
|
||||||
{
|
{
|
||||||
@ -426,14 +426,14 @@ mca_char(c)
|
|||||||
* display the full option name.
|
* display the full option name.
|
||||||
*/
|
*/
|
||||||
optchar = o->oletter;
|
optchar = o->oletter;
|
||||||
if (!lc && islower(optchar))
|
if (!lc)
|
||||||
optchar = toupper(optchar);
|
optchar = toupper((unsigned char)optchar);
|
||||||
cmd_reset();
|
cmd_reset();
|
||||||
mca_opt_toggle();
|
mca_opt_toggle();
|
||||||
for (p = oname; *p != '\0'; p++)
|
for (p = oname; *p != '\0'; p++)
|
||||||
{
|
{
|
||||||
c = *p;
|
c = (unsigned char)*p;
|
||||||
if (!lc && islower(c))
|
if (!lc)
|
||||||
c = toupper(c);
|
c = toupper(c);
|
||||||
if (cmd_char(c) != CC_OK)
|
if (cmd_char(c) != CC_OK)
|
||||||
return (MCA_DONE);
|
return (MCA_DONE);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: opttbl.c,v 1.10 2003/04/14 03:02:29 mrg Exp $ */
|
/* $NetBSD: opttbl.c,v 1.11 2004/10/30 20:17:19 dsl Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1984-2002 Mark Nudelman
|
* Copyright (C) 1984-2002 Mark Nudelman
|
||||||
@ -465,7 +465,7 @@ findopt(c)
|
|||||||
{
|
{
|
||||||
if (o->oletter == c)
|
if (o->oletter == c)
|
||||||
return (o);
|
return (o);
|
||||||
if ((o->otype & TRIPLE) && toupper(o->oletter) == c)
|
if ((o->otype & TRIPLE) && toupper((unsigned char)o->oletter) == c)
|
||||||
return (o);
|
return (o);
|
||||||
}
|
}
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: tags.c,v 1.5 2003/11/17 11:16:10 wiz Exp $ */
|
/* $NetBSD: tags.c,v 1.6 2004/10/30 20:17:19 dsl Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1984-2002 Mark Nudelman
|
* Copyright (C) 1984-2002 Mark Nudelman
|
||||||
@ -714,12 +714,12 @@ getentry(buf, tag, file, line)
|
|||||||
{
|
{
|
||||||
char *p = buf;
|
char *p = buf;
|
||||||
|
|
||||||
for (*tag = p; *p && !isspace(*p); p++) /* tag name */
|
for (*tag = p; *p && !isspace((unsigned char)*p); p++) /* tag name */
|
||||||
;
|
;
|
||||||
if (*p == 0)
|
if (*p == 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
for ( ; *p && isspace(*p); p++) /* (skip blanks) */
|
for ( ; *p && isspace((unsigned char)*p); p++) /* (skip blanks) */
|
||||||
;
|
;
|
||||||
if (*p == 0)
|
if (*p == 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
@ -727,27 +727,27 @@ getentry(buf, tag, file, line)
|
|||||||
* If the second part begin with other than digit,
|
* If the second part begin with other than digit,
|
||||||
* it is assumed tag type. Skip it.
|
* it is assumed tag type. Skip it.
|
||||||
*/
|
*/
|
||||||
if (!isdigit(*p))
|
if (!isdigit((unsigned char)*p))
|
||||||
{
|
{
|
||||||
for ( ; *p && !isspace(*p); p++) /* (skip tag type) */
|
for ( ; *p && !isspace((unsigned char)*p); p++) /* (skip tag type) */
|
||||||
;
|
;
|
||||||
for (; *p && isspace(*p); p++) /* (skip blanks) */
|
for (; *p && isspace((unsigned char)*p); p++) /* (skip blanks) */
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
if (!isdigit(*p))
|
if (!isdigit((unsigned char)*p))
|
||||||
return (-1);
|
return (-1);
|
||||||
*line = p; /* line number */
|
*line = p; /* line number */
|
||||||
for (*line = p; *p && !isspace(*p); p++)
|
for (*line = p; *p && !isspace((unsigned char)*p); p++)
|
||||||
;
|
;
|
||||||
if (*p == 0)
|
if (*p == 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
for ( ; *p && isspace(*p); p++) /* (skip blanks) */
|
for ( ; *p && isspace((unsigned char)*p); p++) /* (skip blanks) */
|
||||||
;
|
;
|
||||||
if (*p == 0)
|
if (*p == 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
*file = p; /* file name */
|
*file = p; /* file name */
|
||||||
for (*file = p; *p && !isspace(*p); p++)
|
for (*file = p; *p && !isspace((unsigned char)*p); p++)
|
||||||
;
|
;
|
||||||
if (*p == 0)
|
if (*p == 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user