looking for C language file differ

john.k.lash jlash at cbnewsd.att.com
Fri Jun 1 04:55:00 AEST 1990


Does anyoue have or know of a "syntax tolerant" diff program for C files?
What I have in mind is a diff that works on the level of C expressions, 
functions, and declarations as opposed to text lines.  For instance it 
should not consider the following two code fragments to be different:

                     x=y+z; a=b+c;
-------
                     x = y + z;
                     a = b+c;


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.

When it finds a difference it could print the offending lines and line 
numbers.

How bout it, does such a thing exist?  I haven't thought of any impossible
problems with doing this short of finding the time. 

thanks for any help
--john

john lash	jlash at ihlpa.att.com



More information about the Comp.unix.questions mailing list