home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff281.lzh / Diff / README < prev    next >
Text File  |  1989-11-20  |  2KB  |  63 lines

  1. This directory contains the GNU DIFF and DIFF3 utilities, version 1.10.
  2. See file COPYING for copying conditions.  To compile and install on
  3. system V, you must edit the makefile according to comments therein.
  4.  
  5. Report bugs to bug-gnu-utils@prep.ai.mit.edu
  6.  
  7. This version of diff provides all the features of BSD's diff.
  8. It has these additional features:
  9.  
  10.    -a    Always treat files as text and compare them line-by-line,
  11.     even if they do not appear to be ASCII.
  12.  
  13.    -B    ignore changes that just insert or delete blank lines.
  14.  
  15.    -C #
  16.     request -c format and specify number of context lines.
  17.  
  18.    -F regexp
  19.     in context format, for each unit of differences, show some of
  20.     the last preceding line that matches the specified regexp.
  21.  
  22.    -H    use heuristics to speed handling of large files that
  23.     have numerous scattered small changes.  The algorithm becomes
  24.         asymptotically linear for such files!
  25.     
  26.    -I regexp
  27.     ignore changes that just insert or delete lines that
  28.     match the specified regexp.
  29.  
  30.    -N    in directory comparison, if a file is found in only one directory,
  31.     treat it as present but empty in the other directory.
  32.  
  33.    -p    equivalent to -c -F'^[_a-zA-Z]'.  This is useful for C code
  34.     because it shows which function each change is in.
  35.  
  36.    -T    print a tab rather than a space before the text of a line
  37.     in normal or context format.  This causes the alignment
  38.     of tabs in the line to look normal.
  39.  
  40.  
  41.  
  42. GNU DIFF was written by Mike Haertel, David Hayes, Richard Stallman
  43. and Len Tower.  The basic algorithm is described in: "An O(ND)
  44. Difference Algorithm and its Variations", Eugene Myers, Algorithmica
  45. Vol. 1 No. 2, 1986, p 251.
  46.  
  47.  
  48. Suggested projects for improving GNU DIFF:
  49.  
  50. * Handle very large files by not keeping the entire text in core.
  51.  
  52. One way to do this is to scan the files sequentally to compute hash
  53. codes of the lines and put the lines in equivalence classes based only
  54. on hash code.  Then compare the files normally.  This will produce
  55. some false matches.
  56.  
  57. Then scan the two files sequentially again, checking each match to see
  58. whether it is real.  When a match is not real, mark both the
  59. "matching" lines as changed.  Then build an edit script as usual.
  60.  
  61. The output routines would have to be changed to scan the files
  62. sequentially looking for the text to print.
  63.