pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/wm/afterstep



Module Name:    pkgsrc
Committed By:   gutteridge
Date:           Thu Oct 23 01:28:09 UTC 2025

Modified Files:
        pkgsrc/wm/afterstep: Makefile distinfo
        pkgsrc/wm/afterstep/patches: patch-libAfterBase_ashash.c
            patch-libAfterBase_xml.c patch-libAfterConf_Color.c
            patch-libAfterConf_Feel.c patch-libAfterImage_asfont.c
            patch-libAfterStep_session.c patch-src_afterstep_menuitem.c
Added Files:
        pkgsrc/wm/afterstep/patches: patch-libASGTK_asgtkxmleditor.c
            patch-libAfterBase_audit.c patch-libAfterBase_fs.c
            patch-libAfterBase_xml.h patch-libAfterConf_Pager.c
            patch-libAfterConf_WinList.c patch-libAfterConf_function.c
            patch-libAfterImage_afterbase.c
            patch-libAfterImage_asim__afterbase.h
            patch-libAfterImage_asimagexml.c patch-libAfterImage_blender.c
            patch-libAfterImage_xpm.c patch-libAfterStep_clientprops.c
            patch-libAfterStep_module.c patch-src_ASConfig_ASConfig.c
            patch-src_ASDocGen_ASDocGen.c patch-src_ASDocGen_robodoc.c
            patch-src_Arrange_Arrange.c patch-src_Clean_Clean.c
            patch-src_Form_Form.c patch-src_Gnome_Gnome.c
            patch-src_Pager_Pager.c patch-src_Script_Instructions.c
            patch-src_Script_Script.c patch-src_Scroll_Scroll.c
            patch-src_WinCommand_WinCommand.c patch-src_WinTabs_WinTabs.c
            patch-src_afterstep_aswindow.c patch-src_afterstep_configure.c
            patch-src_afterstep_dirtree.c patch-src_afterstep_functions.c
            patch-src_afterstep_housekeeping.c patch-src_afterstep_menus.c
            patch-src_afterstep_theme.c patch-src_ascp_asimbrowser.c
            patch-src_asetroot_asetroot.c patch-src_tools_ASRun_main.c

Log Message:
afterstep: patch still more ctype(3) issues

This application is absolutely peppered with ctype(3) calls, made more
challenging for mechanical fixes by the fact that the coding style
varies from line to line even within the same file. (Curiously, in a
few spots, like two in Form.c, they already do cast to unsigned char,
but in the vast majority of cases, they don't.)

This tamps down on more crashes in current-ish NetBSD, though it seems
there's an unrelated issue with locale handling still.

This is almost dead upstream (no release since 2013). We can try to
keep it running here for now.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 pkgsrc/wm/afterstep/Makefile
cvs rdiff -u -r1.33 -r1.34 pkgsrc/wm/afterstep/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/wm/afterstep/patches/patch-libASGTK_asgtkxmleditor.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterBase_audit.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterBase_fs.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.h \
    pkgsrc/wm/afterstep/patches/patch-libAfterConf_Pager.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterConf_WinList.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterConf_function.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterImage_afterbase.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterImage_asim__afterbase.h \
    pkgsrc/wm/afterstep/patches/patch-libAfterImage_asimagexml.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterImage_blender.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterImage_xpm.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterStep_clientprops.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterStep_module.c \
    pkgsrc/wm/afterstep/patches/patch-src_ASConfig_ASConfig.c \
    pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_ASDocGen.c \
    pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_robodoc.c \
    pkgsrc/wm/afterstep/patches/patch-src_Arrange_Arrange.c \
    pkgsrc/wm/afterstep/patches/patch-src_Clean_Clean.c \
    pkgsrc/wm/afterstep/patches/patch-src_Form_Form.c \
    pkgsrc/wm/afterstep/patches/patch-src_Gnome_Gnome.c \
    pkgsrc/wm/afterstep/patches/patch-src_Pager_Pager.c \
    pkgsrc/wm/afterstep/patches/patch-src_Script_Instructions.c \
    pkgsrc/wm/afterstep/patches/patch-src_Script_Script.c \
    pkgsrc/wm/afterstep/patches/patch-src_Scroll_Scroll.c \
    pkgsrc/wm/afterstep/patches/patch-src_WinCommand_WinCommand.c \
    pkgsrc/wm/afterstep/patches/patch-src_WinTabs_WinTabs.c \
    pkgsrc/wm/afterstep/patches/patch-src_afterstep_aswindow.c \
    pkgsrc/wm/afterstep/patches/patch-src_afterstep_configure.c \
    pkgsrc/wm/afterstep/patches/patch-src_afterstep_dirtree.c \
    pkgsrc/wm/afterstep/patches/patch-src_afterstep_functions.c \
    pkgsrc/wm/afterstep/patches/patch-src_afterstep_housekeeping.c \
    pkgsrc/wm/afterstep/patches/patch-src_afterstep_menus.c \
    pkgsrc/wm/afterstep/patches/patch-src_afterstep_theme.c \
    pkgsrc/wm/afterstep/patches/patch-src_ascp_asimbrowser.c \
    pkgsrc/wm/afterstep/patches/patch-src_asetroot_asetroot.c \
    pkgsrc/wm/afterstep/patches/patch-src_tools_ASRun_main.c
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/wm/afterstep/patches/patch-libAfterBase_ashash.c
cvs rdiff -u -r1.1 -r1.2 pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterConf_Feel.c \
    pkgsrc/wm/afterstep/patches/patch-libAfterStep_session.c \
    pkgsrc/wm/afterstep/patches/patch-src_afterstep_menuitem.c
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/wm/afterstep/patches/patch-libAfterConf_Color.c
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/wm/afterstep/patches/patch-libAfterImage_asfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/wm/afterstep/Makefile
diff -u pkgsrc/wm/afterstep/Makefile:1.115 pkgsrc/wm/afterstep/Makefile:1.116
--- pkgsrc/wm/afterstep/Makefile:1.115  Fri Sep 12 02:18:42 2025
+++ pkgsrc/wm/afterstep/Makefile        Thu Oct 23 01:28:07 2025
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.115 2025/09/12 02:18:42 gutteridge Exp $
+# $NetBSD: Makefile,v 1.116 2025/10/23 01:28:07 gutteridge Exp $
 
 DISTNAME=      AfterStep-2.2.12
 PKGNAME=       ${DISTNAME:S/AfterStep/afterstep/}
-PKGREVISION=   16
+PKGREVISION=   17
 CATEGORIES=    wm
 MASTER_SITES=  ftp://ftp.afterstep.org/stable/
 EXTRACT_SUFX=  .tar.bz2

Index: pkgsrc/wm/afterstep/distinfo
diff -u pkgsrc/wm/afterstep/distinfo:1.33 pkgsrc/wm/afterstep/distinfo:1.34
--- pkgsrc/wm/afterstep/distinfo:1.33   Fri Sep 12 02:18:42 2025
+++ pkgsrc/wm/afterstep/distinfo        Thu Oct 23 01:28:07 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.33 2025/09/12 02:18:42 gutteridge Exp $
+$NetBSD: distinfo,v 1.34 2025/10/23 01:28:07 gutteridge Exp $
 
 BLAKE2s (AfterStep-2.2.12.tar.bz2) = 7805d82301489abce1fb81b73beeff5c2efee85592281578a06c3bcbe1056ac8
 SHA512 (AfterStep-2.2.12.tar.bz2) = 5cac6ce74b24cbcc5b8e8a6f7cc9308e110f0d09597af1fa0a8730d5f5111932a23332629bc4d372fc8d9583a514d97e35f747b17decf8d4ebfe5e3f20cdbbee
@@ -10,25 +10,38 @@ SHA1 (patch-autoconf_Makefile.common.lib
 SHA1 (patch-autoconf_Makefile.defines.in) = db514fe09dc5099608eba0e79fdb43730163ef73
 SHA1 (patch-autoconf_configure.in) = 0cfa6bd097b448366c158069d7e835c36367ff80
 SHA1 (patch-configure) = 4e64f3f86da064a9b2bc061183afe602356e6d25
+SHA1 (patch-libASGTK_asgtkxmleditor.c) = 44a845bc5f8c983e32096c24f6b399a3adcd5c86
 SHA1 (patch-libAfterBase_Makefile.in) = 37341614052652d0370e5406096ef1b695e6eeb1
-SHA1 (patch-libAfterBase_ashash.c) = d893caaf3db1523e7e6a11f5677def3078a2c8e5
+SHA1 (patch-libAfterBase_ashash.c) = 2327778708c1ac55594a41f2ee034ecc6776a04f
 SHA1 (patch-libAfterBase_asvector.c) = b4feb2a0f10110464d798f1ea405fd4a40490e52
 SHA1 (patch-libAfterBase_asvector.h) = f1c775e576dcdbbd8fa73a4fd362dc6e17d84b58
+SHA1 (patch-libAfterBase_audit.c) = f5301ef4fec44b11aef9a06f2de0dbfd153bdf16
+SHA1 (patch-libAfterBase_fs.c) = 932dcb6d8fb5ba20407235ebbe2b1e2fa027e52f
 SHA1 (patch-libAfterBase_mystring.c) = 25c2b226c6770c0352baddfa75b5ebe3b7023f06
 SHA1 (patch-libAfterBase_output.c) = fe0d9b4cbe3c2d1eac50e4c4c0d6fbd3b8b7487f
 SHA1 (patch-libAfterBase_parse.c) = aba8ed0b11821ed09ded8833140c250abf6ea6da
 SHA1 (patch-libAfterBase_parse.h) = 5e2e0a1b3351f7d3b7d84076879e3827d47e3f24
 SHA1 (patch-libAfterBase_selfdiag.c) = 72fa80bb37f8c73bcf27eb9c0a7b65af561d2e96
-SHA1 (patch-libAfterBase_xml.c) = 5ecace36950f53764d520f142ae90a8513870628
-SHA1 (patch-libAfterConf_Color.c) = fb4de950918c36cedf0b0364466f16660257f43e
+SHA1 (patch-libAfterBase_xml.c) = 0f35ef545760094f26a0169f9863dcfdcf15d3ba
+SHA1 (patch-libAfterBase_xml.h) = 9736f2090c3c8586c95aea5a6baf9cbd9ad778d7
+SHA1 (patch-libAfterConf_Color.c) = 7f6af8cd03adf647d442df562c94ae38a0e2685c
 SHA1 (patch-libAfterConf_DesktopEntry.c) = e62c9cdb7fb1a05954fed56a28b5b2b38f79aa07
-SHA1 (patch-libAfterConf_Feel.c) = 7cd0d3672edec8f06538de560b66203b11fd84ba
+SHA1 (patch-libAfterConf_Feel.c) = b4b6ddc15d5a3bfce2989bb809b6ac9f64440759
+SHA1 (patch-libAfterConf_Pager.c) = b9d3026c3444d16c4baee64e9c25408aed36b24c
+SHA1 (patch-libAfterConf_WinList.c) = 8c646e6cac64c32fbae0439d998bb25ed66a48d7
+SHA1 (patch-libAfterConf_function.c) = f0b5ec1815cc938b39012ce1bf8364937c9877d7
 SHA1 (patch-libAfterImage_Makefile.in) = ab36cc32d9d4ff44ec33471b279715715227ee26
+SHA1 (patch-libAfterImage_afterbase.c) = dd38d9bda804a4e4d11240249867730cf3b0ef8a
 SHA1 (patch-libAfterImage_aftershow_Makefile.in) = 7183aa0afcf0bccd7fea676184ebd5afa2c453d5
 SHA1 (patch-libAfterImage_apps_Makefile.in) = b7eadc7631ba0b076d481b318511b2273c1d7082
-SHA1 (patch-libAfterImage_asfont.c) = 4fd6498495855c2909530ac5e34accb715b48497
+SHA1 (patch-libAfterImage_asfont.c) = 25b9e56ee9e8a0b01bd4c39353ea5acc448a9cc9
+SHA1 (patch-libAfterImage_asim__afterbase.h) = a768c1bc968073df2604e9c01b152e191a4b8336
+SHA1 (patch-libAfterImage_asimagexml.c) = cd9216ea1a2b9ee2698052ced869083a46559d77
+SHA1 (patch-libAfterImage_blender.c) = 1ae1dba44264f1a4bc7e398e3f06e82ef639e988
 SHA1 (patch-libAfterImage_import.c) = 6b1704fc631fcfdc559d0cf2aff9caf18f7137d2
+SHA1 (patch-libAfterImage_xpm.c) = 20f11c8c69b98ac8efddd037394dc795eafb9fb4
 SHA1 (patch-libAfterStep_asapp.c) = b682e6a8ea7bb988cc9e35ca7d73f23a18f428bb
+SHA1 (patch-libAfterStep_clientprops.c) = 847f38680fa2a0dfa033546344d05ca731f99c48
 SHA1 (patch-libAfterStep_colorscheme.c) = 410e7f6c91eb998769623335d23fd14ce42c50b2
 SHA1 (patch-libAfterStep_font.c) = 07c987e232f0f66e4d311651ebd7999ac6a559ca
 SHA1 (patch-libAfterStep_freestor.c) = 71e1b2de429bcbad4f9b6fb76567336336ec201b
@@ -36,16 +49,40 @@ SHA1 (patch-libAfterStep_functions.c) = 
 SHA1 (patch-libAfterStep_functions.h) = 3561109e4adcffbc2052a1f2a358ffe7cc2d9147
 SHA1 (patch-libAfterStep_hints.c) = 0a1e4c55bdb89e8ffcc91c09f75e00100c992330
 SHA1 (patch-libAfterStep_kde.c) = fae88756b6ea5cef21a97e7f4dd1cde28016a27d
+SHA1 (patch-libAfterStep_module.c) = cb1c6909130dcefd4e1cc611f2bcc6102db5d404
 SHA1 (patch-libAfterStep_mylook.c) = 23d8fc3e94a62106080b061bbe575587112a07ec
 SHA1 (patch-libAfterStep_mylook.h) = 0ebab667d7e03f211f9b4e68ccef2452b49ff9db
 SHA1 (patch-libAfterStep_parser.c) = ae7ba594cf19c0001f99567f5c4a9d8754fd4ac4
 SHA1 (patch-libAfterStep_parser__xml.c) = e02a1c2399fceee2cd25e7775f0643d85a5b01c9
 SHA1 (patch-libAfterStep_screen.c) = 18f23efd45e82528c7c12a0ef1aae255b0dfbc56
-SHA1 (patch-libAfterStep_session.c) = 3e3ab5c2db80be7b9b9610a53b48624c9200f936
+SHA1 (patch-libAfterStep_session.c) = c9af293f9a8777e0f84848ad9b2f0e8e1d4e01ed
+SHA1 (patch-src_ASConfig_ASConfig.c) = c32e95e7360ef3fbf37aab60c7f60d5e990a3924
+SHA1 (patch-src_ASDocGen_ASDocGen.c) = d709d7058c8154044c687d3a116df01e5f527e85
 SHA1 (patch-src_ASDocGen_Makefile.in) = c879bca9d2e4acf6776dfeef8557b8f72f77ab82
+SHA1 (patch-src_ASDocGen_robodoc.c) = 96bc9615bbaae985c038c71df7d5851ef3c85191
 SHA1 (patch-src_ASDocGen_xmlproc.c) = fc8f974b8b53e0285a5323a76737dcc067a4ee03
 SHA1 (patch-src_Animate_Makefile.in) = fd5c50d91233e062c05c3bd4abe85741f345dff4
+SHA1 (patch-src_Arrange_Arrange.c) = 5f490fc7ab91bb696edd7d560f68abda5cb2b87c
+SHA1 (patch-src_Clean_Clean.c) = a57eb50ad7b7fb3a8c5492dbb080834bfe3632ea
+SHA1 (patch-src_Form_Form.c) = 60fa47709318512a4b0dcf23988aa31590c39ba1
+SHA1 (patch-src_Gnome_Gnome.c) = 781b566eb7ce9a5834cd1593cb93681220939a82
+SHA1 (patch-src_Pager_Pager.c) = 07f71ddbfca5a3c6071f672b8ffa771af20ff8b4
+SHA1 (patch-src_Script_Instructions.c) = 1f7854a9db20740883662c2122dccf23d970528c
+SHA1 (patch-src_Script_Script.c) = 1d85cedba72d5bb26812ffc1a0e8bb3ee5105d6b
+SHA1 (patch-src_Scroll_Scroll.c) = ccb6e2575e637442392725abd68a2308856d7773
+SHA1 (patch-src_WinCommand_WinCommand.c) = b7ca356da631d669186f65548326bb3db7c9a3c4
+SHA1 (patch-src_WinTabs_WinTabs.c) = 909bdbf9ae457f79fcb7efbf7216c0eabf651b9d
 SHA1 (patch-src_afterstep_asinternals.h) = 92264d8a7397001a6b5934397670d85b94c5e10a
+SHA1 (patch-src_afterstep_aswindow.c) = 26dcdf14d94cb949103893e91484883e015e9031
+SHA1 (patch-src_afterstep_configure.c) = 0cb10a76d77e1a549cbb98f95b93e2dbeff5ec8a
+SHA1 (patch-src_afterstep_dirtree.c) = 3d7084b3a38199069c90e72120eaa99092936c07
 SHA1 (patch-src_afterstep_events.c) = f6636a0741ca3912189d390b6fb47d0a4fb2fc37
-SHA1 (patch-src_afterstep_menuitem.c) = c2d141a39069301b02cb51d7a478d7ce26082b86
+SHA1 (patch-src_afterstep_functions.c) = 27ab937ed00c2c1f2c4a7aab30d26a6e64ba80b5
+SHA1 (patch-src_afterstep_housekeeping.c) = c2aac603a0a1cc415735253e8bf2409a8320bc11
+SHA1 (patch-src_afterstep_menuitem.c) = 55949a9334dd2dee1b7e982ae5f100418e92344c
+SHA1 (patch-src_afterstep_menus.c) = 0a75e2ac217861170dc3a0ad5dabe8160cf37e7e
 SHA1 (patch-src_afterstep_misc.c) = 5025169242453fb35b96adbb5e0aec1173db8447
+SHA1 (patch-src_afterstep_theme.c) = 4075c64df5a887ec0e2d870b50d89f7e056684eb
+SHA1 (patch-src_ascp_asimbrowser.c) = 3cfa715d6502fa30a39269104b97a80aad02654d
+SHA1 (patch-src_asetroot_asetroot.c) = a32987c01d3a5009ba2da28d2bb11851cf474e04
+SHA1 (patch-src_tools_ASRun_main.c) = d55edaa4f168983be0d8b3114313ac73ced8241d

Index: pkgsrc/wm/afterstep/patches/patch-libAfterBase_ashash.c
diff -u pkgsrc/wm/afterstep/patches/patch-libAfterBase_ashash.c:1.4 pkgsrc/wm/afterstep/patches/patch-libAfterBase_ashash.c:1.5
--- pkgsrc/wm/afterstep/patches/patch-libAfterBase_ashash.c:1.4 Sun Jul 11 12:13:17 2021
+++ pkgsrc/wm/afterstep/patches/patch-libAfterBase_ashash.c     Thu Oct 23 01:28:08 2025
@@ -1,6 +1,7 @@
-$NetBSD: patch-libAfterBase_ashash.c,v 1.4 2021/07/11 12:13:17 bsiegert Exp $
+$NetBSD: patch-libAfterBase_ashash.c,v 1.5 2025/10/23 01:28:08 gutteridge Exp $
 
 Patch up gcc inline mess.
+Use ctype.h correctly.
 
 --- libAfterBase/ashash.c.orig 2013-05-01 13:34:11.000000000 +0000
 +++ libAfterBase/ashash.c
@@ -31,3 +32,72 @@ Patch up gcc inline mess.
  curr_hash_data (ASHashIterator * iterator)
  {
        if (iterator)
+@@ -663,19 +663,19 @@ casestring_hash_value (ASHashableValue v
+       {
+               if( (c=string[i]) != 0)
+               {
+-                      if (isupper (c))c = tolower (c);
++                      if (isupper ((unsigned char)c))c = tolower ((unsigned char)c);
+                       hash_key += (ASHashKey) c;
+                       if( string[++i] != 0 && (c=string[++i]) != 0)
+                       {
+-                              if (isupper (c))c = tolower (c);
++                              if (isupper ((unsigned char)c))c = tolower ((unsigned char)c);
+                               hash_key += ((ASHashKey) c)<<1;
+                               if( string[++i] != 0 && (c=string[++i]) != 0)
+                               {
+-                                      if (isupper (c))c = tolower (c);
++                                      if (isupper ((unsigned char)c))c = tolower ((unsigned char)c);
+                                       hash_key += ((ASHashKey) c)<<2;
+                                       if( string[++i] != 0 && (c=string[++i]) != 0)
+                                       {
+-                                              if (isupper (c))c = tolower (c);
++                                              if (isupper ((unsigned char)c))c = tolower ((unsigned char)c);
+                                               hash_key += ((ASHashKey) c)<<3;
+                                       }
+                               }
+@@ -706,10 +706,10 @@ casestring_compare (ASHashableValue valu
+ 
+               u1 = str1[i];
+               u2 = str2[i];
+-              if (islower (u1))
+-                      u1 = toupper (u1);
+-              if (islower (u2))
+-                      u2 = toupper (u2);
++              if (islower ((unsigned char)u1))
++                      u1 = toupper ((unsigned char)u1);
++              if (islower ((unsigned char)u2))
++                      u2 = toupper ((unsigned char)u2);
+               if (u1 != u2)
+                       return (long)u1 - (long)u2;
+       }while( str1[i++] );
+@@ -728,11 +728,11 @@ option_hash_value (ASHashableValue value
+       do
+       {
+               c = opt[i];
+-#define VALID_OPTION_CHAR(c)          (isalnum ((int)c) || (c) == '~' || (c) == '_')
++#define VALID_OPTION_CHAR(c)          (isalnum ((unsigned char)c) || (c) == '~' || (c) == '_')
+               if (c == '\0' || !VALID_OPTION_CHAR(c))
+                       break;
+-              if (isupper ((int)c))
+-                      c = tolower ((int)c);
++              if (isupper ((unsigned char)c))
++                      c = tolower ((unsigned char)c);
+               hash_key += (((ASHashKey) c) << i);
+               ++i;
+       }while( i < ((sizeof (ASHashKey) - sizeof (char)) << 3) );
+@@ -762,10 +762,10 @@ option_compare (ASHashableValue value1, 
+                       return ( VALID_OPTION_CHAR(u2) )? (long)u1 - (long)u2: 0;
+               ++i ;
+ 
+-              if (islower (u1))
+-                      u1 = toupper (u1);
+-              if (islower (u2))
+-                      u2 = toupper (u2);
++              if (islower ((unsigned char)u1))
++                      u1 = toupper ((unsigned char)u1);
++              if (islower ((unsigned char)u2))
++                      u2 = toupper ((unsigned char)u2);
+               if (u1 != u2)
+                       return (long)u1 - (long)u2;
+       }

Index: pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.c
diff -u pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.c:1.1 pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.c:1.2
--- pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.c:1.1    Thu Sep 11 21:35:01 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.c        Thu Oct 23 01:28:08 2025
@@ -1,4 +1,4 @@
-$NetBSD: patch-libAfterBase_xml.c,v 1.1 2025/09/11 21:35:01 gutteridge Exp $
+$NetBSD: patch-libAfterBase_xml.c,v 1.2 2025/10/23 01:28:08 gutteridge Exp $
 
 Use ctype.h correctly.
 
@@ -13,7 +13,7 @@ Use ctype.h correctly.
        return str;
  }
  
-@@ -157,7 +157,7 @@ xml_elem_t* xml_parse_parm(const char* p
+@@ -157,20 +157,20 @@ xml_elem_t* xml_parse_parm(const char* p
                const char* eval;
  
                /* Spin past any leading whitespace. */
@@ -21,8 +21,11 @@ Use ctype.h correctly.
 +              for (bname = eparm ; isspace((unsigned char)*bname) ; bname++);
  
                /* Check for a parm.  First is the parm name. */
-               for (ename = bname ; xml_tagchar((int)*ename) ; ename++);
-@@ -167,10 +167,10 @@ xml_elem_t* xml_parse_parm(const char* p
+-              for (ename = bname ; xml_tagchar((int)*ename) ; ename++);
++              for (ename = bname ; xml_tagchar(*ename) ; ename++);
+ 
+               /* No name equals no parm equals broken tag. */
+               if (!*ename) { eparm = NULL; break; }
  
                /* No "=" equals broken tag.  We do not support HTML-style parms */
                /* with no value.                                                */
@@ -57,16 +60,26 @@ Use ctype.h correctly.
                fprintf(stderr, "%s", ptr);
        } else {
                if( root->child != NULL || root->next != NULL  ) 
-@@ -352,7 +352,7 @@ int xml_parse(const char* str, xml_elem_
+@@ -350,9 +350,9 @@ int xml_parse(const char* str, xml_elem_
+               {
+                       const char* etag;
                        /* Find the end of the tag. */
-                       for (etag = oab + 2 ; xml_tagchar((int)*etag) ; etag++);
+-                      for (etag = oab + 2 ; xml_tagchar((int)*etag) ; etag++);
++                      for (etag = oab + 2 ; xml_tagchar(*etag) ; etag++);
  
 -                      while (isspace((int)*etag)) ++etag;
 +                      while (isspace((unsigned char)*etag)) ++etag;
                        /* If this is an end tag, and the tag matches the tag we're parsing, */
                        /* we're done.  If not, continue on blindly. */
                        if (*etag == '>') 
-@@ -390,7 +390,7 @@ int xml_parse(const char* str, xml_elem_
+@@ -384,13 +384,13 @@ int xml_parse(const char* str, xml_elem_
+                       const char* eparm;
+ 
+                       /* Find the end of the tag. */
+-                      for (etag = btag ; xml_tagchar((int)*etag) ; etag++);
++                      for (etag = btag ; xml_tagchar(*etag) ; etag++);
+ 
+                       /* If we reached the end of the document, continue on. */
                        if (!*etag) { ptr = oab + 1; continue; }
  
                        /* Find the beginning of the parameters, if they exist. */
@@ -75,7 +88,7 @@ Use ctype.h correctly.
  
                        /* From here on, we're looking for a sequence of parms, which have
                         * the form [a-z0-9-]+=("[^"]"|'[^']'|[^ \t\n]), followed by either
-@@ -399,7 +399,7 @@ int xml_parse(const char* str, xml_elem_
+@@ -399,23 +399,23 @@ int xml_parse(const char* str, xml_elem_
                                const char* tmp;
  
                                /* Spin past any leading whitespace. */
@@ -84,7 +97,13 @@ Use ctype.h correctly.
  
                                /* Are we at the end of the tag? */
                                if (*eparm == '>' || (*eparm == '/' && eparm[1] == '>')) break;
-@@ -412,10 +412,10 @@ int xml_parse(const char* str, xml_elem_
+ 
+                               /* Check for a parm.  First is the parm name. */
+-                              for (tmp = eparm ; xml_tagchar((int)*tmp) ; tmp++);
++                              for (tmp = eparm ; xml_tagchar(*tmp) ; tmp++);
+ 
+                               /* No name equals no parm equals broken tag. */
+                               if (!*tmp) { eparm = NULL; break; }
  
                                /* No "=" equals broken tag.  We do not support HTML-style parms
                                   with no value. */
Index: pkgsrc/wm/afterstep/patches/patch-libAfterConf_Feel.c
diff -u pkgsrc/wm/afterstep/patches/patch-libAfterConf_Feel.c:1.1 pkgsrc/wm/afterstep/patches/patch-libAfterConf_Feel.c:1.2
--- pkgsrc/wm/afterstep/patches/patch-libAfterConf_Feel.c:1.1   Sat Sep  6 13:29:18 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterConf_Feel.c       Thu Oct 23 01:28:08 2025
@@ -1,6 +1,7 @@
-$NetBSD: patch-libAfterConf_Feel.c,v 1.1 2025/09/06 13:29:18 gutteridge Exp $
+$NetBSD: patch-libAfterConf_Feel.c,v 1.2 2025/10/23 01:28:08 gutteridge Exp $
 
 Need function prototype for XkbKeycodeToKeysym(3).
+Use ctype.h correctly.
 
 --- libAfterConf/Feel.c.orig   2013-05-01 13:34:11.000000000 +0000
 +++ libAfterConf/Feel.c
@@ -13,3 +14,12 @@ Need function prototype for XkbKeycodeTo
  #include "../configure.h"
  #include "../libAfterStep/asapp.h"
  #include "../libAfterStep/afterstep.h"
+@@ -523,7 +525,7 @@ FeelConfig *ParseFeelOptions (const char
+                       break;
+               case FEEL_Mouse_ID:
+                       if (item.data.binding.sym)
+-                              if (isdigit ((int)item.data.binding.sym[0]) && pCurr->sub) {
++                              if (isdigit ((unsigned char)item.data.binding.sym[0]) && pCurr->sub) {
+                                       int button_num = item.data.binding.sym[0] - '0';
+ 
+                                       if (button_num >= 0 && button_num <= MAX_MOUSE_BUTTONS
Index: pkgsrc/wm/afterstep/patches/patch-libAfterStep_session.c
diff -u pkgsrc/wm/afterstep/patches/patch-libAfterStep_session.c:1.1 pkgsrc/wm/afterstep/patches/patch-libAfterStep_session.c:1.2
--- pkgsrc/wm/afterstep/patches/patch-libAfterStep_session.c:1.1        Thu Sep  4 22:50:51 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterStep_session.c    Thu Oct 23 01:28:08 2025
@@ -1,7 +1,8 @@
-$NetBSD: patch-libAfterStep_session.c,v 1.1 2025/09/04 22:50:51 gutteridge Exp $
+$NetBSD: patch-libAfterStep_session.c,v 1.2 2025/10/23 01:28:08 gutteridge Exp $
 
 Actually provide a useful error state when failing to open files
 or directories.
+Use ctype.h correctly.
 
 --- libAfterStep/session.c.orig        2013-05-01 13:34:11.000000000 +0000
 +++ libAfterStep/session.c
@@ -30,3 +31,12 @@ or directories.
                return (-1);
        }
        fclose (touch);
+@@ -1076,7 +1077,7 @@ char *make_session_webcache_file (ASSess
+               for (i = 0; url[i]; ++i) {
+                       if (url[i] == '_')
+                               escapedUrl[len++] = '_';
+-                      if (url[i] != '.' && url[i] != '_' && !isalnum (url[i]))
++                      if (url[i] != '.' && url[i] != '_' && !isalnum ((unsigned char)url[i]))
+                               escapedUrl[len++] = '_';
+                       else
+                               escapedUrl[len++] = url[i];
Index: pkgsrc/wm/afterstep/patches/patch-src_afterstep_menuitem.c
diff -u pkgsrc/wm/afterstep/patches/patch-src_afterstep_menuitem.c:1.1 pkgsrc/wm/afterstep/patches/patch-src_afterstep_menuitem.c:1.2
--- pkgsrc/wm/afterstep/patches/patch-src_afterstep_menuitem.c:1.1      Fri Sep 12 02:18:42 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_afterstep_menuitem.c  Thu Oct 23 01:28:09 2025
@@ -1,6 +1,7 @@
-$NetBSD: patch-src_afterstep_menuitem.c,v 1.1 2025/09/12 02:18:42 gutteridge Exp $
+$NetBSD: patch-src_afterstep_menuitem.c,v 1.2 2025/10/23 01:28:09 gutteridge Exp $
 
 Need function prototype for XkbKeycodeToKeysym(3).
+Use ctype.h correctly.
 
 --- src/afterstep/menuitem.c.orig      2013-05-01 13:34:11.000000000 +0000
 +++ src/afterstep/menuitem.c
@@ -22,3 +23,42 @@ Need function prototype for XkbKeycodeTo
                return md;
        }
  
+@@ -100,7 +102,7 @@ Bool MenuDataItemParse (void *data, cons
+ 
+       if (buf == NULL)
+               return False;
+-      for (; isspace (*buf); buf++) ;
++      for (; isspace ((unsigned char)*buf); buf++) ;
+       if (*buf == '\0' || *buf == '#' || *buf == '*')
+               return False;
+ 
+@@ -126,7 +128,7 @@ Bool FunctionItemParse (void *data, cons
+ 
+       if (buf == NULL)
+               return False;
+-      for (; isspace (*buf); buf++) ;
++      for (; isspace ((unsigned char)*buf); buf++) ;
+       if (*buf == '\0' || *buf == '#' || *buf == '*')
+               return False;
+ 
+@@ -163,7 +165,7 @@ ParseBody (void *data, FILE * fd, Bool (
+       buf = safemalloc (MAXLINELENGTH + 1);
+       while ((ptr = fgets (buf, MAXLINELENGTH, fd)) != NULL) {
+               LOCAL_DEBUG_OUT ("parsing Popup line \"%s\"", buf);
+-              while (isspace (*ptr))
++              while (isspace ((unsigned char)*ptr))
+                       ptr++;
+               if (!item_func (data, ptr))
+                       if (mystrncasecmp ("End", ptr, 3) == 0) {
+@@ -215,9 +217,9 @@ void ParseMouseEntry (char *tline, FILE 
+       int contexts, mods;
+       FunctionData *fdata;
+ 
+-      while (isspace (*tline))
++      while (isspace ((unsigned char)*tline))
+               tline++;
+-      while (isdigit (*tline)) {
++      while (isdigit ((unsigned char)*tline)) {
+               button = button * 10 + (int)((*tline) - '0');
+               tline++;
+       }

Index: pkgsrc/wm/afterstep/patches/patch-libAfterConf_Color.c
diff -u pkgsrc/wm/afterstep/patches/patch-libAfterConf_Color.c:1.2 pkgsrc/wm/afterstep/patches/patch-libAfterConf_Color.c:1.3
--- pkgsrc/wm/afterstep/patches/patch-libAfterConf_Color.c:1.2  Sun Jul 11 12:13:17 2021
+++ pkgsrc/wm/afterstep/patches/patch-libAfterConf_Color.c      Thu Oct 23 01:28:08 2025
@@ -1,7 +1,6 @@
-$NetBSD: patch-libAfterConf_Color.c,v 1.2 2021/07/11 12:13:17 bsiegert Exp $
+$NetBSD: patch-libAfterConf_Color.c,v 1.3 2025/10/23 01:28:08 gutteridge Exp $
 
 Use ctype.h correctly.
-Fix some printf formats.
 
 --- libAfterConf/Color.c.orig  2013-05-01 13:34:11.000000000 +0000
 +++ libAfterConf/Color.c

Index: pkgsrc/wm/afterstep/patches/patch-libAfterImage_asfont.c
diff -u pkgsrc/wm/afterstep/patches/patch-libAfterImage_asfont.c:1.3 pkgsrc/wm/afterstep/patches/patch-libAfterImage_asfont.c:1.4
--- pkgsrc/wm/afterstep/patches/patch-libAfterImage_asfont.c:1.3        Sun May  1 19:30:58 2016
+++ pkgsrc/wm/afterstep/patches/patch-libAfterImage_asfont.c    Thu Oct 23 01:28:08 2025
@@ -1,9 +1,19 @@
-$NetBSD: patch-libAfterImage_asfont.c,v 1.3 2016/05/01 19:30:58 dholland Exp $
+$NetBSD: patch-libAfterImage_asfont.c,v 1.4 2025/10/23 01:28:08 gutteridge Exp $
 
 Patch up gcc inline mess.
+Use ctype.h correctly.
 
---- libAfterImage/asfont.c.orig        2008-08-15 21:47:37.000000000 +0000
+--- libAfterImage/asfont.c.orig        2013-05-01 13:34:11.000000000 +0000
 +++ libAfterImage/asfont.c
+@@ -173,7 +173,7 @@ open_freetype_font_int( ASFontManager *f
+                       register int i = 0;
+                       while(tmp[i] != '\0' ) ++i ;
+                       while( --i >= 0 )
+-                              if( !isdigit( tmp[i] ) )
++                              if( !isdigit( (unsigned char)tmp[i] ) )
+                               {
+                                       if( tmp[i] == '.' )
+                                       {
 @@ -367,7 +367,7 @@ release_font( ASFont *font )
        return res ;
  }

Added files:

Index: pkgsrc/wm/afterstep/patches/patch-libASGTK_asgtkxmleditor.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libASGTK_asgtkxmleditor.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libASGTK_asgtkxmleditor.c Thu Oct 23 01:28:07 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-libASGTK_asgtkxmleditor.c,v 1.1 2025/10/23 01:28:07 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libASGTK/asgtkxmleditor.c.orig     2013-05-01 13:34:11.000000000 +0000
++++ libASGTK/asgtkxmleditor.c
+@@ -248,7 +248,7 @@ static char *get_validated_text (ASGtkXM
+                                        xb.state, xb.tags_count, xb.level, xb.tag_type);
+ 
+                       if (xb.state >= 0) {
+-                              if (isspace (text[char_count]) ||
++                              if (isspace ((unsigned char)text[char_count]) ||
+                                               text[char_count] == '<' ||
+                                               text[char_count] == '>' ||
+                                               text[char_count] == '=' || text[char_count] == '\"'
+@@ -684,7 +684,7 @@ insert_tag_template_at_cursor (ASGtkXMLV
+       start_text = gtk_text_iter_get_text (&line_start, &start);
+       if (start_text) {
+               for (i = 0; start_text[i] != '\0'; ++i)
+-                      if (!isspace (start_text[i]))
++                      if (!isspace ((unsigned char)start_text[i]))
+                               break;
+               if (start_text[i] == '\0')
+                       skip_leading_eol = True;
Index: pkgsrc/wm/afterstep/patches/patch-libAfterBase_audit.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterBase_audit.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterBase_audit.c      Thu Oct 23 01:28:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-libAfterBase_audit.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterBase/audit.c.orig  2013-05-01 13:34:11.000000000 +0000
++++ libAfterBase/audit.c
+@@ -645,7 +645,7 @@ output_unfreed_mem (FILE *stream)
+                                                if (ptr[i] == '\0')
+                                                        break;
+                                                /* don't print strings containing non-space control characters or high ASCII */
+-                                               if ((ptr[i] <= 0x20 && !isspace (ptr[i])) || ptr[i] >= 0x80)
++                                               if ((ptr[i] <= 0x20 && !isspace ((unsigned char)ptr[i])) || ptr[i] >= 0x80)
+                                                        i = m->length;
+                                        }
+                                        if (i < m->length)
Index: pkgsrc/wm/afterstep/patches/patch-libAfterBase_fs.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterBase_fs.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterBase_fs.c Thu Oct 23 01:28:08 2025
@@ -0,0 +1,34 @@
+$NetBSD: patch-libAfterBase_fs.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterBase/fs.c.orig     2013-05-01 13:34:11.000000000 +0000
++++ libAfterBase/fs.c
+@@ -377,7 +377,7 @@ find_envvar (char *var_start, int *end_p
+               tmp[i-1] = '\0' ;
+       } else
+       {       
+-              for (i = 0; (isalnum ((int)var_start[i]) || var_start[i] == '_') && i < 255; i++)
++              for (i = 0; (isalnum ((unsigned char)var_start[i]) || var_start[i] == '_') && i < 255; i++)
+                       tmp[i] = var_start[i] ;
+               tmp[i] = '\0';
+       }               
+@@ -520,14 +520,14 @@ get_executable_in_path (const char *name
+       }
+ 
+       /* cut leading "exec" enclosed in spaces */
+-      for (; isspace ((int)*name); name++);
+-      if (!mystrncasecmp(name, "exec", 4) && isspace ((int)name[4]))
++      for (; isspace ((unsigned char)*name); name++);
++      if (!mystrncasecmp(name, "exec", 4) && isspace ((unsigned char)name[4]))
+               name += 4;
+-      for (; isspace ((int)*name); name++);
++      for (; isspace ((unsigned char)*name); name++);
+       if (*name == '\0')
+               return 0;
+ 
+-      for (i = 0; name[i] && !isspace ((int)name[i]); i++);
++      for (i = 0; name[i] && !isspace ((unsigned char)name[i]); i++);
+       if (i == 0)
+               return 0;
+ 
Index: pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.h
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.h:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.h        Thu Oct 23 01:28:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-libAfterBase_xml.h,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterBase/xml.h.orig    2013-05-01 13:34:11.000000000 +0000
++++ libAfterBase/xml.h
+@@ -7,7 +7,7 @@ extern "C" {
+ 
+ struct ASHashTable;
+ 
+-#define xml_tagchar(a) (isalnum(a) || (a) == '-' || (a) == '_')
++#define xml_tagchar(a) (isalnum((unsigned char)a) || (a) == '-' || (a) == '_')
+ 
+ #define XML_CDATA_STR                 "CDATA"
+ #define XML_CONTAINER_STR     "CONTAINER"
Index: pkgsrc/wm/afterstep/patches/patch-libAfterConf_Pager.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterConf_Pager.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterConf_Pager.c      Thu Oct 23 01:28:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-libAfterConf_Pager.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterConf/Pager.c.orig  2013-05-01 13:34:11.000000000 +0000
++++ libAfterConf/Pager.c
+@@ -453,7 +453,7 @@ PagerConfig *ParsePagerOptions (const ch
+                                                       parse_filename (item.data.string,
+                                                                                                                       &(config->shade_button[0]));
+ 
+-                                      while (isspace (*tmp))
++                                      while (isspace ((unsigned char)*tmp))
+                                               ++tmp;
+                                       if (*tmp != '\0')
+                                               parse_filename (tmp, &(config->shade_button[1]));
Index: pkgsrc/wm/afterstep/patches/patch-libAfterConf_WinList.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterConf_WinList.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterConf_WinList.c    Thu Oct 23 01:28:08 2025
@@ -0,0 +1,26 @@
+$NetBSD: patch-libAfterConf_WinList.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterConf/WinList.c.orig        2013-05-01 13:34:11.000000000 +0000
++++ libAfterConf/WinList.c
+@@ -377,16 +377,16 @@ WinList_fs2config (ASModuleConfig * asmo
+ 
+                                       if (mystrncasecmp (ptr, "Click", 5) == 0)
+                                               ptr += 5;
+-                                      if (isdigit (ptr[0])) {
++                                      if (isdigit ((unsigned char)ptr[0])) {
+                                               action_no = atoi (ptr);
+                                               if (action_no <= 0)
+                                                       action_no = 1;
+                                               --action_no;
+                                               action_no %= MAX_MOUSE_BUTTONS;
+                                               i = 0;
+-                                              while (!isspace (ptr[i]) && ptr[i])
++                                              while (!isspace ((unsigned char)ptr[i]) && ptr[i])
+                                                       ++i;
+-                                              while (isspace (ptr[i]) && ptr[i])
++                                              while (isspace ((unsigned char)ptr[i]) && ptr[i])
+                                                       ++i;
+                                               ptr += i;
+                                       }
Index: pkgsrc/wm/afterstep/patches/patch-libAfterConf_function.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterConf_function.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterConf_function.c   Thu Oct 23 01:28:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-libAfterConf_function.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterConf/function.c.orig       2013-05-01 13:34:11.000000000 +0000
++++ libAfterConf/function.c
+@@ -199,7 +199,7 @@ FunctionData *String2Func (const char *s
+       storage->term = fterm;
+ 
+       ptr += storage->term->keyword_len;
+-      while (!isspace ((int)*ptr) && *ptr)
++      while (!isspace ((unsigned char)*ptr) && *ptr)
+               ptr++;
+       if (!(fterm->flags & NEED_CMD))
+               ptr = stripcomments (ptr);
Index: pkgsrc/wm/afterstep/patches/patch-libAfterImage_afterbase.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterImage_afterbase.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterImage_afterbase.c Thu Oct 23 01:28:08 2025
@@ -0,0 +1,338 @@
+$NetBSD: patch-libAfterImage_afterbase.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterImage/afterbase.c.orig     2013-05-01 13:34:11.000000000 +0000
++++ libAfterImage/afterbase.c
+@@ -391,7 +391,7 @@ find_envvar (char *var_start, int *end_p
+               name_start++;
+               for (i = 1; var_start[i] && var_start[i] != '}'; i++);
+       } else
+-              for (i = 0; isalnum ((int)var_start[i]) || var_start[i] == '_'; i++);
++              for (i = 0; isalnum ((unsigned char)var_start[i]) || var_start[i] == '_'; i++);
+ 
+       backup = var_start[i];
+       var_start[i] = '\0';
+@@ -520,11 +520,11 @@ asim_mystrcasecmp (const char *s1, const
+               /* in some BSD implementations, tolower(c) is not defined
+                * unless isupper(c) is true */
+               c1 = s1[i];
+-              if (isupper (c1))
+-                      c1 = tolower (c1);
++              if (isupper ((unsigned char)c1))
++                      c1 = tolower ((unsigned char)c1);
+               c2 = s2[i];
+-              if (isupper (c2))
+-                      c2 = tolower (c2);
++              if (isupper ((unsigned char)c2))
++                      c2 = tolower ((unsigned char)c2);
+ 
+               ++i ;
+               if (c1 != c2)
+@@ -547,10 +547,10 @@ asim_mystrncasecmp (const char *s1, cons
+               ++i ;
+               if (c1==0)
+                       return -c2;
+-              if (isupper (c1))
+-                      c1 = tolower(c1);
+-              if (isupper (c2))
+-                      c2 = tolower(c2);
++              if (isupper ((unsigned char)c1))
++                      c1 = tolower((unsigned char)c1);
++              if (isupper ((unsigned char)c2))
++                      c2 = tolower((unsigned char)c2);
+               if (c1 != c2)
+                       return (c1 - c2);
+       }
+@@ -581,7 +581,7 @@ static int FindColor(const char *name, C
+ /* from parse,c : */
+ const char *asim_parse_argb_color( const char *color, CARD32 *pargb )
+ {
+-#define hextoi(h)   (isdigit(h)?((h)-'0'):(isupper(h)?((h)-'A'+10):((h)-'a'+10)))
++#define hextoi(h)   (isdigit((unsigned char)h)?((h)-'0'):(isupper((unsigned char)h)?((h)-'A'+10):((h)-'a'+10)))
+       if( color )
+       {
+               if( *color == '#' )
+@@ -589,7 +589,7 @@ const char *asim_parse_argb_color( const
+                       CARD32 argb = 0 ;
+                       int len = 0 ;
+                       register const char *ptr = color+1 ;
+-                      while( isxdigit((int)ptr[len]) ) len++;
++                      while( isxdigit((unsigned char)ptr[len]) ) len++;
+                       if( len >= 3)
+                       {
+                               if( (len&0x3) == 0 && len != 12 )
+@@ -637,7 +637,7 @@ const char *asim_parse_argb_color( const
+                       register const char *ptr = &(color[0]);
+             if(!FindColor(color, pargb))
+                 return color;
+-              while( !isspace((int)*ptr) && *ptr != '\0' ) ptr++;
++              while( !isspace((unsigned char)*ptr) && *ptr != '\0' ) ptr++;
+                       return ptr;
+ #else
+                       if( dpy == NULL )
+@@ -652,7 +652,7 @@ const char *asim_parse_argb_color( const
+                               if( XLookupColor( dpy, DefaultColormap(dpy,DefaultScreen(dpy)), color, &xcol, &xcol_scr) )
+                                       *pargb = 0xFF000000|((xcol.red<<8)&0x00FF0000)|(xcol.green&0x0000FF00)|((xcol.blue>>8)&0x000000FF);
+ #endif
+-                              while( !isspace((int)*ptr) && *ptr != '\0' ) ptr++;
++                              while( !isspace((unsigned char)*ptr) && *ptr != '\0' ) ptr++;
+                               return ptr;
+                       }
+ #endif
+@@ -675,7 +675,7 @@ double asim_parse_math(const char* str, 
+       if( str == NULL ) 
+               return 0 ;
+ 
+-      while (isspace((int)*str)) str++;
++      while (isspace((unsigned char)*str)) str++;
+       if( *str == '!' ) 
+       {
+               logical_not = 1;
+@@ -688,7 +688,7 @@ double asim_parse_math(const char* str, 
+ 
+       while (*str) 
+       {
+-              while (isspace((int)*str)) str++;
++              while (isspace((unsigned char)*str)) str++;
+               if (!op) 
+               {
+                       if (*str == '+' || *str == '-' || *str == '*' || *str == '/') op = *str++;
+@@ -705,7 +705,7 @@ double asim_parse_math(const char* str, 
+                               num = asim_parse_math(str + 1, &ptr, size);
+             else if (*str == '$') 
+                       {
+-              for (ptr = (char*)str + 1 ; *ptr && !isspace(*ptr) && *ptr != '+' && *ptr != '-' && *ptr != '*' && *ptr != '!' && *ptr != '/' && *ptr != ')' ; ptr++);
++              for (ptr = (char*)str + 1 ; *ptr && !isspace((unsigned char)*ptr) && *ptr != '+' && *ptr != '-' && *ptr != '*' && *ptr != '!' && *ptr != '/' && *ptr != ')' ; ptr++);
+                       num = asim_asxml_var_nget((char*)str + 1, ptr - (str + 1));
+             }else 
+                               num = strtod(str, &ptr);
+@@ -1064,8 +1064,8 @@ asim_casestring_hash_value (ASHashableVa
+               c = string[i];
+               if (c == '\0')
+                       break;
+-              if (isupper (c))
+-                      c = tolower (c);
++              if (isupper ((unsigned char)c))
++                      c = tolower ((unsigned char)c);
+               hash_key += (((ASHashKey) c) << i);
+               ++i;
+       }while(i < ((sizeof (ASHashKey) - sizeof (char)) << 3));
+@@ -1092,10 +1092,10 @@ asim_casestring_compare (ASHashableValue
+ 
+               u1 = str1[i];
+               u2 = str2[i];
+-              if (islower (u1))
+-                      u1 = toupper (u1);
+-              if (islower (u2))
+-                      u2 = toupper (u2);
++              if (islower ((unsigned char)u1))
++                      u1 = toupper ((unsigned char)u1);
++              if (islower ((unsigned char)u2))
++                      u2 = toupper ((unsigned char)u2);
+               if (u1 != u2)
+                       return (long)u1 - (long)u2;
+       }while( str1[i++] );
+@@ -1376,7 +1376,7 @@ asim_asxml_var_cleanup(void)
+ static char* lcstring(char* str) 
+ {
+       char* ptr = str;
+-      for ( ; *ptr ; ptr++) if (isupper((int)*ptr)) *ptr = tolower((int)*ptr);
++      for ( ; *ptr ; ptr++) if (isupper((unsigned char)*ptr)) *ptr = tolower((unsigned char)*ptr);
+       return str;
+ }
+ 
+@@ -1442,20 +1442,20 @@ xml_elem_t* asim_xml_parse_parm(const ch
+               const char* eval;
+ 
+               /* Spin past any leading whitespace. */
+-              for (bname = eparm ; isspace((int)*bname) ; bname++);
++              for (bname = eparm ; isspace((unsigned char)*bname) ; bname++);
+ 
+               /* Check for a parm.  First is the parm name. */
+-              for (ename = bname ; xml_tagchar((int)*ename) ; ename++);
++              for (ename = bname ; xml_tagchar(*ename) ; ename++);
+ 
+               /* No name equals no parm equals broken tag. */
+               if (!*ename) { eparm = NULL; break; }
+ 
+               /* No "=" equals broken tag.  We do not support HTML-style parms */
+               /* with no value.                                                */
+-              for (bval = ename ; isspace((int)*bval) ; bval++);
++              for (bval = ename ; isspace((unsigned char)*bval) ; bval++);
+               if (*bval != '=') { eparm = NULL; break; }
+ 
+-              while (isspace((int)*++bval));
++              while (isspace((unsigned char)*++bval));
+ 
+               /* If the next character is a quote, spin until we see another one. */
+               if (*bval == '"' || *bval == '\'') {
+@@ -1463,10 +1463,10 @@ xml_elem_t* asim_xml_parse_parm(const ch
+                       bval++;
+                       for (eval = bval ; *eval && *eval != quote ; eval++);
+               } else {
+-                      for (eval = bval ; *eval && !isspace((int)*eval) ; eval++);
++                      for (eval = bval ; *eval && !isspace((unsigned char)*eval) ; eval++);
+               }
+ 
+-              for (eparm = eval ; *eparm && !isspace((int)*eparm) ; eparm++);
++              for (eparm = eval ; *eparm && !isspace((unsigned char)*eparm) ; eparm++);
+ 
+               /* Add the parm to our list. */
+               p = xml_elem_new();
+@@ -1550,9 +1550,9 @@ int asim_xml_parse(const char* str, xml_
+               {
+                       const char* etag;
+                       /* Find the end of the tag. */
+-                      for (etag = oab + 2 ; xml_tagchar((int)*etag) ; etag++);
++                      for (etag = oab + 2 ; xml_tagchar(*etag) ; etag++);
+ 
+-                      while (isspace((int)*etag)) ++etag;
++                      while (isspace((unsigned char)*etag)) ++etag;
+                       /* If this is an end tag, and the tag matches the tag we're parsing, */
+                       /* we're done.  If not, continue on blindly. */
+                       if (*etag == '>') 
+@@ -1582,13 +1582,13 @@ int asim_xml_parse(const char* str, xml_
+                       const char* eparm;
+ 
+                       /* Find the end of the tag. */
+-                      for (etag = btag ; xml_tagchar((int)*etag) ; etag++);
++                      for (etag = btag ; xml_tagchar(*etag) ; etag++);
+ 
+                       /* If we reached the end of the document, continue on. */
+                       if (!*etag) { ptr = oab + 1; continue; }
+ 
+                       /* Find the beginning of the parameters, if they exist. */
+-                      for (bparm = etag ; isspace((int)*bparm) ; bparm++);
++                      for (bparm = etag ; isspace((unsigned char)*bparm) ; bparm++);
+ 
+                       /* From here on, we're looking for a sequence of parms, which have
+                        * the form [a-z0-9-]+=("[^"]"|'[^']'|[^ \t\n]), followed by either
+@@ -1597,23 +1597,23 @@ int asim_xml_parse(const char* str, xml_
+                               const char* tmp;
+ 
+                               /* Spin past any leading whitespace. */
+-                              for ( ; isspace((int)*eparm) ; eparm++);
++                              for ( ; isspace((unsigned char)*eparm) ; eparm++);
+ 
+                               /* Are we at the end of the tag? */
+                               if (*eparm == '>' || (*eparm == '/' && eparm[1] == '>')) break;
+ 
+                               /* Check for a parm.  First is the parm name. */
+-                              for (tmp = eparm ; xml_tagchar((int)*tmp) ; tmp++);
++                              for (tmp = eparm ; xml_tagchar(*tmp) ; tmp++);
+ 
+                               /* No name equals no parm equals broken tag. */
+                               if (!*tmp) { eparm = NULL; break; }
+ 
+                               /* No "=" equals broken tag.  We do not support HTML-style parms
+                                  with no value. */
+-                              for ( ; isspace((int)*tmp) ; tmp++);
++                              for ( ; isspace((unsigned char)*tmp) ; tmp++);
+                               if (*tmp != '=') { eparm = NULL; break; }
+ 
+-                              do { ++tmp; } while (isspace((int)*tmp));
++                              do { ++tmp; } while (isspace((unsigned char)*tmp));
+ 
+                               /* If the next character is a quote, spin until we see another one. */
+                               if (*tmp == '"' || *tmp == '\'') {
+@@ -1622,7 +1622,7 @@ int asim_xml_parse(const char* str, xml_
+                               }
+ 
+                               /* Now look for a space or the end of the tag. */
+-                              for ( ; *tmp && !isspace((int)*tmp) && *tmp != '>' && !(*tmp == '/' && tmp[1] == '>') ; tmp++);
++                              for ( ; *tmp && !isspace((unsigned char)*tmp) && *tmp != '>' && !(*tmp == '/' && tmp[1] == '>') ; tmp++);
+ 
+                               /* If we reach the end of the string, there cannot be a '>'. */
+                               if (!*tmp) { eparm = NULL; break; }
+@@ -1630,8 +1630,8 @@ int asim_xml_parse(const char* str, xml_
+                               /* End of the parm.  */
+                               eparm = tmp;
+                               
+-                              if (!isspace((int)*tmp)) break; 
+-                              for ( ; isspace((int)*tmp) ; tmp++);
++                              if (!isspace((unsigned char)*tmp)) break; 
++                              for ( ; isspace((unsigned char)*tmp) ; tmp++);
+                               if( *tmp == '>' || (*tmp == '/' && tmp[1] == '>') )
+                                       break;
+                       }
+@@ -1648,7 +1648,7 @@ int asim_xml_parse(const char* str, xml_
+                       }
+ 
+                       /* We found a tag!  Advance the pointer. */
+-                      for (ptr = eparm ; isspace((int)*ptr) ; ptr++);
++                      for (ptr = eparm ; isspace((unsigned char)*ptr) ; ptr++);
+                       empty = (*ptr == '/');
+                       ptr += empty + 1;
+ 
+@@ -1825,7 +1825,7 @@ asim_spool_xml_tag( ASXmlBuffer *xb, cha
+       if( !xb->verbatim && !xb->quoted && 
+               (xb->state != ASXML_Start || xb->level == 0 )) 
+       {       /* skip spaces if we are not in string */
+-              while( i < len && isspace( (int)tmp[i] )) ++i;
++              while( i < len && isspace( (unsigned char)tmp[i] )) ++i;
+               if( i >= len ) 
+                       return i;
+       }
+@@ -1862,10 +1862,10 @@ asim_spool_xml_tag( ASXmlBuffer *xb, cha
+                       add_xml_buffer_chars( xb, "/", 1 );
+                       if( ++i >= len ) 
+                               return i;
+-              }else if( isalnum((int)tmp[i]) )        
++              }else if( isalnum((unsigned char)tmp[i]) )
+               {        
+-                      xb->state = ASXML_TagName;                 
+-                      xb->verbatim = True ;              
++                      xb->state = ASXML_TagName;
++                      xb->verbatim = True ;
+               }else
+                       xb->state = ASXML_BadTagName ;
+       }
+@@ -1874,12 +1874,12 @@ asim_spool_xml_tag( ASXmlBuffer *xb, cha
+       {     /* we are looking for the tag name */
+               int start = i ;
+               /* need to store attribute name in form : ' attr_name' */
+-              while( i < len && isalnum((int)tmp[i]) ) ++i ;
++              while( i < len && isalnum((unsigned char)tmp[i]) ) ++i ;
+               if( i > start ) 
+                       add_xml_buffer_chars( xb, &tmp[start], i - start );
+               if( i < len ) 
+               {       
+-                      if( isspace( (int)tmp[i] ) || tmp[i] == '>' ) 
++                      if( isspace( (unsigned char)tmp[i] ) || tmp[i] == '>' ) 
+                       {
+                               xb->state = ASXML_TagAttrOrClose;
+                               xb->verbatim = False ; 
+@@ -1921,7 +1921,7 @@ asim_spool_xml_tag( ASXmlBuffer *xb, cha
+                                       }else
+                                               --(xb->level);                  
+                               }                                          
+-                      }else if( !isalnum( (int)tmp[i] ) )       
++                      }else if( !isalnum( (unsigned char)tmp[i] ) )     
+                               xb->state = ASXML_BadAttrName ;
+                       else
+                       {       
+@@ -1937,12 +1937,12 @@ asim_spool_xml_tag( ASXmlBuffer *xb, cha
+       {       
+               int start = i ;
+               /* need to store attribute name in form : ' attr_name' */
+-              while( i < len && isalnum((int)tmp[i]) ) ++i ;
++              while( i < len && isalnum((unsigned char)tmp[i]) ) ++i ;
+               if( i > start ) 
+                       add_xml_buffer_chars( xb, &tmp[start], i - start );
+               if( i < len ) 
+               {       
+-                      if( isspace( (int)tmp[i] ) || tmp[i] == '=' ) 
++                      if( isspace( (unsigned char)tmp[i] ) || tmp[i] == '=' ) 
+                       {
+                               xb->state = ASXML_AttrEq;
+                               xb->verbatim = False ; 
+@@ -1980,7 +1980,7 @@ asim_spool_xml_tag( ASXmlBuffer *xb, cha
+       
+       if( xb->state == ASXML_AttrValue )  /* looking for attribute value : */
+       {
+-              if( !xb->quoted && isspace((int)tmp[i]) ) 
++              if( !xb->quoted && isspace((unsigned char)tmp[i]) ) 
+               {
+                       add_xml_buffer_chars( xb, " ", 1 );
+                       ++i ;
Index: pkgsrc/wm/afterstep/patches/patch-libAfterImage_asim__afterbase.h
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterImage_asim__afterbase.h:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterImage_asim__afterbase.h   Thu Oct 23 01:28:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-libAfterImage_asim__afterbase.h,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterImage/asim_afterbase.h.orig        2013-05-01 13:34:11.000000000 +0000
++++ libAfterImage/asim_afterbase.h
+@@ -407,7 +407,7 @@ void asim_wait_tick ();
+ /* TODO : add xml stuff */
+ /* from xml.c  */
+ 
+-#define xml_tagchar(a) (isalnum(a) || (a) == '-' || (a) == '_')
++#define xml_tagchar(a) (isalnum((unsigned char)a) || (a) == '-' || (a) == '_')
+ 
+ #define XML_CDATA_STR                 "CDATA"
+ #define XML_CONTAINER_STR     "CONTAINER"
Index: pkgsrc/wm/afterstep/patches/patch-libAfterImage_asimagexml.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterImage_asimagexml.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterImage_asimagexml.c        Thu Oct 23 01:28:08 2025
@@ -0,0 +1,99 @@
+$NetBSD: patch-libAfterImage_asimagexml.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterImage/asimagexml.c.orig    2013-05-01 13:34:11.000000000 +0000
++++ libAfterImage/asimagexml.c
+@@ -490,12 +490,12 @@ translate_tag_size(      const char *width_st
+       }
+       if( width_str ) 
+       {       
+-              if( width_str[0] == '$' || isdigit( (int)width_str[0] ) )
++              if( width_str[0] == '$' || isdigit( (unsigned char)width_str[0] ) )
+                       width = (int)parse_math(width_str, NULL, width);
+       }
+       if( height_str ) 
+       {       
+-              if( height_str[0] == '$' || isdigit( (int)height_str[0] ) )
++              if( height_str[0] == '$' || isdigit( (unsigned char)height_str[0] ) )
+                       height = (int)parse_math(height_str, NULL, height);
+       }
+       if( width_str && height_ref > 0 && mystrcasecmp(width_str,"proportional") == 0 )
+@@ -1329,16 +1329,16 @@ handle_asxml_tag_gradient( ASImageXMLSta
+               } else {
+                       gradient.type = GRADIENT_BottomLeft2TopRight;
+               }
+-              for (p = color_str ; isspace((int)*p) ; p++);
++              for (p = color_str ; isspace((unsigned char)*p) ; p++);
+               for (npoints1 = 0 ; *p ; npoints1++) {
+-                      if (*p) for ( ; *p && !isspace((int)*p) ; p++);
+-                      for ( ; isspace((int)*p) ; p++);
++                      if (*p) for ( ; *p && !isspace((unsigned char)*p) ; p++);
++                      for ( ; isspace((unsigned char)*p) ; p++);
+               }
+               if (offset_str) {
+-                      for (p = offset_str ; isspace((int)*p) ; p++);
++                      for (p = offset_str ; isspace((unsigned char)*p) ; p++);
+                       for (npoints2 = 0 ; *p ; npoints2++) {
+-                              if (*p) for ( ; *p && !isspace((int)*p) ; p++);
+-                              for ( ; isspace((int)*p) ; p++);
++                              if (*p) for ( ; *p && !isspace((unsigned char)*p) ; p++);
++                              for ( ; isspace((unsigned char)*p) ; p++);
+                       }
+               }
+               gradient.npoints = max( npoints1, npoints2 );
+@@ -1346,11 +1346,11 @@ handle_asxml_tag_gradient( ASImageXMLSta
+                       int i;
+                       gradient.color = safecalloc(gradient.npoints, sizeof(ARGB32));
+                       gradient.offset = NEW_ARRAY(double, gradient.npoints);
+-                      for (p = color_str ; isspace((int)*p) ; p++);
++                      for (p = color_str ; isspace((unsigned char)*p) ; p++);
+                       for (npoints1 = 0 ; *p ; ) {
+                               char* pb = p, ch;
+-                              if (*p) for ( ; *p && !isspace((int)*p) ; p++);
+-                              for ( ; isspace((int)*p) ; p++);
++                              if (*p) for ( ; *p && !isspace((unsigned char)*p) ; p++);
++                              for ( ; isspace((unsigned char)*p) ; p++);
+                               ch = *p; *p = '\0';
+                               if (parse_argb_color(pb, gradient.color + npoints1) != pb)
+                               {
+@@ -1360,15 +1360,15 @@ handle_asxml_tag_gradient( ASImageXMLSta
+                               *p = ch;
+                       }
+                       if (offset_str) {
+-                              for (p = offset_str ; isspace((int)*p) ; p++);
++                              for (p = offset_str ; isspace((unsigned char)*p) ; p++);
+                               for (npoints2 = 0 ; *p ; ) {
+                                       char* pb = p, ch;
+-                                      if (*p) for ( ; *p && !isspace((int)*p) ; p++);
++                                      if (*p) for ( ; *p && !isspace((unsigned char)*p) ; p++);
+                                       ch = *p; *p = '\0';
+                                       gradient.offset[npoints2] = strtod(pb, &pb);
+                                       if (pb == p) npoints2++;
+                                       *p = ch;
+-                                      for ( ; isspace((int)*p) ; p++);
++                                      for ( ; isspace((unsigned char)*p) ; p++);
+                               }
+                       } else {
+                               for (npoints2 = 0 ; npoints2 < gradient.npoints ; npoints2++)
+@@ -1690,9 +1690,9 @@ handle_asxml_tag_bevel( ASImageXMLState 
+                       bevel.top_inline = bevel.left_inline = bevel.right_inline = bevel.bottom_inline = 10;
+               if (color_str) {
+                       char* p = color_str;
+-                      while (isspace((int)*p)) p++;
++                      while (isspace((unsigned char)*p)) p++;
+                       p = (char*)parse_argb_color(p, &bevel.hi_color);
+-                      while (isspace((int)*p)) p++;
++                      while (isspace((unsigned char)*p)) p++;
+                       parse_argb_color(p, &bevel.lo_color);
+               }
+               if (border_str) {
+@@ -2230,7 +2230,7 @@ handle_asxml_tag_hsv( ASImageXMLState *s
+               else if (!strcmp(ptr->tag, "y_origin")) yorig = (int)parse_math(ptr->parm, NULL, height);
+               else if (!strcmp(ptr->tag, "affected_hue"))
+               {
+-                      if( isdigit( (int)ptr->parm[0] ) )
++                      if( isdigit( (unsigned char)ptr->parm[0] ) )
+                               affected_hue = (int)parse_math(ptr->parm, NULL, 360);
+                       else
+                       {
Index: pkgsrc/wm/afterstep/patches/patch-libAfterImage_blender.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterImage_blender.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterImage_blender.c   Thu Oct 23 01:28:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-libAfterImage_blender.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterImage/blender.c.orig       2013-05-01 13:34:11.000000000 +0000
++++ libAfterImage/blender.c
+@@ -335,7 +335,7 @@ blend_scanlines_name2func( const char *n
+ 
+       if( name == NULL )
+               return NULL ;
+-    while( isspace((int)*name) ) ++name;
++    while( isspace((unsigned char)*name) ) ++name;
+       do
+       {
+               if( name[0] == std_merge_scanlines_func_list[i].name[0] )
Index: pkgsrc/wm/afterstep/patches/patch-libAfterImage_xpm.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterImage_xpm.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterImage_xpm.c       Thu Oct 23 01:28:08 2025
@@ -0,0 +1,47 @@
+$NetBSD: patch-libAfterImage_xpm.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterImage/xpm.c.orig   2013-05-01 13:34:11.000000000 +0000
++++ libAfterImage/xpm.c
+@@ -468,8 +468,8 @@ parse_xpm_cmap_entry( ASXpmFile *xpm_fil
+       key = -1;
+       do
+       {
+-        while( !isspace((int)*ptr) && *ptr != '\0' ) ++ptr;
+-        while( isspace((int)*ptr) ) ++ptr;
++        while( !isspace((unsigned char)*ptr) && *ptr != '\0' ) ++ptr;
++        while( isspace((unsigned char)*ptr) ) ++ptr;
+               if( *ptr )
+               {
+                       if( key >= 0 )
+@@ -702,22 +702,22 @@ parse_xpm_header( ASXpmFile *xpm_file )
+               return False;
+ 
+       ptr = xpm_file->str_buf ;
+-      while( isspace((int)*ptr) ) ++ptr;
++      while( isspace((unsigned char)*ptr) ) ++ptr;
+       if( *ptr == '\0' )
+               return False;
+       xpm_file->width = atoi( ptr );
+-      while( !isspace((int)*ptr) && *ptr != '\0' ) ++ptr;
+-      while( isspace((int)*ptr) ) ++ptr;
++      while( !isspace((unsigned char)*ptr) && *ptr != '\0' ) ++ptr;
++      while( isspace((unsigned char)*ptr) ) ++ptr;
+       if( *ptr == '\0' )
+               return False;
+       xpm_file->height = atoi( ptr );
+-      while( !isspace((int)*ptr) && *ptr != '\0' ) ++ptr;
+-      while( isspace((int)*ptr) ) ++ptr;
++      while( !isspace((unsigned char)*ptr) && *ptr != '\0' ) ++ptr;
++      while( isspace((unsigned char)*ptr) ) ++ptr;
+       if( *ptr == '\0' )
+               return False;
+       xpm_file->cmap_size = atoi( ptr );
+-      while( !isspace((int)*ptr) && *ptr != '\0' ) ++ptr;
+-      while( isspace((int)*ptr) ) ++ptr;
++      while( !isspace((unsigned char)*ptr) && *ptr != '\0' ) ++ptr;
++      while( isspace((unsigned char)*ptr) ) ++ptr;
+       if( *ptr == '\0' )
+               return False;
+       xpm_file->bpp = atoi( ptr );
Index: pkgsrc/wm/afterstep/patches/patch-libAfterStep_clientprops.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterStep_clientprops.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterStep_clientprops.c        Thu Oct 23 01:28:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-libAfterStep_clientprops.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterStep/clientprops.c.orig    2013-05-01 13:34:11.000000000 +0000
++++ libAfterStep/clientprops.c
+@@ -233,7 +233,7 @@ read_int_resource (XrmDatabase db, const
+                               ptr++;
+                       val = atoi (ptr);
+                       while (*ptr)
+-                              if (!isdigit ((int)*ptr++))
++                              if (!isdigit ((unsigned char)*ptr++))
+                                       break;
+                       if (*ptr == '\0') {
+                               *value = val;
Index: pkgsrc/wm/afterstep/patches/patch-libAfterStep_module.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterStep_module.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterStep_module.c     Thu Oct 23 01:28:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-libAfterStep_module.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterStep/module.c.orig 2013-05-01 13:34:11.000000000 +0000
++++ libAfterStep/module.c
+@@ -435,7 +435,7 @@ ConnectAfterStep (send_data_type message
+                               int k = 0;
+                               int c = MyArgs.saved_argv[i][k];
+ 
+-                              while (isalnum (c) || c == '-' || c == '+' || c == '.' || c == '_')
++                              while (isalnum ((unsigned char)c) || c == '-' || c == '+' || c == '.' || c == '_')
+                                       c = MyArgs.saved_argv[i][++k];
+                               quote = (c != '\0');
+                       }
Index: pkgsrc/wm/afterstep/patches/patch-src_ASConfig_ASConfig.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_ASConfig_ASConfig.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_ASConfig_ASConfig.c   Thu Oct 23 01:28:08 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_ASConfig_ASConfig.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/ASConfig/ASConfig.c.orig       2013-05-01 13:34:11.000000000 +0000
++++ src/ASConfig/ASConfig.c
+@@ -665,7 +665,7 @@ asmenu_dir2property( const char *dirname
+               ptr = dirname ;
+       else
+               ++ptr ;
+-      while( isdigit(*ptr) ) ++ptr;
++      while( isdigit((unsigned char)*ptr) ) ++ptr;
+       if( *ptr == '_' )
+               ++ptr ;
+       
+@@ -715,7 +715,7 @@ asmenu_dir2property( const char *dirname
+                       
+                       if( clean_name == list[i]->d_name )
+                       {       
+-                              if( isalpha(clean_name[0]) && clean_name[1] == '_' )
++                              if( isalpha((unsigned char)clean_name[0]) && clean_name[1] == '_' )
+                               {       
+                                       order = (int)(clean_name[0]) - (int)'0' ;
+                                       clean_name += 2 ;
Index: pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_ASDocGen.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_ASDocGen.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_ASDocGen.c   Thu Oct 23 01:28:08 2025
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_ASDocGen_ASDocGen.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/ASDocGen/ASDocGen.c.orig       2013-05-01 13:34:11.000000000 +0000
++++ src/ASDocGen/ASDocGen.c
+@@ -616,7 +616,7 @@ check_syntax_source( const char *source_
+                                       sub_syntax = pFuncSyntax ;
+                               if (sub_syntax)
+                                       check_syntax_source( source_dir, sub_syntax, False );
+-                              if( isalnum( syntax->terms[i].keyword[0] ) )                                    
++                              if( isalnum( (unsigned char)syntax->terms[i].keyword[0] ) )                                     
+                                       check_option_source( syntax_dir, syntax->terms[i].keyword, sub_syntax, module?syntax->doc_path:NULL ) ;
+                       }
+               }
+@@ -676,7 +676,7 @@ write_options_keywords(const char *sourc
+ 
+               if (sub_syntax)
+                       gen_syntax_doc( source_dir, state->dest_dir, sub_syntax, state->doc_type );
+-              if( isalnum( sorted_list[i]->keyword[0] ) )                                     
++              if( isalnum( (unsigned char)sorted_list[i]->keyword[0] ) )                                      
+                       convert_xml_file( syntax_dir, sorted_list[i]->keyword, state );
+       }
+       free( sorted_list );
+@@ -1008,7 +1008,7 @@ gen_index( const char *dest_dir, const c
+                                               sublist = True ;
+                                       }
+                                       item_text += sublist_name_len ;
+-                                      while( *item_text != '\0' && isspace( *item_text ) ) 
++                                      while( *item_text != '\0' && isspace( (unsigned char)*item_text ) ) 
+                                               ++item_text ;
+                               }else if( sublist ) 
+                               {       
Index: pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_robodoc.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_robodoc.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_robodoc.c    Thu Oct 23 01:28:08 2025
@@ -0,0 +1,59 @@
+$NetBSD: patch-src_ASDocGen_robodoc.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/ASDocGen/robodoc.c.orig        2013-05-01 13:34:11.000000000 +0000
++++ src/ASDocGen/robodoc.c
+@@ -58,7 +58,7 @@ find_robodoc_section( ASRobodocState *ro
+                       int count = 0 ;
+                       const char *ptr = &(robo_state->source[++(robo_state->curr)]) ;
+ 
+-                      while(ptr[count] == '*' || (count == 4 && isalpha(ptr[count])))
++                      while(ptr[count] == '*' || (count == 4 && isalpha((unsigned char)ptr[count])))
+                               ++count ;
+                       if( count >= 6 && (ptr[count] == ' ' || get_flags(robo_state->flags, ASRS_InsideSection)))
+                               return ;                                       /* we found it ! */
+@@ -179,12 +179,12 @@ robodoc_section_header2xml( ASRobodocSta
+       
+       while( ptr[i] != 0 && ptr[i] != '\n' ) ++i ;
+       robo_state->curr += i+1 ;
+-      while( i > 0 && isspace(ptr[i])) --i ;
++      while( i > 0 && isspace((unsigned char)ptr[i])) --i ;
+       if( i > 6 ) 
+       {       
+               id_length = i ;
+               i = 6 ; 
+-              while( i < id_length && isspace(ptr[i]) ) ++i;  
++              while( i < id_length && isspace((unsigned char)ptr[i]) ) ++i;   
+               if( i < id_length ) 
+               {
+                       id = (char*)(&ptr[i]);
+@@ -229,7 +229,7 @@ handle_varlist_line( ASRobodocState *rob
+       xml_elem_t* varlist_tag = NULL;         
+       xml_elem_t* tmp ;
+       const char *ptr = &(robo_state->source[robo_state->curr]);
+-      Bool is_term = !isspace(ptr[0]);
++      Bool is_term = !isspace((unsigned char)ptr[0]);
+ 
+       *skipped = 0 ;
+ 
+@@ -299,7 +299,7 @@ handle_formalpara_line( ASRobodocState *
+       xml_elem_t* fp_tag = NULL;              
+       xml_elem_t* tmp ;
+       const char *ptr = &(robo_state->source[robo_state->curr]);
+-      Bool is_term = !isspace(ptr[0]);
++      Bool is_term = !isspace((unsigned char)ptr[0]);
+ 
+       *skipped = 0 ;
+ 
+@@ -419,8 +419,8 @@ handle_robodoc_subtitle( ASRobodocState 
+       int robodoc_id = -1 ;
+ 
+       LOCAL_DEBUG_OUT("robo_state> curr = %d, len = %d", robo_state->curr, robo_state->len );
+-      while( isspace(ptr[i]) && i < len ) ++i ;
+-      while( isspace(ptr[len]) && i < len ) --len ;
++      while( isspace((unsigned char)ptr[i]) && i < len ) ++i ;
++      while( isspace((unsigned char)ptr[len]) && i < len ) --len ;
+       ++len ;
+       LOCAL_DEBUG_OUT("i = %d, len = %d", i, len );
+       ptr = &(ptr[i]);
Index: pkgsrc/wm/afterstep/patches/patch-src_Arrange_Arrange.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_Arrange_Arrange.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_Arrange_Arrange.c     Thu Oct 23 01:28:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Arrange_Arrange.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/Arrange/Arrange.c.orig 2013-05-01 13:34:11.000000000 +0000
++++ src/Arrange/Arrange.c
+@@ -263,7 +263,7 @@ main( int argc, char **argv )
+                 the first window (default 0, 0). The second pair
+                 specify a maximal width and height for layered windows.
+               */
+-              if( isdigit( argv[i][0] ) )
++              if( isdigit( (unsigned char)argv[i][0] ) )
+               {
+                       if( nargc == 0 ) 
+                       {       
Index: pkgsrc/wm/afterstep/patches/patch-src_Clean_Clean.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_Clean_Clean.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_Clean_Clean.c Thu Oct 23 01:28:08 2025
@@ -0,0 +1,30 @@
+$NetBSD: patch-src_Clean_Clean.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/Clean/Clean.c.orig     2013-05-01 13:34:11.000000000 +0000
++++ src/Clean/Clean.c
+@@ -154,7 +154,7 @@ ParseOptions (const char *filename)
+       len = strlen (MyName);
+       while (((tline = fgets (line, MAXLINELENGTH, file)) != NULL) && (num_commands < 3))
+       {
+-        while (isspace (*tline))
++        while (isspace ((unsigned char)*tline))
+           tline++;
+         if ((*tline == '*') && (!mystrncasecmp (tline + 1, MyName, len)))
+           {
+@@ -162,11 +162,11 @@ ParseOptions (const char *filename)
+             sscanf (tline, "%ld", &period[num_commands]);
+             if (period[num_commands] > maxperiod)
+               maxperiod = period[num_commands];
+-            while (isspace (*tline))
++            while (isspace ((unsigned char)*tline))
+               tline++;
+-            while ((!isspace (*tline)) && (*tline))
++            while ((!isspace ((unsigned char)*tline)) && (*tline))
+               tline++;
+-            while (isspace (*tline))
++            while (isspace ((unsigned char)*tline))
+               tline++;        /* points to "command" field */
+             strcpy (command[num_commands], tline);
+             num_commands++;
Index: pkgsrc/wm/afterstep/patches/patch-src_Form_Form.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_Form_Form.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_Form_Form.c   Thu Oct 23 01:28:08 2025
@@ -0,0 +1,231 @@
+$NetBSD: patch-src_Form_Form.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/Form/Form.c.orig       2013-05-01 13:34:11.000000000 +0000
++++ src/Form/Form.c
+@@ -377,7 +377,7 @@ ParseOptions (char *file_name)
+   while (fgets (line_buf, sizeof (line_buf), fp))
+     {
+       cp = line_buf;
+-      while (isspace (*cp))
++      while (isspace ((unsigned char)*cp))
+       cp++;                   /* skip blanks */
+       if (*cp != '*')
+       continue;
+@@ -398,12 +398,12 @@ ParseOptions (char *file_name)
+       {
+         cp += 8;
+         geom = 1;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         gx = atoi (cp);
+-        while (!isspace (*cp))
++        while (!isspace ((unsigned char)*cp))
+           cp++;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         gy = atoi (cp);
+         fprintf (fp_err, "Position @ (%d, %d)\n", gx, gy);
+@@ -412,7 +412,7 @@ ParseOptions (char *file_name)
+       else if (strncmp (cp, "Fore", 4) == 0)
+       {
+         cp += 4;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         color_names[c_fore] = copystring (cp, 0);
+         fprintf (fp_err, "ColorFore: %s\n", color_names[c_fore]);
+@@ -421,7 +421,7 @@ ParseOptions (char *file_name)
+       else if (strncmp (cp, "Back", 4) == 0)
+       {
+         cp += 4;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         color_names[c_back] = copystring (cp, 0);
+         fprintf (fp_err, "ColorBack: %s\n", color_names[c_back]);
+@@ -430,7 +430,7 @@ ParseOptions (char *file_name)
+       else if (strncmp (cp, "ItemFore", 8) == 0)
+       {
+         cp += 8;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         color_names[c_itemfore] = copystring (cp, 0);
+         fprintf (fp_err, "ColorItemFore: %s\n", color_names[c_itemfore]);
+@@ -439,7 +439,7 @@ ParseOptions (char *file_name)
+       else if (strncmp (cp, "ItemBack", 8) == 0)
+       {
+         cp += 8;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         color_names[c_itemback] = copystring (cp, 0);
+         fprintf (fp_err, "ColorItemBack: %s\n", color_names[c_itemback]);
+@@ -448,7 +448,7 @@ ParseOptions (char *file_name)
+       else if (strncmp (cp, "Font", 4) == 0)
+       {
+         cp += 4;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         font_names[f_text] = copystring (cp, 0);
+         fprintf (fp_err, "Font: %s\n", font_names[f_text]);
+@@ -486,7 +486,7 @@ ParseOptions (char *file_name)
+       else if (strncmp (cp, "ButtonFont", 10) == 0)
+       {
+         cp += 10;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         font_names[f_button] = copystring (cp, 0);
+         fprintf (fp_err, "ButtonFont: %s\n", font_names[f_button]);
+@@ -524,7 +524,7 @@ ParseOptions (char *file_name)
+       else if (strncmp (cp, "InputFont", 9) == 0)
+       {
+         cp += 9;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         font_names[f_input] = copystring (cp, 0);
+         fprintf (fp_err, "InputFont: %s\n", font_names[f_input]);
+@@ -563,7 +563,7 @@ ParseOptions (char *file_name)
+       {
+         cp += 4;
+         cur_line = lines + n_lines++;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         if (strncmp (cp, "left", 4) == 0)
+           cur_line->justify = L_LEFT;
+@@ -584,7 +584,7 @@ ParseOptions (char *file_name)
+         item = items + n_items++;
+         item->type = I_TEXT;
+         item->header.name = "";
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         if (*cp == '\"')
+           item->text.value = CopyQuotedString (++cp);
+@@ -610,16 +610,16 @@ ParseOptions (char *file_name)
+         cp += 5;
+         item = items + n_items++;
+         item->type = I_INPUT;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         item->header.name = CopySolidString (cp);
+         cp += strlen (item->header.name);
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         item->input.size = atoi (cp);
+-        while (!isspace (*cp))
++        while (!isspace ((unsigned char)*cp))
+           cp++;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         if (*cp == '\"')
+           item->input.init_value = CopyQuotedString (++cp);
+@@ -644,11 +644,11 @@ ParseOptions (char *file_name)
+         cp += 9;
+         cur_sel = items + n_items++;
+         cur_sel->type = I_SELECT;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         cur_sel->header.name = CopySolidString (cp);
+         cp += strlen (cur_sel->header.name);
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         if (strncmp (cp, "multiple", 8) == 0)
+           cur_sel->select.key = IS_MULTIPLE;
+@@ -665,23 +665,23 @@ ParseOptions (char *file_name)
+         cp += 6;
+         item = items + n_items++;
+         item->type = I_CHOICE;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         item->header.name = CopySolidString (cp);
+         cp += strlen (item->header.name);
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         item->choice.value = CopySolidString (cp);
+         cp += strlen (item->choice.value);
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         if (strncmp (cp, "on", 2) == 0)
+           item->choice.init_on = 1;
+         else
+           item->choice.init_on = 0;
+-        while (!isspace (*cp))
++        while (!isspace ((unsigned char)*cp))
+           cp++;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         if (*cp == '\"')
+           item->choice.text = CopyQuotedString (++cp);
+@@ -709,7 +709,7 @@ ParseOptions (char *file_name)
+         item = items + n_items++;
+         item->type = I_BUTTON;
+         item->header.name = "";
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         if (strncmp (cp, "restart", 7) == 0)
+           item->button.key = IB_RESTART;
+@@ -717,15 +717,15 @@ ParseOptions (char *file_name)
+           item->button.key = IB_QUIT;
+         else
+           item->button.key = IB_CONTINUE;
+-        while (!isspace (*cp))
++        while (!isspace ((unsigned char)*cp))
+           cp++;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         if (*cp == '\"')
+           {
+             item->button.text = CopyQuotedString (++cp);
+             cp += strlen (item->button.text) + 1;
+-            while (isspace (*cp))
++            while (isspace ((unsigned char)*cp))
+               cp++;
+           }
+         else
+@@ -755,7 +755,7 @@ ParseOptions (char *file_name)
+       {
+ /* syntax: *FFCommand <command> */
+         cp += 7;
+-        while (isspace (*cp))
++        while (isspace ((unsigned char)*cp))
+           cp++;
+         cur_button->button.commands[cur_button->button.n++] =
+           copystring (cp, 0);
+@@ -1276,7 +1276,7 @@ ParseCommand (int dn, char *sp, char end
+                 *(vp++) = '\0';
+                 break;
+               }
+-            else if (!isspace (x))
++            else if (!isspace ((unsigned char)x))
+               *(vp++) = x;
+           }
+         for (i = 0; i < n_items; i++)
+@@ -1291,7 +1291,7 @@ ParseCommand (int dn, char *sp, char end
+                       {
+                         for (cp = item->input.value; *cp != '\0'; cp++)
+                           {
+-                            if (!isalnum (*cp))
++                            if (!isalnum ((unsigned char)*cp))
+                               AddChar ('\\');
+                             AddChar (*cp);
+                           }
Index: pkgsrc/wm/afterstep/patches/patch-src_Gnome_Gnome.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_Gnome_Gnome.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_Gnome_Gnome.c Thu Oct 23 01:28:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Gnome_Gnome.c,v 1.1 2025/10/23 01:28:08 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/Gnome/Gnome.c.orig     2013-05-01 13:34:11.000000000 +0000
++++ src/Gnome/Gnome.c
+@@ -1194,7 +1194,7 @@ parse_config (char *cfgfile)
+ 
+   while ((tline = fgets (line, MAXLINELENGTH, ptr)) != NULL)
+     {
+-      while (isspace (*tline))
++      while (isspace ((unsigned char)*tline))
+       tline++;
+       if ((*tline == '*') && (!mystrncasecmp (tline + 1, MyName, len)))
+       {
Index: pkgsrc/wm/afterstep/patches/patch-src_Pager_Pager.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_Pager_Pager.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_Pager_Pager.c Thu Oct 23 01:28:09 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Pager_Pager.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/Pager/Pager.c.orig     2013-05-01 13:34:11.000000000 +0000
++++ src/Pager/Pager.c
+@@ -210,7 +210,7 @@ int main (int argc, char **argv)
+               LOCAL_DEBUG_OUT ("argv[%d] = \"%s\", original argv[%d] = \"%s\"", i,
+                                                                                argv[i], i, MyArgs.saved_argv[i]);
+               if (argv[i] != NULL) {
+-                      if (isdigit (argv[i][0])) {
++                      if (isdigit ((unsigned char)argv[i][0])) {
+                               ++desk_cnt;
+                               if (desk_cnt == 1)
+                                       desk1 = atoi (argv[i]);
Index: pkgsrc/wm/afterstep/patches/patch-src_Script_Instructions.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_Script_Instructions.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_Script_Instructions.c Thu Oct 23 01:28:09 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Script_Instructions.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/Script/Instructions.c.orig     2013-05-01 13:34:11.000000000 +0000
++++ src/Script/Instructions.c
+@@ -207,7 +207,7 @@ FuncGetASoption (int *NbArg, long *TabAr
+ /* Now seek for wordtofind in &BufCom[int] */
+   while ((&BufCom[k] != (char *) 0) && (BufCom[k] != '\0') && (found == 0))
+     {
+-      while (isspace (*&BufCom[k]))
++      while (isspace ((unsigned char)*&BufCom[k]))
+       BufCom[k]++;
+ 
+       if (mystrncasecmp (&BufCom[k], wordtofind, strlen (wordtofind)) == 0)
Index: pkgsrc/wm/afterstep/patches/patch-src_Script_Script.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_Script_Script.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_Script_Script.c       Thu Oct 23 01:28:09 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Script_Script.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/Script/Script.c.orig   2013-05-01 13:34:11.000000000 +0000
++++ src/Script/Script.c
+@@ -146,7 +146,7 @@ ParseOptions (char *filename)
+   Clength = strlen (MyName);
+   while (tline != (char *) 0)
+     {
+-      while (isspace (*tline))
++      while (isspace ((unsigned char)*tline))
+       tline++;
+       if ((strlen (&tline[0]) > 1) && (mystrncasecmp (tline, "PixmapPath", 10) == 0))
+     pixmapPath = stripcpy(&tline[10]);
Index: pkgsrc/wm/afterstep/patches/patch-src_Scroll_Scroll.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_Scroll_Scroll.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_Scroll_Scroll.c       Thu Oct 23 01:28:09 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Scroll_Scroll.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/Scroll/Scroll.c.orig   2013-05-01 13:34:11.000000000 +0000
++++ src/Scroll/Scroll.c
+@@ -166,7 +166,7 @@ ParseOptions (const char *filename)
+       len = strlen (MyName);
+       while ((tline = fgets (line, MAXLINELENGTH, file)) == NULL)
+       {
+-        while (isspace (*tline))
++        while (isspace ((unsigned char)*tline))
+           tline++;
+         if ((*tline == '*') && (!mystrncasecmp (tline + 1, MyName, len)))
+           {
Index: pkgsrc/wm/afterstep/patches/patch-src_WinCommand_WinCommand.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_WinCommand_WinCommand.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_WinCommand_WinCommand.c       Thu Oct 23 01:28:09 2025
@@ -0,0 +1,53 @@
+$NetBSD: patch-src_WinCommand_WinCommand.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/WinCommand/WinCommand.c.orig   2013-05-01 13:34:11.000000000 +0000
++++ src/WinCommand/WinCommand.c
+@@ -231,32 +231,32 @@ set_WinCommandParam( ASWinCommandState *
+               ++param ;
+       if( mystrcasecmp ( param, "x") == 0)
+       {
+-              if( val == NULL || !isdigit(val[0]) ) 
++              if( val == NULL || !isdigit((unsigned char)val[0]) ) 
+                       return ASWC_BadVal;
+               state->x_dest = atopixel( val, Scr.MyDisplayWidth);
+               ++val_used;
+       }else if( mystrcasecmp ( param, "y") == 0)
+       {
+-              if( val == NULL || !isdigit(val[0]) ) 
++              if( val == NULL || !isdigit((unsigned char)val[0]) ) 
+                       return ASWC_BadVal;
+               state->y_dest = atopixel( val, Scr.MyDisplayHeight);
+               ++val_used;
+       }else                   /* Resize */
+               if( mystrcasecmp ( param, "width") == 0 )
+       {
+-              if( val == NULL || !isdigit(val[0]) ) 
++              if( val == NULL || !isdigit((unsigned char)val[0]) ) 
+                       return ASWC_BadVal;
+               state->new_width = atopixel ( val, Scr.MyDisplayWidth);
+               ++val_used;
+       }else if( mystrcasecmp ( param, "height") == 0 )
+       {
+-              if( val == NULL || !isdigit(val[0]) ) 
++              if( val == NULL || !isdigit((unsigned char)val[0]) ) 
+                       return ASWC_BadVal;
+               state->new_height = atopixel ( val, Scr.MyDisplayHeight);
+               ++val_used;
+       }else if( mystrcasecmp ( param, "new_desk") == 0 )
+       {
+-              if( val == NULL || !isdigit(val[0]) ) 
++              if( val == NULL || !isdigit((unsigned char)val[0]) ) 
+                       return ASWC_BadVal;
+               state->desk = atoi( val );
+               ++val_used;
+@@ -396,7 +396,7 @@ main( int argc, char **argv )
+                               {
+                                       char *param =   NULL ; 
+                                       ptr = parse_token (ptr, &param);
+-                                      while( isspace(*ptr) ) ++ptr ;
++                                      while( isspace((unsigned char)*ptr) ) ++ptr ;
+                                       switch( set_WinCommandParam( &WinCommandState, param, ptr) )
+                                       {
+                                               case ASWC_BadParam :
Index: pkgsrc/wm/afterstep/patches/patch-src_WinTabs_WinTabs.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_WinTabs_WinTabs.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_WinTabs_WinTabs.c     Thu Oct 23 01:28:09 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_WinTabs_WinTabs.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/WinTabs/WinTabs.c.orig 2013-05-01 13:34:11.000000000 +0000
++++ src/WinTabs/WinTabs.c
+@@ -2545,7 +2545,7 @@ LOCAL_DEBUG_OUT ( "pattern = \"%s\"", ta
+ 
+               i = 0;
+               if (group->pattern_is_tail)
+-                      while (isspace (group->pattern[i])
++                      while (isspace ((unsigned char)group->pattern[i])
+                                       || group->pattern[i] == '-'
+                                       || group->pattern[i] == ':' ) ++i;
+ 
+@@ -2553,7 +2553,7 @@ LOCAL_DEBUG_OUT ( "pattern = \"%s\"", ta
+ 
+               i = group->pattern_length - i;
+               if (!group->pattern_is_tail)
+-                      while ( isspace(group_name[i])
++                      while ( isspace((unsigned char)group_name[i])
+                                       || group_name[i] == '-'
+                                       || group_name[i] == ':'
+                              ) --i;
Index: pkgsrc/wm/afterstep/patches/patch-src_afterstep_aswindow.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_afterstep_aswindow.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_afterstep_aswindow.c  Thu Oct 23 01:28:09 2025
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_afterstep_aswindow.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/afterstep/aswindow.c.orig      2013-05-01 13:34:11.000000000 +0000
++++ src/afterstep/aswindow.c
+@@ -196,7 +196,7 @@ static void stripreplace_geometry_size (
+       if (geom) {
+ 
+               int i = 0;
+-              if (isdigit (geom[0]))
++              if (isdigit ((unsigned char)geom[0]))
+                       while (geom[++i])
+                               if (geom[i] == '+' || geom[i] == '-')
+                                       break;
+@@ -237,7 +237,7 @@ static char *make_application_name (ASWi
+       if (name) {
+               int i = 0;
+               while (name[i] != '\0') {               /* we do not want to have path in names as well */
+-                      if (!isalnum (name[i]) && !isspace (name[i]))
++                      if (!isalnum ((unsigned char)name[i]) && !isspace ((unsigned char)name[i]))
+                               break;
+                       if (++i >= 80)
+                               break;
+@@ -739,7 +739,7 @@ ASWindow *complex_pattern2ASWindow (char
+                               ++matches_reqired;
+                               ptr = parse_semicolon_token (ptr, tmp, &tmp_len);
+                               LOCAL_DEBUG_OUT ("final pattern = \"%s\"", tmp);
+-                              if (tmp[0] == '#' && isdigit (tmp[1])) {
++                              if (tmp[0] == '#' && isdigit ((unsigned char)tmp[1])) {
+                                       res_name_no = atoi (tmp + 1);
+                                       LOCAL_DEBUG_OUT ("res_name_no = %d", res_name_no);
+                               } else if (tmp[0]) {
Index: pkgsrc/wm/afterstep/patches/patch-src_afterstep_configure.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_afterstep_configure.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_afterstep_configure.c Thu Oct 23 01:28:09 2025
@@ -0,0 +1,72 @@
+$NetBSD: patch-src_afterstep_configure.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/afterstep/configure.c.orig     2013-05-01 13:34:11.000000000 +0000
++++ src/afterstep/configure.c
+@@ -1989,7 +1989,7 @@ void LoadASConfig (int thisdesktop, ASFl
+                               else {
+                                       char *name = md->name;
+                                       Bool newline = (count % 10 == 0);
+-                                      if (isdigit (name[0]))
++                                      if (isdigit ((unsigned char)name[0]))
+                                               if (md->first != NULL && md->first->fdata->func == F_TITLE)
+                                                       name = md->first->item;
+                                       display_progress (newline, newline ? "    %s" : "%s", name);
+@@ -2151,16 +2151,16 @@ void SetTitleButton (char *tline, FILE *
+       }
+ 
+       /* going the hard way to prevent buffer overruns */
+-      while (isspace (tline[offset]))
++      while (isspace ((unsigned char)tline[offset]))
+               offset++;
+-      while (isdigit (tline[offset]))
++      while (isdigit ((unsigned char)tline[offset]))
+               offset++;
+-      while (isspace (tline[offset]))
++      while (isspace ((unsigned char)tline[offset]))
+               offset++;
+ 
+       tline = parse_filename (&(tline[offset]), &(files[0]));
+       offset = 0;
+-      while (isspace (tline[offset]))
++      while (isspace ((unsigned char)tline[offset]))
+               ++offset;
+       if (tline[offset] != '\0')
+               parse_filename (&(tline[offset]), &(files[1]));
+@@ -2445,7 +2445,7 @@ void SetTButtonOrder (char *text, FILE *
+       if (xref && rbtn) {
+               register int i = 0, btn = 0;
+               *rbtn = TITLE_BUTTONS;
+-              while (!isspace (text[i]) && text[i] != '\0') {
++              while (!isspace ((unsigned char)text[i]) && text[i] != '\0') {
+                       int context = C_NO_CONTEXT;
+                       switch (text[i]) {
+                       case '0':
+@@ -2607,14 +2607,14 @@ void deskback_parse (char *text, FILE * 
+               return;
+       }
+ 
+-      while (isdigit (text[i]))
++      while (isdigit ((unsigned char)text[i]))
+               ++i;
+-      if (i == 0 || !isspace (text[i])) {
++      if (i == 0 || !isspace ((unsigned char)text[i])) {
+               show_error ("missing desktop number in: \"%s\"", text);
+               return;
+       }
+ 
+-      while (isspace (text[i]))
++      while (isspace ((unsigned char)text[i]))
+               ++i;
+       if (text[i] == '#')
+               return;
+@@ -2646,7 +2646,7 @@ match_string (struct config *table, char
+       table = find_config (table, text);
+       if (table != NULL) {
+               i = strlen (table->keyword);
+-              while (isspace (text[i]))
++              while (isspace ((unsigned char)text[i]))
+                       ++i;
+               table->action (&(text[i]), fd, table->arg, table->arg2);
+       } else
Index: pkgsrc/wm/afterstep/patches/patch-src_afterstep_dirtree.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_afterstep_dirtree.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_afterstep_dirtree.c   Thu Oct 23 01:28:09 2025
@@ -0,0 +1,91 @@
+$NetBSD: patch-src_afterstep_dirtree.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/afterstep/dirtree.c.orig       2013-05-01 13:34:11.000000000 +0000
++++ src/afterstep/dirtree.c
+@@ -407,10 +407,10 @@ LOCAL_DEBUG_OUT ("Parsing \"%s\"", file)
+                       if (*ptr == '_')
+                               ++ptr;
+                       if (!mystrncasecmp (ptr, "ordered", 7)) {
+-                              for (ptr += 7; isspace (*ptr); ptr++) ;
+-                              if (isdigit (*ptr)) {
++                              for (ptr += 7; isspace ((unsigned char)*ptr); ptr++) ;
++                              if (isdigit ((unsigned char)*ptr)) {
+                                       include_order = atoi (ptr);
+-                                      while (isdigit (*ptr))
++                                      while (isdigit ((unsigned char)*ptr))
+                                               ++ptr;
+                               }
+                       }
+@@ -420,14 +420,14 @@ LOCAL_DEBUG_OUT ("Parsing \"%s\"", file)
+                       char *path;
+                       dirtree_t *t;
+ 
+-                      while (isspace (*ptr))
++                      while (isspace ((unsigned char)*ptr))
+                               ptr++;
+                       if (*ptr != '"')
+                               continue;
+                       path = ++ptr;
+                       for (; *ptr != '\0' && *ptr != '"'; ptr++) ;
+                       if (*ptr == '"')
+-                              for (*ptr++ = '\0'; isspace (*ptr); ptr++) ;
++                              for (*ptr++ = '\0'; isspace ((unsigned char)*ptr); ptr++) ;
+                       path = make_absolute (tree->path, path);
+                       t = dirtree_new_from_dir (path);
+                       free (path);
+@@ -452,8 +452,8 @@ LOCAL_DEBUG_OUT ("Parsing \"%s\"", file)
+               else if (!mystrncasecmp (ptr, "extension", 9)) {
+                       char *tmp;
+ 
+-                      for (ptr += 9; isspace (*ptr); ptr++) ;
+-                      for (tmp = ptr + strlen (ptr); tmp > ptr && isspace (*(tmp - 1));
++                      for (ptr += 9; isspace ((unsigned char)*ptr); ptr++) ;
++                      for (tmp = ptr + strlen (ptr); tmp > ptr && isspace ((unsigned char)*(tmp - 1));
+                                        tmp--) ;
+                       if (tmp != ptr) {
+                               if (tree->extension)
+@@ -463,8 +463,8 @@ LOCAL_DEBUG_OUT ("Parsing \"%s\"", file)
+               } else if (!mystrncasecmp (ptr, "miniextension", 13)) {
+                       char *tmp;
+ 
+-                      for (ptr += 13; isspace (*ptr); ptr++) ;
+-                      for (tmp = ptr + strlen (ptr); tmp > ptr && isspace (*(tmp - 1));
++                      for (ptr += 13; isspace ((unsigned char)*ptr); ptr++) ;
++                      for (tmp = ptr + strlen (ptr); tmp > ptr && isspace ((unsigned char)*(tmp - 1));
+                                        tmp--) ;
+                       if (tmp != ptr)
+                               tree->minipixmap_extension = mystrndup (ptr, tmp - ptr);
+@@ -478,7 +478,7 @@ LOCAL_DEBUG_OUT ("Parsing \"%s\"", file)
+                       set_string (&(tree->icon), stripcpy2 (ptr + 10, False));
+ 
+               } else if (!mystrncasecmp (ptr, "command", 7)) {
+-                      for (ptr += 7; isspace (*ptr); ptr++) ;
++                      for (ptr += 7; isspace ((unsigned char)*ptr); ptr++) ;
+                       txt2func (ptr, &tree->command, False);
+                       dirtree_set_command (tree, &tree->command, 0);
+               } else if (!mystrncasecmp (ptr, "order", 5)) {
+@@ -744,7 +744,7 @@ void dirtree_output_tree (FILE * fp, dir
+                               struct config *config = find_config (func_config, buf);
+                               char *ptr = strip_whitespace (buf);
+ 
+-                              if (config != NULL && !isspace (buf[strlen (config->keyword)]))
++                              if (config != NULL && !isspace ((unsigned char)buf[strlen (config->keyword)]))
+                                       config = NULL;
+                               if (config == NULL && 13 + strlen (t->name) + strlen (ptr) < 8192) {
+                                       memmove (ptr + 13 + strlen (t->name), ptr, strlen (ptr) + 1);
+@@ -755,11 +755,11 @@ void dirtree_output_tree (FILE * fp, dir
+ #ifndef NO_AVAILABILITYCHECK
+                                       char *tmp;
+ 
+-                                      for (tmp = ptr + 4; isspace (*tmp); tmp++) ;
++                                      for (tmp = ptr + 4; isspace ((unsigned char)*tmp); tmp++) ;
+                                       if (*tmp == '"') {
+                                               for (tmp++; *tmp != '\0' && *tmp != '"'; tmp++) ;
+                                               if (*tmp == '"') {
+-                                                      for (tmp++; isspace (*tmp); tmp++) ;
++                                                      for (tmp++; isspace ((unsigned char)*tmp); tmp++) ;
+                                                       if (!is_executable_in_path (tmp)) {
+                                                               if (config != NULL)
+                                                                       memcpy (ptr, "Nop ", 4);
Index: pkgsrc/wm/afterstep/patches/patch-src_afterstep_functions.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_afterstep_functions.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_afterstep_functions.c Thu Oct 23 01:28:09 2025
@@ -0,0 +1,48 @@
+$NetBSD: patch-src_afterstep_functions.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/afterstep/functions.c.orig     2013-05-01 13:34:11.000000000 +0000
++++ src/afterstep/functions.c
+@@ -1292,7 +1292,7 @@ char *parse_term_cmdl (const char *term_
+       strcpy (full_cmdl, term_command);
+ 
+       while (curr_cmdl < cmdl_len) {
+-              while (isspace (cmdl[curr_cmdl]))
++              while (isspace ((unsigned char)cmdl[curr_cmdl]))
+                       ++curr_cmdl;
+               if (mystrncasecmp (&(cmdl[curr_cmdl]), "if(", 3) == 0) {
+                       int tmp;
+@@ -1300,19 +1300,19 @@ char *parse_term_cmdl (const char *term_
+                       curr_cmdl += 3;
+                       tmp = curr_cmdl;
+                       curr_cmdl += find_escaped_chr_pos (&(cmdl[curr_cmdl]), '}') + 1;
+-                      while (isspace (cmdl[tmp]))
++                      while (isspace ((unsigned char)cmdl[tmp]))
+                               ++tmp;
+                       if (mystrncasecmp (&(cmdl[tmp]), term_name, term_name_len) == 0) {
+                               tmp += term_name_len;
+-                              while (isspace (cmdl[tmp]))
++                              while (isspace ((unsigned char)cmdl[tmp]))
+                                       ++tmp;
+                               if (cmdl[tmp] == ')') {
+                                       ++tmp;
+-                                      while (isspace (cmdl[tmp]))
++                                      while (isspace ((unsigned char)cmdl[tmp]))
+                                               ++tmp;
+                                       if (cmdl[tmp] == '{')
+                                               ++tmp;
+-                                      while (isspace (cmdl[tmp]))
++                                      while (isspace ((unsigned char)cmdl[tmp]))
+                                               ++tmp;
+                                       full_cmdl[curr_full++] = ' ';
+                                       while (tmp < curr_cmdl - 1)
+@@ -1338,7 +1338,7 @@ char *parse_term_cmdl (const char *term_
+                       }
+ 
+                       full_cmdl[curr_full++] = ' ';
+-                      while (curr_cmdl < cmdl_len && !isspace (cmdl[curr_cmdl]))
++                      while (curr_cmdl < cmdl_len && !isspace ((unsigned char)cmdl[curr_cmdl]))
+                               full_cmdl[curr_full++] = cmdl[curr_cmdl++];
+               }
+ 
Index: pkgsrc/wm/afterstep/patches/patch-src_afterstep_housekeeping.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_afterstep_housekeeping.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_afterstep_housekeeping.c      Thu Oct 23 01:28:09 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_afterstep_housekeeping.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/afterstep/housekeeping.c.orig  2013-05-01 13:34:11.000000000 +0000
++++ src/afterstep/housekeeping.c
+@@ -245,7 +245,7 @@ void PasteSelection (ScreenInfo * scr)
+                                               ch = '\r';
+                                       event.xkey.keycode = XKeysymToKeycode (dpy, ch + '@');
+                                       event.xkey.state |= ControlMask;
+-                              } else if (isupper (*buf)) {
++                              } else if (isupper ((unsigned char)*buf)) {
+                                       event.xkey.keycode = XKeysymToKeycode (dpy, *buf);
+                                       event.xkey.state |= ShiftMask;
+                               } else
Index: pkgsrc/wm/afterstep/patches/patch-src_afterstep_menus.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_afterstep_menus.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_afterstep_menus.c     Thu Oct 23 01:28:09 2025
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_afterstep_menus.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/afterstep/menus.c.orig 2013-05-01 13:34:11.000000000 +0000
++++ src/afterstep/menus.c
+@@ -1335,8 +1335,8 @@ void on_menu_keyboard_event (ASInternalW
+               } else if ((keysym >= XK_A && keysym <= XK_Z) ||        /* Only consider alphabetic */
+                                                        (keysym >= XK_a && keysym <= XK_z) || (keysym >= XK_0 && keysym <= XK_9)) {    /* ...or numeric keys     */
+                       int i;
+-                      if (islower (keysym))
+-                              keysym = toupper (keysym);
++                      if (islower ((unsigned char)keysym))
++                              keysym = toupper ((unsigned char)keysym);
+                       LOCAL_DEBUG_OUT ("processing keysym [%c]", (char)keysym);
+                       /* Search menu for matching hotkey */
+                       for (i = 0; i < menu->items_num; i++)
Index: pkgsrc/wm/afterstep/patches/patch-src_afterstep_theme.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_afterstep_theme.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_afterstep_theme.c     Thu Oct 23 01:28:09 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_afterstep_theme.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/afterstep/theme.c.orig 2013-05-01 13:34:11.000000000 +0000
++++ src/afterstep/theme.c
+@@ -88,7 +88,7 @@ ASThemeFileType detect_theme_file_type (
+                                       int i;
+                                       type = AST_ThemeTar;
+                                       for (i = 0; i < 17 && buf[i] != '\0'; ++i)
+-                                              if (!isprint (buf[i])) {
++                                              if (!isprint ((unsigned char)buf[i])) {
+                                                       type = AST_ThemeBad;
+                                                       break;
+                                               }
Index: pkgsrc/wm/afterstep/patches/patch-src_ascp_asimbrowser.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_ascp_asimbrowser.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_ascp_asimbrowser.c    Thu Oct 23 01:28:09 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_ascp_asimbrowser.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/ascp/asimbrowser.c.orig        2013-05-01 13:34:11.000000000 +0000
++++ src/ascp/asimbrowser.c
+@@ -521,7 +521,7 @@ void generate_dir_html( char *dir, char 
+                                                                               ++body_count;
+                                                                       else if(  c == '>' && body_count == 4 )
+                                                                               ++body_count;
+-                                                                      else if( !isspace( c ) || (body_count > 0 && body_count < 4) )
++                                                                      else if( !isspace( (unsigned char)c ) || (body_count > 0 && body_count < 4) )
+                                                                       {
+                                                                               body_count = -1 ;
+                                                                       }
+@@ -546,7 +546,7 @@ void generate_dir_html( char *dir, char 
+                                               {
+                                                       if( valid_html )
+                                                               fputc( c, frame_of );
+-                                                      else if( !isascii( c ) )
++                                                      else if( !isascii( (unsigned char)c ) )
+                                                               fprintf( frame_of, "#%2.2X;", c );
+                                                       else if( c == '<' )
+                                                               fprintf( frame_of, "&lt;" );
Index: pkgsrc/wm/afterstep/patches/patch-src_asetroot_asetroot.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_asetroot_asetroot.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_asetroot_asetroot.c   Thu Oct 23 01:28:09 2025
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_asetroot_asetroot.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/asetroot/asetroot.c.orig       2013-05-01 13:34:11.000000000 +0000
++++ src/asetroot/asetroot.c
+@@ -270,11 +270,11 @@ main (int argc, char **argv)
+       while (*cptr)
+       {
+         bad_option = 0;
+-        while (isspace (*cptr))
++        while (isspace ((unsigned char)*cptr))
+           cptr++;
+         if (*cptr == '\0')
+           break;
+-        if (isdigit (*cptr))
++        if (isdigit ((unsigned char)*cptr))
+           {
+             if (curr_desk < 2)
+               {
+@@ -316,7 +316,7 @@ main (int argc, char **argv)
+             fprintf (stderr, "\n%s: unknown option %s!", MyName, cptr);
+             usage ();
+           }
+-        while (!isspace (*cptr) && *cptr != '\0')
++        while (!isspace ((unsigned char)*cptr) && *cptr != '\0')
+           cptr++;
+       }
+     }
Index: pkgsrc/wm/afterstep/patches/patch-src_tools_ASRun_main.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_tools_ASRun_main.c:1.1
--- /dev/null   Thu Oct 23 01:28:09 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_tools_ASRun_main.c    Thu Oct 23 01:28:09 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_tools_ASRun_main.c,v 1.1 2025/10/23 01:28:09 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/tools/ASRun/main.c.orig        2013-05-01 13:34:11.000000000 +0000
++++ src/tools/ASRun/main.c
+@@ -182,7 +182,7 @@ exec_command(char **ptext, ASRunTool too
+       }        
+       if( text && tool == ASRTool_ASConfigFile )              
+       {
+-              if( isalpha(text[0]) ) 
++              if( isalpha((unsigned char)text[0]) ) 
+               {
+                       char *fullfilename = NULL ; 
+                       char *fulldirname = NULL ; 



Home | Main Index | Thread Index | Old Index