aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/grap
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-10-31 16:42:32 +0000
committerrsc <devnull@localhost>2005-10-31 16:42:32 +0000
commit74374cc8a40c450423785015c2e30d5a2ed2920c (patch)
tree1d8a5ca97056a320115a342fd251aa0cf0cda751 /src/cmd/grap
parentb330c942b468ab82fd8853590145187e859258cb (diff)
downloadplan9port-74374cc8a40c450423785015c2e30d5a2ed2920c.tar.gz
plan9port-74374cc8a40c450423785015c2e30d5a2ed2920c.tar.bz2
plan9port-74374cc8a40c450423785015c2e30d5a2ed2920c.zip
ctype sign fixes (Tom Miller)
Diffstat (limited to 'src/cmd/grap')
-rw-r--r--src/cmd/grap/input.c8
-rw-r--r--src/cmd/grap/print.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/grap/input.c b/src/cmd/grap/input.c
index 1e90cb9a..509fb01b 100644
--- a/src/cmd/grap/input.c
+++ b/src/cmd/grap/input.c
@@ -277,9 +277,9 @@ nextchar(void)
ERROR "argfp underflow" FATAL;
popsrc();
goto loop;
- } else if (c == '$' && isdigit(*srcp->sp)) { /* $3 */
+ } else if (c == '$' && isdigit((uchar)*srcp->sp)) { /* $3 */
int n = 0;
- while (isdigit(*srcp->sp))
+ while (isdigit((uchar)*srcp->sp))
n = 10 * n + *srcp->sp++ - '0';
if (n > 0 && n <= MAXARGS)
pushsrc(String, argfp->argstk[n-1]);
@@ -456,11 +456,11 @@ void eprint(void) /* try to print context around error */
for (q=ep-1; q>=p && *q!=' ' && *q!='\t' && *q!='\n'; q--)
;
for (; p < q; p++)
- if (isprint(*p))
+ if (isprint((uchar)*p))
putc(*p, stderr);
fprintf(stderr, " >>> ");
for (; p < q; p++)
- if (isprint(*p))
+ if (isprint((uchar)*p))
putc(*p, stderr);
fprintf(stderr, " <<< ");
while (pb >= pbuf)
diff --git a/src/cmd/grap/print.c b/src/cmd/grap/print.c
index 1ce32116..5a2e4e78 100644
--- a/src/cmd/grap/print.c
+++ b/src/cmd/grap/print.c
@@ -147,7 +147,7 @@ void graph(char *s) /* graph statement */
s++;
if (c == '\0')
ERROR "no name on graph statement" WARNING;
- if (!isupper(s[0]))
+ if (!isupper((uchar)s[0]))
ERROR "graph name %s must be capitalized", s WARNING;
for (p=graphname; (c = *s) != ' ' && c != '\t' && c != '\0'; )
*p++ = *s++;