From 74374cc8a40c450423785015c2e30d5a2ed2920c Mon Sep 17 00:00:00 2001 From: rsc Date: Mon, 31 Oct 2005 16:42:32 +0000 Subject: ctype sign fixes (Tom Miller) --- src/cmd/eqn/input.c | 4 ++-- src/cmd/eqn/size.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cmd/eqn') diff --git a/src/cmd/eqn/input.c b/src/cmd/eqn/input.c index 85a57366..a7432f33 100644 --- a/src/cmd/eqn/input.c +++ b/src/cmd/eqn/input.c @@ -189,9 +189,9 @@ input(void) ERROR "argfp underflow" FATAL; popsrc(); goto loop; - } else if (c == '$' && isdigit(*srcp->sp)) { + } else if (c == '$' && isdigit((uchar)*srcp->sp)) { 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]); diff --git a/src/cmd/eqn/size.c b/src/cmd/eqn/size.c index 59bf3f20..67d3dae8 100644 --- a/src/cmd/eqn/size.c +++ b/src/cmd/eqn/size.c @@ -13,7 +13,7 @@ void setsize(char *p) /* set size as found in p */ ps -= atoi(p+1); if (szstack[nszstack-1] != 0) szstack[nszstack] = ps; - } else if (isdigit(*p)) { + } else if (isdigit((uchar)*p)) { if (szstack[nszstack-1] == 0) printf(".nr %d \\n(.s\n", 99-nszstack); else @@ -52,7 +52,7 @@ void globsize(void) gsize -= atoi(temp+1); if (szstack[0] != 0) szstack[0] = gsize; - } else if (isdigit(temp[0])) { + } else if (isdigit((uchar)temp[0])) { gsize = atoi(temp); szstack[0] = gsize; printf(".nr 99 \\n(.s\n"); -- cgit v1.2.3