jDif v1.0 - Fast File Difference Utility (c) Jony Rosenne, 1994, 1996 All Rights Reserved 100320.1303@CompuServe.com jDif compares text files and shows the differences between them on a line by line basis. jDif assumes the first file is an old version of a file, and the second file a new version of the file. The files are compared as text, line by line. A line may end with the DOS standard CR-LF, or just with a new line character ('\n'). Trailing blanks are ignored. Tabs are expanded assuming a tab position every 8 characters. jDif has special support for COBOL: With the /c option, jDif compares columns 7 to 72 of each line, and ignores differences which are out of these margins. jDif has special support for System/370 Assembler code: With the /a option, jDif compares columns 1 to 72 of each line, and ignores the sequence numbers. There are three output options: Visual, Report and DOS FC style. Visual ====== The default output is visual: Common lines are displayed in white over a blue background, lines that are present only in the old file (the first) are red over black, and lines only in the new file (the second) are green over black. Navigation is easy and fast: the arrows (up, down, left and right) do what you would expect them to do, n takes you to the next difference, p takes you to the previous difference, Home takes you to the first page, End takes you to the last page. Control-Home takes you the first position in the first page, Control- Left and Control-Right shift the page half a page sideways. F1 shows a summary of the keyboard functions. F4 - a toggle - shows the line numbers. Common lines show the line numbers they had in the "old" file. To quit you may use Esc, F3 or Alt-F4. Report ====== If option /r is set, jDif sends to standard output a report on the differences. Each run of inserted or deleted lines is preceded by a heading, such as: Delete lines 3-4: Insert after line 4: The output will be buffered (for speed) unless the /v option is set. It may be redirected to a file. DOS FC style ============ If option /f is set, jDif sends to standard output a report similar to the output of the DOS program FC (File Compare). The output will be buffered (for speed) unless the /v option is set. It may be redirected to a file. Use === To call jDif use the following DOS command: jdif oldfile newfile [options] The options, which may come before or after the file names, are: /c COBOL (columns 7 to 72) /f DOS FC style output /h Help (this is it) /r output Report /v do not buffer the output The author ========== Jonathan (Jony) Rosenne e-mail: 100320.1303@CompuServe.com Mail: P O Box 33641 Tel Aviv Israel Customized versions may be obtained to support unique requirements, for example to ignore change signatures. Acknowledgments ================ I looked at several file comparison programs, but none addressed my specific requirements so I wrote my own. jDif is faster than the other programs I looked at, and accurate. I used the algorithm of E. W. Myers, An O(ND) Difference Algorithm and Its Variations, Algorithmica (1986) 1: 251-266.