From 436deeda1a243078fb9907dfb57558f6d481936d Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 23 Oct 1997 02:03:43 +0000 Subject: Add more (unsigned char) casts to ctype macros Fix casetable usage in the same manner too --- contrib/awk/builtin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/awk/builtin.c') diff --git a/contrib/awk/builtin.c b/contrib/awk/builtin.c index dc2c1d3..32bde1c 100644 --- a/contrib/awk/builtin.c +++ b/contrib/awk/builtin.c @@ -231,7 +231,7 @@ NODE *tree; while (l1 > 0) { if (l2 > l1) break; - if (casetable[(int)*p1] == casetable[(int)*p2] + if (casetable[(unsigned char)*p1] == casetable[(unsigned char)*p2] && (l2 == 1 || strncasecmp(p1, p2, l2) == 0)) { ret = 1 + s1->stlen - l1; break; @@ -2038,7 +2038,7 @@ size_t len; } } else if (*str == '0') { for (; len > 0; len--) { - if (! isdigit(*str) || *str == '8' || *str == '9') + if (! isdigit((unsigned char)*str) || *str == '8' || *str == '9') goto done; retval = (retval * 8) + (*str - '0'); str++; -- cgit v1.1