head 1.1; access; symbols pkgsrc-2026Q3:1.1.0.2 pkgsrc-2026Q3-base:1.1; locks; strict; comment @// @; 1.1 date 2026.09.21.09.30.53; author wiz; state Exp; branches; next ; commitid DcN5nS5JjbbOetWG; desc @@ 1.1 log @gnuchess: fix ctype(3) problems Bump PKGREVISION. Fixes gnuchess-book build on my system. @ text @$NetBSD$ Fix ctype(3) usage. Mailed to bug-gnu-chess mailing list on 2026-09-21. --- src/frontend/cmd.cc.orig 2026-09-21 08:51:06.915496850 +0000 +++ src/frontend/cmd.cc @@@@ -69,14 +69,14 @@@@ static void split_input(void) for (k = 0, s = r = inputstr; k < TOKENS; ++k) { /* Skip leading whitespace */ - while (isspace(*s)) s++; + while (isspace((unsigned char)*s)) s++; token[k] = s; /* Skip token */ - while (*s && !isspace(*s)) r = s++; + while (*s && !isspace((unsigned char)*s)) r = s++; } while (*s) { - while (isspace(*s)) s++; - while (*s && !isspace(*s)) r = s++; + while (isspace((unsigned char)*s)) s++; + while (*s && !isspace((unsigned char)*s)) r = s++; } r[1] = '\0'; } @@@@ -87,10 +87,10 @@@@ static int tokeneq(const char *s, const char *t) */ static int tokeneq(const char *s, const char *t) { - while (*s && *t && !isspace(*s) && !isspace(*t)) { + while (*s && *t && !isspace((unsigned char)*s) && !isspace((unsigned char)*t)) { if (*s++ != *t++) return 0; } - return (!*s || isspace(*s)) && (!*t || isspace(*t)); + return (!*s || isspace((unsigned char)*s)) && (!*t || isspace((unsigned char)*t)); } /* @