Minor Patch to tidy (fwd)

---------- Forwarded message ----------
Date: Wed, 20 Feb 2002 11:38:45 -0800
From: Sean Kamath <kamath@cesa.opbu.xerox.com>
To: dsr@w3.org, terry_teague@users.sourceforge.net
Subject: Minor Patch to tidy

Hello.

Running "tidy -show-config" would core-dump on my Solaris 8 Sparc when
printing the current slide-type.  I've attached a patch for config.c
which makes sure that if there is a null pointer for any "Name" it is
converted to a pointer to an empty string.

Perhaps instead tidy_out should check to make sure a string isn't a
null pointer, but this was the easiest for me to quickly fix.

Thanks.

Sean Kamath

PS I sent this to you guys because you're listed as contributing
authors in the Makefile.  If you are not the correct people, please
forward or let me know.  Thanks again.
*** /share/src/util/tidy/src/config.c	Sun Jan 27 23:50:06 2002
--- config.c	Wed Feb 20 11:26:40 2002
***************
*** 1287,1296 ****
                   wstrcasecmp(configItem->name, "language") )
                  continue;
              */
!             if (showCurrent)
!                  vals = *(configItem->location.string);
!              else
!                  vals = "" /* "whole word only" */;
           }
  
          else if ( configItem->parser == ParseTagNames )
--- 1287,1299 ----
                   wstrcasecmp(configItem->name, "language") )
                  continue;
              */
!             if (showCurrent) {
! 	      vals = *(configItem->location.string);
! 	      if (!vals)
! 		vals = "";
! 	    }
! 	    else
! 	      vals = "" /* "whole word only" */;
           }
  
          else if ( configItem->parser == ParseTagNames )

Received on Thursday, 21 February 2002 03:35:22 UTC