Notes on WinDiff Version 1.2 for Windows 3.1 ============================================ File: "windiff.txt", $Date: 1995/04/02 17:03:16 $ Copyright (C) 1994,1995 by ZKSoft - All Rights Reserved ------------------------------------------------------------------ WinDiff is a utility to graphically display the differences between two ASCII text files under the Windows 3.1 environment. Contents -------- Overview Installation Menus The diff Command Customization The windiff.ini Initialization File Error Messages Limitations Changes from version 1.1 to 1.2 Changes from version 1.0 to 1.1 Improvements Bugs Fixed The "diff.exe" Utility The Right Price ($10), License Agreeement and Warranty Disclaimer Bugs, Comments, Suggestions Author, Address Overview -------- WinDiff is a utility to graphically display the differences between two ASCII text files under the Windows 3.1 environment. The user selects "Left" and "Right" files that will be compared. The files specified are copied into %TEMP%\wdXXXXl.tmp and %TEMP%\wdXXXXr.tmp and the comparison is done on these temporary files (XXXX is an ID unique to a running instance of WinDiff). The two files are displayed in a "Left" and a "Right" window. Changed lines are highlighted with solid yellow, insert and delete locations are shown by a thin solid line. The strip in the middle between the "Left" and "Right" windows is used to cross-connect the highlighted areas and to display line numbers. The differences are not computed by WinDiff itself - it runs ("WinExec"s) a Unix "diff" compatible utility with its output redirected to %TEMP%\windiff.tmp and then reads this file to obtain the results. The dif115ax.zip file included with this version of WinDiff is a public domain version of a utility (see "The diff Utility" below) that may be used. WinDiff is Distributed as Shareware, So --------------------------------------- 1. Please pass WinDiff on to your friends and colleagues. 2. You should carefully read the terms and conditions outlined in the "License Agreeement and Warranty Disclaimer" section in this file before using this software. Use of this software indicates your acceptance of those terms and conditions. If you do not agree with them, DO NOT USE this software. Installation ------------ Automated installation will be available in a future release of WinDiff; until then: 1. Create a subdirectory on your hard drive to hold WinDiff (e.g.: "C:\WINDIFF"), change to that directory and copy windif11.zip there. 2. Unzip the zip files, e.g.: pkunzip windif11 3. pkunzip dif155ax 4. Copy diff.exe to a directory specified in your PATH variable. 5. Create a program item under one of the Windows Program Manager program groups (Main, Accessories, etc.) by choosing New from the Program Manager File menu: Program Description: WinDiff Command Line: C:\WINDIFF\windiff.exe Working Directory: Shortcut Key: Click on the "Change Icon" button to set the WinDiff icon for this program item. Click OK and OK again. Done. 6. You can create a Notepad Program Manager program item with C:\WINDIFF\windiff.txt (this file) as a parameter on the command line: Program Description: WinDiff.txt Command Line: C:\WINDOWS\notepad.exe C:\WINDIFF\windiff.txt ... if you want to have access to this file from the Program Manager. Installation is complete. If you wish, files other than windiff.exe, diff.exe, windiff.txt, windiffb.bat and windiffb.pif may be deleted. Double click on WinDiff to run... Menus ----- WinDiff accepts no command line parameters. It starts up with two empty file viewing windows ("Left File" and "Right File"). The "File,Open" menu comes up with a "Left File" and a "Right File" modal dialog box, in sequence, to select the files to be compared. The dialog boxes will show the last previously used left and file names. These may be selected by just clicking OK. THE SCREEN MAY BLANK WHILE "DIFF" IS STARTED AND BEFORE THE RESULTS ARE DISPLAYED. This is NORMAL since the "diff" command is executed as a DOS application. Under the default installation a small icon with title "Windiff Running Diff" should be present while the diff utility is running. The "Differences" menu provides access to the "Next", "Previous" and "First" difference. The files are initially opened and positioned at their beginning. The "Next", "Previous", or "First" operation attempts to center the to files around the difference lines. The "Pop-up Buttons" menu item pops up buttons that provide the same functions without going through the menus. The buttons may be dragged to anywhere on the screen. The buttons will be repositioned by WinDiff if the WinDiff window is moved or resized. The "Diff Again" menu item executes the diff command again and redisplays the windows. This is useful if modifications are done on the source files after the diffs are first displayed. "Diff Again" will diff the files that are currently displayed, without prompting for new filenames. Scrolling the Left or Right file view window moves the contents of the middle strip accordingly. The Help menu provides access to the About message box brag. The diff Command ---------------- WinDiff runs a unix-diff compatible command before it displays the differences. The default command is: "%COMSPEC% /c diff %TEMP%\wdXXXXl.tmp %TEMP%\wdXXXXr.tmp >%TEMP%\windiff.tmp" Customization ------------- The following sections define the environment variables read and recognized by WinDiff. Note that only TEMP is needed for default operation, assuming you have copied diff.exe to a directory that is in your PATH. TEMP The TEMP environment variable determines: 1. The pathname of the standard system temporary directory, where the standard output (STDOUT) of the "diff" command is piped (>%TEMP%\windiff.tmp) in case the WDIFFCMDT environment variable is not set (see below). 2. The path to the (standard system temporary) directory where temporary copies of the "Left" (->wdXXXXl.tmp) and "Right" (->wdXXXXr.tmp) files will be placed before the comparison is done on those files. These files are deleted by WinDiff on normal termination. The windiff.ini Initialization File ----------------------------------- WinDiff creates/reads a windiff.ini file in the directory where the windiff.exe executable is run. The highlight color is customizable, by providing the required R G B (red green blue) color component values between 0 (component absent) and 255 (component at maximum). In the example below, 255 255 0 is max Red and max Green with no Blue = YELLOW color used for highlighting differences. YELLOW is the default value written by WinDiff if not found in windiff.ini). You can experiment with the Red Green Blue values in the "Custom Color Selector" dialog box accessed by the "Define Custom Colors" button in the "Color" customization program under the "Control Panel". The WDIFFCMD and WDIFFCMDT environment variables of version 1.0 are replaced by the optional WDiffCmd and WDiffCmdT profile string definitions in windiff.ini and are NOT read anymore. See the example below. Note that the last used font, left and right file, and WinDiff's screen position are automatically saved by WinDiff itself (there is no need to change these manually). The following is an example of windiff.ini: [windiff] HighlightColor=255 255 0 LogFont=-13 0 0 0 400 0 0 0 0 3 2 1 34 Arial ScreenPosition=-1 38 1025 362 LeftFile=WINDIF10.H LeftFileDir=C:\PROJ\WINDIFF RightFile=WINDIFF.H RightFileDir=C:\PROJ\WINDIFF WDiffCmd -------- The WDiffCmd profile string in windiff.ini may be set to the command that will be started with the "Left" and "Right" filenames as parameters. The default command is "\windiffb.bat". For example: WDiffCmd="c:\command.com /c diff -h [and other pars]" Note that the invoked command must be able to handle standard output redirection (e.g. "C:\COMMAND.COM -c diff.exe" runs diff through COMMAND.COM which provides stdout redirection). The same effect could be better achieved by simply modifying windiffb.bat WDiffCmdT --------- The WDiffCmdT profile string may be set to a string (e.g. ">%TEMP%\windiff.tmp") that will be appended to the command string that WinDiff runs to obtain the differences. WDiffCmdT="" may be used to disable the default ">\tmpdir\windiff.tmp" command trailer if you WDiffCmd already "covers" that. Error Messages -------------- Error message boxes will appear if WinDiff is unable to open any of the source files specified for READ access, or any of the "%TEMP%\wdXXXXl.tmp", "%TEMP%\wdXXXXr.tmp", or "%TEMP%\windiff.tmp" files for CREATE/WRITE access. Limitations ----------- If COMMAND.COM is used, the total length of the diff command cannot exceed 127 bytes (check the "length=d" in the WinDiff error message box). This should normally not happen unless your %TEMP% variable is too long (see the "The diff Command" section above) which is unlikely. WinDiff can scroll horizontally only within the first 512 characters of lines in the files that are being compared. Comparisons done by the external "diff" utility are unrelated to this limitation and will ofcourse detect differences in lines that differ after the first 512 characters. Changes from Version 1.1 to Version 1.2 --------------------------------------- Minor enhancement: Windiff now runs the "diff" command through windiffb.bat in an iconized window (using windiffb.pif). Change of ZKSoft's mailing address. Changes from Version 1.0 to Version 1.1 --------------------------------------- Improvements ------------ Windiff now creates/reads a windiff.ini file in the directory where the windiff.exe executable is run. The highlight color is customizable, the last used font, left and right file and screen position are remembered automatically by WinDiff. The WDIFFCMD and WDIFFCMDT environment variables are replaced by WDiffCmd and WDiffCmdT string definitions in windiff.ini and are NOT read anymore. (Refer to the Customization section above for a description of windiff.ini.) The temporary file names are now unique to each instance of WinDiff, so it is now possible for example to compare file1 and file2 with one WinDiff and file1 and file3 with another WinDiff with both WinDiffs active at the same time. Bugs Fixed ---------- - Some complained that WinDiff was not showing the results after the completion of diff execution. This should not happen anymore. - A number of DBWin fatal/warning messages have been eliminated. The only one remaining is when windiff does one last check on diff execution after diff has already completed. This is harmless and is required for correct WinDiff operation. - wdXXXXl.tmp and wdXXXXr.tmp are now actually used when the diff command is built. - windiff.tmp is removed after closing WinDiff. The "diff.exe" Utility ---------------------- A version of the Free Software Foundation's (FSF) "diff" utility (dif115ax.zip) is provided as a convenience, although any other program may be used (e.g. the MKS toolkit diff) as long as the difference lines are displayed using a n1[,n2][c|a|d]n3[,n4] syntax. This copy of dif155ax.zip was obtained from the "oak.oakland.edu:/pub/msdos/gnuish" directory on Internet. The sources (dif155as.zip) may be obtained from the same directory. WinDiff runs "diff" in a sub-shell, treating it as a lower level system command. No part of any version of "diff" (source or binary) is included in the WinDiff sources or binaries. Finally... The The Right Price ($10), License Agreement and Warranty Disclaimer ---------------------------------------------------------------- 1. This is a low-price, fully operational, no registration nuisance messages product. If you continue using it for more than a month after you have first obtained it, please send $10 CDN or US dollars PER USER to the address below. In addition to registering your copy of WinDiff, your payment will entitle you to upgrade prices on subsequent versions of WinDiff. Please support shareware by registering - the price is right! WinDiff 1.1 is free to registered users of WinDiff 1.0 2. You may make as many copies of this software as you wish and give exact copies of this software to anyone and and distibute it together with its documentation (this file) by any physical or electronic means provided it is in its original, unmodified form. You may not charge, request or accept donations for WinDiff other than to cover the average cost of the distribution medium. 3. WinDiff software and the accompanying files are distributed "as is" and without any warranties as to performance, merchantability or fitness for any puprose, whether expressed or implied. 4. The use of this software at any time is entirely at your own risk. By using this software you agree to all terms and conditions set out above. Bugs, Comments, Suggestions --------------------------- Please e-mail bug reports, comments and suggestions, or alternatively, send them to the address below. Author, Address --------------- Zoltan Kemenczy E-mail: zoltan@io.org ZKSoft 4110 Treetop Crescent Mississauga, Ontario Canada L5L 2L8