home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume3 / hdiff / hdiff.hlp < prev    next >
Encoding:
Text File  |  1986-11-30  |  2.4 KB  |  67 lines

  1. hdiff [-cdmvw] oldfile newfile
  2.  
  3. Source file compare program.
  4. Yet another source compare program like diff.  This one reports moved lines,
  5. not delete/insert as the UNIX diff does.  The h is in honor of Paul Heckel,
  6. the guy who first wrote about this algorithm in CACM July 1978.
  7.  
  8. One of c,d, or m should be used to adjust the internal algorithm.
  9. Currently I am playing with the algorithm.
  10.  
  11. Switches
  12.     -c = use a "count between the start of the other move block and
  13.         the first line in the other file which matched this move
  14.         block" to determine moved blocks [DEFAULT]
  15.     -d = use a "drop" or relative slope to determine moved blocks
  16.     -m = use "mononotonically increasing by one" to determine moved blocks
  17.     -v = verbose (debugging)
  18.     -w = compress white space only on each line before comparison,
  19.         and remove leading white space (remwhite -a option).
  20.  
  21. (see CACM, April 78, "A Technique for Isolating Differences Between Files",
  22. by Paul Heckel).
  23.  
  24. Output:
  25.     The output is identical in meaning to the output from UNIX diff,
  26.     except that a "move" command is present here, but not in diff.
  27.  
  28. DELETES
  29. -------
  30. old d new         // Single line delete - Old line number 'old' is
  31.             // deleted after new line numbered 'new'
  32. startold,endold d new    // Block line delete - Old block of lines 'startold'
  33.             // to 'endold' are deleted after new line number 'new'
  34.  
  35. INSERTS
  36. -------
  37. old a new        // After old line number 'old' is new line number 'new'
  38. old a startnew,endnew    // After old line number 'old', new lines numbered
  39.             // 'startnew' to 'endnew'
  40.  
  41. CHANGES
  42. -------
  43. old c new        // Change one line to one new line.  The old line
  44.             // numbered 'old' becomes new line numbered 'new'
  45. old c startnew,endnew    // Change one line to a block of lines.  Old line
  46.             // numbered 'old' becomes the new set of lines.
  47. startold,endold c new    //  Change a block of old lines to one new line.
  48. startold,endold c startnew,endnew    // Change a block of lines to
  49.             // a different block of lines.
  50.  
  51. MOVES
  52. -----
  53. old m new        // Old line number 'old' is moved to new line
  54.             // number 'new'
  55. startold,endold m startnew,endnew  // The old block of lines have been moved
  56.             // and the old line numbers have changed.
  57.  
  58.  
  59. For DELETES, INSERTS, and CHANGES (but not MOVES) the old line and new lines
  60. are displayed as follows (same as the UNIX diff):
  61. < old line
  62. > new line
  63.  
  64. BUGS:
  65.     Hdiff is limited to files with at most 5000 lines per file.
  66.     To fix, recompile hdiff.c with a larger MAXLINES #define.
  67.