looking for C language file differ
brnstnd at stealth.acf.nyu.edu
brnstnd at stealth.acf.nyu.edu
Sat Jun 2 00:19:35 AEST 1990
In article <1990May31.185500.29790 at cbnewsd.att.com> jlash at cbnewsd.att.com (john.k.lash) writes:
> Does anyoue have or know of a "syntax tolerant" diff program for C files?
It sounds like you want to pipe both programs through a reindenter
before diffing them. To keep track of the original line numbers, your
safest bet is to use cpp and then add /* 356 */, /* 357 */, ...
> Also, it should ignore equivalent functions at different places in the
> source files. I could add lots of other things like ignoring differences
> in the ordering of local variables, #defines, and structure definitions.
cpp handles any #define trickery. For the reordering: After a reindent,
sort the ``pieces'' of the code into order, where pieces are external
declarations, function definitions, etc. This is really easy if your
indent can manage to separate pieces by spaces. Similarly sort the local
variables within each block.
---Dan
More information about the Comp.unix.questions
mailing list