🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2252

Re: Encouraging good coding standards - call for participation...

#2252
From: Stan Ryckman
Date: Tue, 12 Mar 1996 01:28
45 lines
2037 bytes
In article <4hqec9$1kf@solutions.solon.com>,
Wes Brown <wes@prozac.student.cwru.edu> wrote:
>Stan Ryckman (stanr@tiac.net) wrote:
:: I once thought I might like to make GNU's "diff" work on my 16-bit
:: PC compiler (wanting to modify it to deal with C tokens rather than
:: words/lines) but the code turned out to be so hopeless I gave up
:: quickly.  Somebody told me that that code is better now, but I've
:: never made another effort to get it.
:: 
:: What I wanted to do was make
:: 	int main(void) {return 0;}
:: match
:: 	int main(void)
:: 	{
:: 		return 0;
:: 	}
:: for example, in order to locate "real" differences.
:
:Have you ever heard of GNU indent?  
:run the two c files through indent before you diff them and everything will
:work out fine.

Good idea... except what I had in mind would have identified the
line numbers in the original files when differences were found.  Also,
an option would have allowed comments to be equal to all white space.

As someone pointed out in email, I could also just put each token
on a line and diff the resulting mess...but again, I lose the line
number information.

Just curious, what would GNU indent do with:
	(a)	x+++y
	(b)	x++ +y
	(c)	x+ ++y
?
(Note that two of these need to match, and one mustn't!)

As I said, I gave up on it.

Cheers,
Stan.
--
Stan Ryckman  (stanr@tiac.net)
  (Apologies for non-responses or late responses to some posts;
  .newsrc was trashed and I'm trying to get it back to where it was.)
Technical Details
Message-ID: <4i2k02$8is@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4gsee2$4r5@solutions.solon.com> <4hlala$4hn@solutions.solon.com> <4hqec9$1kf@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: stanr@tiac.net (Stan Ryckman)
Newsgroups: comp.lang.c.moderated
Subject: Re: Encouraging good coding standards - call for participation...
Date: 11 Mar 1996 19:28:34 -0600
Organization: Amber & Sneakers Fan Club
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4i2k02$8is@solutions.solon.com>
References: <4gsee2$4r5@solutions.solon.com> <4hlala$4hn@solutions.solon.com> <4hqec9$1kf@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com