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 Sep 11 21:35:02 UTC 2025

Modified Files:
        pkgsrc/wm/afterstep: Makefile distinfo
Added Files:
        pkgsrc/wm/afterstep/patches: patch-libAfterBase_xml.c
            patch-src_ASDocGen_xmlproc.c

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

Noted to cause build failures on recent NetBSD (after ctype(3) changes
circa 10.99.14). There are probably more potential issues lurking here,
but this at least gets the package building again.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 pkgsrc/wm/afterstep/Makefile
cvs rdiff -u -r1.31 -r1.32 pkgsrc/wm/afterstep/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.c \
    pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_xmlproc.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.113 pkgsrc/wm/afterstep/Makefile:1.114
--- pkgsrc/wm/afterstep/Makefile:1.113  Thu Sep  4 22:50:51 2025
+++ pkgsrc/wm/afterstep/Makefile        Thu Sep 11 21:35:01 2025
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.113 2025/09/04 22:50:51 gutteridge Exp $
+# $NetBSD: Makefile,v 1.114 2025/09/11 21:35:01 gutteridge Exp $
 
 DISTNAME=      AfterStep-2.2.12
 PKGNAME=       ${DISTNAME:S/AfterStep/afterstep/}
-PKGREVISION=   14
+PKGREVISION=   15
 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.31 pkgsrc/wm/afterstep/distinfo:1.32
--- pkgsrc/wm/afterstep/distinfo:1.31   Tue Sep  9 22:07:36 2025
+++ pkgsrc/wm/afterstep/distinfo        Thu Sep 11 21:35:01 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2025/09/09 22:07:36 gutteridge Exp $
+$NetBSD: distinfo,v 1.32 2025/09/11 21:35:01 gutteridge Exp $
 
 BLAKE2s (AfterStep-2.2.12.tar.bz2) = 7805d82301489abce1fb81b73beeff5c2efee85592281578a06c3bcbe1056ac8
 SHA512 (AfterStep-2.2.12.tar.bz2) = 5cac6ce74b24cbcc5b8e8a6f7cc9308e110f0d09597af1fa0a8730d5f5111932a23332629bc4d372fc8d9583a514d97e35f747b17decf8d4ebfe5e3f20cdbbee
@@ -18,6 +18,7 @@ SHA1 (patch-libAfterBase_output.c) = fe0
 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-libAfterConf_DesktopEntry.c) = e62c9cdb7fb1a05954fed56a28b5b2b38f79aa07
 SHA1 (patch-libAfterConf_Feel.c) = 7cd0d3672edec8f06538de560b66203b11fd84ba
@@ -41,6 +42,7 @@ SHA1 (patch-libAfterStep_parser__xml.c) 
 SHA1 (patch-libAfterStep_screen.c) = 18f23efd45e82528c7c12a0ef1aae255b0dfbc56
 SHA1 (patch-libAfterStep_session.c) = 3e3ab5c2db80be7b9b9610a53b48624c9200f936
 SHA1 (patch-src_ASDocGen_Makefile.in) = c879bca9d2e4acf6776dfeef8557b8f72f77ab82
+SHA1 (patch-src_ASDocGen_xmlproc.c) = fc8f974b8b53e0285a5323a76737dcc067a4ee03
 SHA1 (patch-src_Animate_Makefile.in) = fd5c50d91233e062c05c3bd4abe85741f345dff4
 SHA1 (patch-src_afterstep_asinternals.h) = 92264d8a7397001a6b5934397670d85b94c5e10a
 SHA1 (patch-src_afterstep_misc.c) = 5025169242453fb35b96adbb5e0aec1173db8447

Added files:

Index: pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.c:1.1
--- /dev/null   Thu Sep 11 21:35:02 2025
+++ pkgsrc/wm/afterstep/patches/patch-libAfterBase_xml.c        Thu Sep 11 21:35:01 2025
@@ -0,0 +1,194 @@
+$NetBSD: patch-libAfterBase_xml.c,v 1.1 2025/09/11 21:35:01 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- libAfterBase/xml.c.orig    2013-05-01 13:34:11.000000000 +0000
++++ libAfterBase/xml.c
+@@ -57,7 +57,7 @@ void asxml_var_insert(const char* name, 
+ 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;
+ }
+ 
+@@ -157,7 +157,7 @@ xml_elem_t* xml_parse_parm(const char* p
+               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++);
+@@ -167,10 +167,10 @@ xml_elem_t* xml_parse_parm(const char* p
+ 
+               /* 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 == '\'') {
+@@ -178,10 +178,10 @@ xml_elem_t* xml_parse_parm(const char* p
+                       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();
+@@ -217,7 +217,7 @@ static Bool xml_print_r(xml_elem_t* root
+       
+       if (root->tag_id == XML_CDATA_ID || !strcmp(root->tag, cdata_str)) {
+               char* ptr = root->parm;
+-              while (isspace((int)*ptr)) ptr++;
++              while (isspace((unsigned char)*ptr)) ptr++;
+               fprintf(stderr, "%s", ptr);
+       } else {
+               if( root->child != NULL || root->next != NULL  ) 
+@@ -352,7 +352,7 @@ int xml_parse(const char* str, xml_elem_
+                       /* Find the end of the tag. */
+                       for (etag = oab + 2 ; xml_tagchar((int)*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_
+                       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
+@@ -399,7 +399,7 @@ int xml_parse(const char* str, xml_elem_
+                               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;
+@@ -412,10 +412,10 @@ int xml_parse(const char* str, xml_elem_
+ 
+                               /* 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 == '\'') {
+@@ -424,7 +424,7 @@ int xml_parse(const char* str, xml_elem_
+                               }
+ 
+                               /* 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; }
+@@ -432,8 +432,8 @@ int xml_parse(const char* str, xml_elem_
+                               /* 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;
+                       }
+@@ -452,7 +452,7 @@ int xml_parse(const char* str, xml_elem_
+                       }
+ 
+                       /* 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;
+ 
+@@ -652,7 +652,7 @@ spool_xml_tag( ASXmlBuffer *xb, char *tm
+       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;
+       }
+@@ -689,7 +689,7 @@ spool_xml_tag( ASXmlBuffer *xb, char *tm
+                       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 ;              
+@@ -701,12 +701,12 @@ spool_xml_tag( ASXmlBuffer *xb, char *tm
+       {     /* 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 ; 
+@@ -748,7 +748,7 @@ spool_xml_tag( ASXmlBuffer *xb, char *tm
+                                       }else
+                                               --(xb->level);                  
+                               }                                          
+-                      }else if( !isalnum( (int)tmp[i] ) )       
++                      }else if( !isalnum((unsigned char)tmp[i] ) )      
+                               xb->state = ASXML_BadAttrName ;
+                       else
+                       {       
+@@ -764,12 +764,12 @@ spool_xml_tag( ASXmlBuffer *xb, char *tm
+       {       
+               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 ; 
+@@ -807,7 +807,7 @@ spool_xml_tag( ASXmlBuffer *xb, char *tm
+       
+       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-src_ASDocGen_xmlproc.c
diff -u /dev/null pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_xmlproc.c:1.1
--- /dev/null   Thu Sep 11 21:35:02 2025
+++ pkgsrc/wm/afterstep/patches/patch-src_ASDocGen_xmlproc.c    Thu Sep 11 21:35:01 2025
@@ -0,0 +1,51 @@
+$NetBSD: patch-src_ASDocGen_xmlproc.c,v 1.1 2025/09/11 21:35:01 gutteridge Exp $
+
+Use ctype.h correctly.
+
+--- src/ASDocGen/xmlproc.c.orig        2013-05-01 13:34:11.000000000 +0000
++++ src/ASDocGen/xmlproc.c
+@@ -111,7 +111,7 @@ write_doc_cdata( const char *cdata, int 
+               Bool special = False ;
+               for( i = 0 ; i < len ; ++i ) 
+               {
+-                      if( (!isalnum(cdata[i]) && cdata[i] != '_'  && cdata[i] != '(' && cdata[i] != ')') || special )
++                      if( (!isalnum((unsigned char)cdata[i]) && cdata[i] != '_'  && cdata[i] != '(' && cdata[i] != ')') || special )
+                       {
+                               if( token_start < i )
+                               {       
+@@ -243,7 +243,7 @@ convert_xml_tag( xml_elem_t *doc, xml_el
+                                       --len ;
+                               /* we want to skip as much whitespace as possible in NROFF */
+                               for( i = 0 ; i < len ; ++i ) 
+-                                      if( !isspace(data_ptr[i]) )
++                                      if( !isspace((unsigned char)data_ptr[i]) )
+                                               break;
+                               if( i == len ) 
+                                       len = 0 ;
+@@ -253,9 +253,9 @@ convert_xml_tag( xml_elem_t *doc, xml_el
+                                       Bool written = 0 ;
+                                       for( i = 0 ; i < len ; ++i ) 
+                                       {
+-                                              while( isspace(data_ptr[i]) && i < len ) ++i ;
++                                              while( isspace((unsigned char)data_ptr[i]) && i < len ) ++i ;
+                                               from = i ; 
+-                                              while( !isspace(data_ptr[i]) && i < len ) ++i ;
++                                              while( !isspace((unsigned char)data_ptr[i]) && i < len ) ++i ;
+                                               to = i ; 
+                                               if( to > from  ) 
+                                               {       
+@@ -501,12 +501,12 @@ add_glossary_item( xml_elem_t* doc, ASXM
+       LOCAL_DEBUG_OUT( "term_text = \"%s\"", term_text );
+       while(*term_text)
+       {       
+-              if( isalnum(*term_text) )
++              if( isalnum((unsigned char)*term_text) )
+                       break;
+               ++term_text ;
+       }
+       i = 0 ;
+-      while( isalnum(term_text[i]) ) ++i ;
++      while( isalnum((unsigned char)term_text[i]) ) ++i ;
+       term_text[i] = '\0' ;
+ 
+       if( term_text[0] != '\0' ) /* need to add glossary term */



Home | Main Index | Thread Index | Old Index