Do you trust the "indent" program?

Alvin "the Chipmunk" Sylvain asylvain at felix.UUCP
Sat Dec 29 09:59:43 AEST 1990


In article <277A1970.3AFB at tct.uucp> chip at tct.uucp (Chip Salzenberg) writes:
> According to arnold at audiofax.com (Arnold Robbins):
> >A better, more useful technique would be to use lex/flex to write a
> >C scanner that produced a stream of tokens, one per line.  Run it against
> >the before and after versions, and then use diff on the two outputs.
> 
> No need.  There is already a utility in the c.s.u archives called
> "spiff" (for Spaceman Spiff).  Spiff is a token-based diff program.
> Just run indent and "spiff -C"; if indent worked properly, spiff
> should produce no output.

You would be better off, or at least more accurate, to compile both
before and after versions and 'diff' the object code.

What you're suggesting is that we take a piece of relatively new soft-
ware (with s/w, new == buggy) and validate it using a piece of relatively
new sofware (probably just as buggy).  The only thing that'll save you
is the low probability that the bugs line up such that they both make
the same mistake.

'diff' at least is old enough to have most of the bugs removed.
--
asylvain at felix.UUCP (Alvin "the Chipmunk" Sylvain)
========================= Opinions are Mine, Typos belong to /usr/ucb/vi
"We're sorry, but the reality you have dialed is no longer in service.
Please check the value of pi, or see your SysOp for assistance."
UUCP: hplabs!felix!asylvain ============================================



More information about the Comp.lang.c mailing list