Category : C Source Code
Archive   : GNUDIFF.ZIP
Filename : README

 
Output of file : README contained in archive : GNUDIFF.ZIP
This directory contains the GNU DIFF and DIFF3 utilities, version 1.4.
See file COPYING for copying conditions.

This version of diff provides all the features of BSD's diff
except the -D output format (insertion of #ifdef's).

It has these additional features:

-a Always treat files as text and compare them line-by-line,
even if they do not appear to be ASCII.

-B ignore changes that just insert or delete blank lines.

-C equivalent to -c -F'^[_a-zA-Z]'. This is useful for C code
because it shows which function each change is in.

-F regexp
in context format, for each unit of differences, show some of
the last preceding line that matches the specified regexp.

-H use heuristics to speed handling of large files that
have numerous scattered small changes.

-I regexp
ignore changes that just insert or delete lines that
match the specified regexp.

-N in directory comparison, if a file is found in only one directory,
treat it as present but empty in the other directory.

-T print a tab rather than a space before the text of a line
in normal or context format. This causes the alignment
of tabs in the line to look normal.


The basic algorithm is described in:
"An O(ND) Difference Algorithm and its Variations", Eugene Myers,
Algorithmica Vol. 1 No. 2, 1986, p 251.


Suggested projects for improving GNU DIFF:

1. Implement the option -D: -DSTRING means generate a merged version of
the two input files containing #ifdef STRING conditionals that would
cause the result of cpp to be one or the other of the files.

2. Handle very large files by not keeping the entire text in core.

One way to do this is to scan the files sequentally to compute hash
codes of the lines and put the lines in equivalence classes based only
on hash code. Then compare the files normally. This will produce
some false matches.

Then scan the two files sequentially again, checking each match to see
whether it is real. When a match is not real, mark both the
"matching" lines as changed. Then build an edit script as usual.

The output routines would have to be changed to scan the files
sequentially looking for the text to print.


  3 Responses to “Category : C Source Code
Archive   : GNUDIFF.ZIP
Filename : README

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/