head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.12.05.19.15.55; author wiz; state Exp; branches; next ; commitid jgn2QQrSSCk64a6H; desc @@ 1.1 log @snobol: fix ctype(3) abuse Fixes build. Add comments to patches while here. Bump PKGREVISION. @ text @$NetBSD$ Fix ctype(3) abuse. --- lib/str.c.orig +++ lib/str.c @@@@ -28,7 +28,7 @@@@ len = S_L(sp2); cp = S_SP(sp2) + len - 1; - while (len > 0 && isspace(*cp)) { + while (len > 0 && isspace((unsigned char)*cp)) { len--; cp--; } @@@@ -48,8 +48,8 @@@@ cp = S_SP(sp); while (len-- > 0) { - if (islower(*cp)) - *cp = toupper(*cp); + if (islower((unsigned char)*cp)) + *cp = toupper((unsigned char)*cp); cp++; } } @@@@ -69,8 +69,8 @@@@ raised = 0; while (len-- > 0) { - if (islower(*sp)) { - *dp++ = toupper(*sp); + if (islower((unsigned char)*sp)) { + *dp++ = toupper((unsigned char)*sp); sp++; raised++; } @