🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #43

Spiff -C dumps core

#43
From: Kirk Woods
Date: Thu, 29 Jun 1989 16:12
24 lines
1272 bytes
I found a problem with SPIFF while doing a syntactic diff of a C file.
The problem was caused when spiff ran into a character data assignment
of a double quote character in the form '"' and '\"'.  SPIFF interprets
this to be the begining of a quoted string and gets a segmentation
violation when it tries to find the end of the quote.

The fix is to make that charcter assignment a literal by adding the
following lines to spiff.c:

--- 261,268 -----
  			**	 the C programming language
  			*/
  			case 'C' :
+ 				C_addcmd("literal  '\"'      ");
+ 				C_addcmd("literal  \\\"      ");
  				C_addcmd("literal  \"   \"    \\ ");
  				C_addcmd("comment  /*  */	 ");
  				C_addcmd("literal  &&		 ");

The line numbers may be different since I use indent alot on sources from
the net.

As a side note:  I think spiff is great for verifying that indent did
not corrupt my source files, which it occasionally does.
Technical Details
Message-ID: <18091@sequent.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr!tektronix!sequent!kirk

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr!tektronix!sequent!kirk
From: kirk@sequent.UUCP (Kirk Woods)
Newsgroups: comp.sources.bugs
Subject: Spiff -C dumps core
Keywords: spiff
Message-ID: <18091@sequent.UUCP>
Date: 29 Jun 89 16:12:43 GMT
Reply-To: kirk@crg3.UUCP (Kirk Woods)
Organization: Sequent Computer Systems, Inc
Lines: 24