Notes on WinDiff Version 1.0 for Windows 3.1
============================================
File: "windiff.txt", $Date: 1994/02/15 21:38:11 $
Copyright (C) 1994 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
	Error Messages
	Limitations
	The "diff.exe" Utility
	The 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%\windiffl.tmp and
%TEMP%\windiffr.tmp and the comparison is done on these temporary
files.

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 windif10.zip
     there.

  2. Unzip the zip files, e.g.:
	pkunzip windif10

  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, and windiff.txt 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 SCREEN BLANKS WHILE "DIFF" IS EXECUTING AND BEFORE THE RESULTS ARE
DISPLAYED. This is NORMAL since the "diff" command is executed as a
DOS application.

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 "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%\windiffl.tmp %TEMP%\windiffr.tmp >%TEMP%\windiff.tmp"


Customization
-------------

The following sections define the environment variables read and
recognized by WinDiff. Note that only TEMP and maybe COMSPEC (if your
COMMAND.COM is not in C:\) is needed for default operation, assuming
you have copied diff.exe to a directory that is in your PATH.

COMSPEC

The COMSPEC environment variable, if set, specifies the pathname of
the command.com processor. A " /c diff " string will be appended to
form the command to be executed.

The default is "c:\command.com". Note that setting the WDIFFCMD
variable (see below) overrides the %COMSPEC% + " /c diff " command
string.

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" (->windiffl.tmp) and "Right"
(->windiffr.tmp) files will be placed before the comparison is done on
those files. These files are deleted by WinDiff on normal termination.

WDIFFCMD

The WDIFFCMD environment variable may be set to the command that will
be started with the "Left" and "Right" filenames as parameters.  The
default is "c:\command.com /c diff".

The WDIFFCMD environment variable may be used:

  - To specify additional parameters to diff (e.g "c:\command.com /c
diff -h" to work with large files).

  - To use a utility with a different name or include a full path to
the utility.

  - To invoke a "batch" file (e.g "dif.bat") which may contain further
customized processing and parameters.

  - To avoid using the %COMSPEC% variable altogether.

WDIFFCMDT

The WDIFFCMDT environment variable may be set to a string that will be
appended to the command string that WinDiff runs to obtain the
%TEMP%\windiff.tmp file.

If your WDIFFCMD variable points to a "batch" file (e.g. "dif.bat" ),
and the commands in this batch file already specify this redirection
as part of one of the commands, then set WDIFFCMDT to a space (in DOS,
put a "set WDIFFCMDT= " (note the space after the "=") directive in
your autoexec.bat, so that the redirection is not added by WinDiff.

Example of Using WDIFFCMD and WDIFFCMDT

Two sample *.bat files are included in the distribution (wdiffenv.bat and
dif.bat).

wdiffenv.bat contains a sample setup for the WDIFFCMD and WDIFFCMDT
environment variables that can be used with dif.bat. Add the following
line to your autoexec.bat:

	call C:\WINDIFF\wdiffenv.bat

The contents of the sample "dif.bat" file for the WDIFFCMD and
WDIFFCMDT set as in wdiffenv.bat is:

	diff %1 %2 >%TEMP%\windiff.tmp


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%\windiffl.tmp", "%TEMP%\windiffr.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).

- 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.


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
"oak.oakland.edu:/pub/msdos/gnuish" directory. 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 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.

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
P.O. Box 2112, Square One
Mississauga, Ontario
Canada  L5B 3C6

