DIF is a line oriented text file comparison program. It's purpose is to compare two files and list the differences. DIF identifies portions of two files that are identical, and when it comes across differences, it attempts to resynchronize the files. DIF was written to isolate changes made to the source code of computer programs which is why it is line oriented, rather than word or character oriented. It is designed to work with ASCII files with lines terminated by carriage return, line feed sequences. It is not intended for comparing files created by Wordstar in document mode or other editors that use non-ASCII control characters. To use DIF, type: DIF file1.ext file2.ext or DIF file1.ext file2.ext -flags The differences between file1 and file2 will be written to a disk file with the filename of file1 and the extension "DIF". For example: DIF QKSORT.PAS QKSORT.BAK will produce a difference file named QKSORT.DIF if any differences are found. FLAGS: DIF recognizes four flags: Dd, Mn, C and P. The flags must appear after "-" with no spaces in between. -Dd changes the output drive for the difference file. "d" is the name of the disk drive to write the difference file on. -Mn, sets the match threshold. "n" is the decimal number of consecutive matching lines that qualifies as a match between the two files. If this flag is not used, DIF considers 3 consecutive matching lines to be a match. If DIF is having trouble resynchronizing after it locates a difference, the problem can often be solved by raising the match threshold to 4 or more. -C causes the differences to be sent to the console instead of a disk file. -P causes the differences to be sent to the printer instead of a disk file. Examples: DIF PROG.BAS PROG.BAK -M6DC This command will compare PROG.BAS and PROG.BAK, writing the differences to C:PROG.DIF. The match threshold is set to 6 consecutive matching lines. DIF VERSION1.C VERSION2.C -P The differences between VERSION1.C and VERSION2.C will be printed on the printer. DIF MYPROG.FOR PROG.ORG The differences between MYPROG.FOR and PROG.ORG will be written to the file MYPROG.DIF. DIF FILE1.ASC FILE.TXT -C The differences between FILE1.ASC and FILE.TXT will be printed on the console. PROGRAM SOURCE: I originally wrote this program in PASCAL MT+. This version was modified and compiled using Turbo Pascal. The source is included in the library in case anyone wants to modify the program to work with Wordstar document files, or in case you are just curious how the program works. I was working in Argentina when I wrote the program, so, unfortunately, most of the comments and variable names are in Spanish. Sorry. To compile, unsqueeze all the *.PAS files and compile DIF.PAS with the COM Turbo option set. Have fun. Bob Ponting February 27, 1988