ctype sign fixes (Tom Miller)
This commit is contained in:
parent
b330c942b4
commit
74374cc8a4
10 changed files with 22 additions and 17 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue