

                         Tadzio's File Compare
                         =====================

                               Version 2.01

                        (c) 1997 Daniel Schroeder (tadzio@innocent.com)

0. Contents
-----------

 1. What is it?
 2. It's free!
 3. Legal stuff
 4. Command line options
 5. Interactive usage
 6. What does 'Tadzio' stand for?
 7. Known bugs and problems
 8. Future plans
 9. Getting the latest version
10. Version history
11. Contacting the author




1. What is it?
--------------

Tadzio's File Compare (or tfc) is a small and fast side-by-side file compare
utility for Windows 95 and NT. It takes two file names from the command line
(or one file name and one directory, or some wildcards - see below) and
displays them side-by-side in a character-mode window, highlighting differing
lines. Tfc employs a sophisticated resync mechanism to find matching portions
of the two files. It will allow you two scroll through the two files, modify
comparison criteria like case sensitivity or ignoring empty lines, and jump
directly to the next or previous difference.

You may use it, for example, to compare your CONFIG.SYS to CONFIG.BAK to find
out what that install routine you just ran did to your CONFIG.SYS.

Tfc was modelled after "Jeff's file compare" which was included in later
versions of XTree, but has an improved resync mechanism and a better user
interface. It was designed to be used both as a stand-alone program and a
plug-in for Kim Henkel's great XTree clone ZTreeWin (available at fine
shareware sites; starting with version 1.30, ZTreeWin distribution archives
include tfc).




2. It's free!
-------------

Yeah, that's right - it will cost you nothing! If you like it and still feel
you want to give someone some money, I'd be very happy if you'd make a
donation to any organisation fighting AIDS.

Oh, and as I'm the curious type, I'd appreciate you sending an e-mail to
tadzio@innocent.com (that's me :-)) if you use it regularly. Thanks!




3. Legal stuff
--------------

Copyright:

Tfc is copyrighted material. That means you must not do things to tfc I didn't
allow you. Especially, don't sell it (give it away for free instead), don't
patch or disassemble it. Don't use it in military environment or in a company
producing arms or weapons!

Warranty:

Basically, "you get what you pay for." So there's no warranty at all. I will
not be liable for any damage, loss of profit or other consequences arising out
of the use of Tadzio's File Compare utility.
That said, I can assure you I did my best as a professional programmer to make
tfc very safe. Both files to be compared are opened in read-only mode and
closed again as soon as they are read into memory. Tfc never attempts to write
to your hard disk (except for its configuration file, tfc.ini, and maybe
triggering Window's memory swapping mechanism if you compare very large files),
so it's highly unlikely that anything on your hard disk gets corrupted.




4. Command line options
-----------------------

                 tfc [-options] file1 [file2]

[] denote optional parts.

file1: Any valid file name, with or without path. Long file names are
  supported. If it contains blanks, surround it with double quotes.
  You can not use wildcards ('*' and '?') here.

file2: Either a file name or a directory or nothing. If you do not specify
  file2, tfc assumes the same name as file1, with the extension changed
  to '.bak'.
  If you specify a directory, tfc will append the name and extension portion
  (omitting the drive and directory parts, if any) of file1 to it. You may
  specify the directory with or without a trailing backslash.
  You may replace the name and/or extension portion of file2 with an asterisk.
  In that case, the corresponding part of file1 is used in place of that
  wild card. The question mark wild card '?' is not supported.

Examples: this command line      |  compares file     |     to file
-----------------------------------------------------------------------------
 tfc c:\config.sys               |  c:\config.sys     | c:\config.bak
 tfc c:\config.sys  c:\backup    |  c:\config.sys     | c:\backup  (see Note)
                                 |                    | c:\backup\config.sys
 tfc c:\config.sys  *.old        |  c:\config.sys     | c:\config.old
 tfc c:\config.sys  d:\aaa\*.old |  c:\config.sys     | d:\aaa\config.old
 tfc autoexec.bat   4start.*     |  autoexec.bat      | 4start.bat
 tfc "Letter to Diane"           |  "Letter to Diane" | "Letter to Rosie"
             "Letter to Rosie"   |                    |

Note: If c:\backup exists; if not, tfc tries c:\backup\config.sys instead.
------------------------------------------------------------------------------


Options:

-b: Batch mode. The two files are compared, a one-line-info is printed ("The
  file are identical" or "The files are not identical"), and tfc exits with
  one of the following error levels:
  0: files are identical
  1: files are not identical
  2: one of the files could not be found or opened
  3: out of memory (though I'm not sure if this will ever happen under Win32)
  This option is meant for using tfc in batch files, e.g. for synchronising
  directories or automatically checking if a file has changed before backing it
  up.

-c: Case insensitive compare. By default, tfc treats upper case and lower case
  characters as different. This option treats German umlauts correctly!

-d: Toggles highlighting of differing characters within a line on or off.
  Turning this on may slow down tfc a bit, and may make for a confusing display
  if lines are totally different, so that characters will only randomly match.

-e: Suppress empty lines. All lines that contain only whitespace
  characters (blanks, tabs) are ignored during compare and display.

-h: Toggles between hex and ASCII mode. The toggle affects the compare
  routines as well as the display routines. In hex mode, every line contains
  as many characters as can be displayed at this moment.
  Due to the fixed line length, resync is unlikely to work satisfactorily when
  characters were inserted or deleted in one file. Therefore this mode should
  be used when characters were merely changed.

-o: Toggles between OEM and ANSI character sets. OEM (or ASCII) is used by
  DOS-based programs, whereas Windows-based programs use ANSI.

-s: Sync scan +500 lines. If tfc finds two lines to be different, it assumes
  some lines were inserted in one of the files, and the matching line is some-
  where further down in the file. So by default it scans the next 100 lines
  to find it ("resync"). If you compare files of which you know that more than
  100 lines were inserted somewhere, you may want to use this option. However,
  this may slow down tfc considerably.

-w: Compress white space. All sequences of one or more whitespace characters
  are treated as one single blank character during compare and display. This
  makes it possible to compare two versions of a file where one version has
  tabs, and some editor changed those tabs to a series of blanks in the second
  version.




5. Interactive usage
--------------------

By default, tfc displays the two file side-by-side on a vertically split
screen. The colors are taken from tfc.ini, if it can be found in the
directory where tfc.exe lives; otherwise, tfc tries to read the colors
from ZTW.INI. If that also fails, default colors are used. There is a
color setup utility built into tfc (try pressing Alt-F10) that creates
tfc.ini.

The usual cursor keys can be used to navigate through the two files. They work
like in any other program, with one additional feature: If you scrolled the
display to the right, Pos1 does not jump to the beginning of the files, but
rather to the beginning of the line. If you press Pos1 again, it then jumps to
the beginning of the files.

'+' and '-' jump to the next and previous block of different lines,
respectively. If there is no such block, they jump to the end resp. beginning
of the files. The space bar functions identically to '+'.

's' toggles between horizontal and vertical splitting of the screen.

'l' (thats an ell) toggles line numbers on and off - for those of you who want
to see more of the files and are not interested in line numbers. For
compatibility with jfc, 'n' is also accepted.

't' toggles between 25 lines and x lines display, where x is either 50 (if tfc
was started in 25-lines-mode) or the number of lines of the active mode when
tfc was started (otherwise). Regardless of the state of this toggle, when
exiting tfc always switches back to the mode that was active when tfc was
started.

'1'...'9' sets the display width of tab characters. Note that this does NOT
have any impact on the compare operation, only on the display!

'c' toggles between case sensitive compare (the default) and case-insensitive
compare. The case-insensitive setting handles German umlauts correctly!

'o' toggles between OEM and ANSI character sets. OEM (or ASCII) is used by
DOS-based programs, whereas Windows-based programs use ANSI.

'w' toggles white space compression on and off. If on, all sequences of
whitespace characters (blanks, tabs) in the two files are replaced by one
single blank. This affects the compare operation as well as the display.

'e' toggles empty line suppression on and off. If on, all lines that contain
nothing but blanks and/or tabs are ignored.

F1 gives you access to the online help, although I feel tfc is so easy and
intuitive to use that the online help shouldn't be really necessary.

Alt-F10 invokes the color setup facility, see below.

ESC and ENTER both exit tfc.




5a. Color Setup
---------------

The color setup facility allows you to customize tfc's color scheme.
The colors are stored in a file named tfc.ini in the same directory as
tfc.exe (which may be different from the current directory!)

The color setup screen shows two sample files which contain elements of all
possible colors. Note that during 'real' usage you need to toggle 'Diff chars'
on to see the 'Differing chars in differing line' color.

To change a foreground color, use uppercase letters, e.g. Shift-f or Shift-i.
To change background colors, just use the indicated letters, e.g. 'f' or 'i'.
The meaning of 'f', 'i', and 'l' should be rather self-explanatory.
'm' and 'd' are for characters in lines that differ between the two files.
'r' restores a built-in default color scheme - in case you got totally
lost. 'k' deletes the file 'tfc.ini' from disk. If you called tfc from
within ZTree, tfc reverts back to ZTree's color scheme. Otherwise, tfc uses
its default scheme. By pressing ESC, all changes (except deleting tfc.ini)
will be discarded. ENTER on the other hand writes the current color scheme to
tfc.ini, regardless of how the color scheme was created (inherited by ZTree,
'R'estored, etc).
Note that if you want tfc to inherit ZTree's color scheme each time you use
it, you'll have to first 'k'ill tfc.ini, then press ESC - do NOT press ENTER,
as this would write a new tfc.ini, overriding ZTree's settings.




6. What does 'Tadzio' stand for?
--------------------------------

Tadzio is a nick name for 'Tadaeusz', a common Eastern European name. I used
it as a handle/nick ever since I bought my first modem. I even ran a BBS named
'Tadzio BBS' for several years.

Tadzio is one of the two main characters in Thomas Mann's novell "Tod in
Venedig" ("Death in Venice"). It's about a German doctor named "von
Aschenbach" who visits Venice in the early decades of this century. He sees
Tadzio, the 16-year-old son of a polish baroness, and is absolutely fascinated
of him. But society on the one hand and his moral education on the other make
it impossible for him to even talk to Tadzio, although the boy noticed him.
Von Aschenbach dies, superficially from the plague, but metaphorically from
the conflict between his feelings and his education, and the unability to live
by his feelings. That same conflict and the same feelings are also present in
Thomas Mann's life.

There also is an excellent film by Luchino Visconti. And now back to the
profanities of computer programs... :-)




7. Know bugs and problems
-------------------------

If a tab character is scrolled out of the left side of an window, the
remainder of that line jumps left to the window border. Fixing this would make
tfc much slower, so I hope you can live with it...




8. Future plans
---------------

That depends largely on the feedback I get from you. So, if you like it, or
if you have ideas for additional features, email me! I can be reached as
tadzio@innocent.com.

Sadly, as the feedback from the OS/2 version was less than overwhelming,
I do not plan to bring the current OS/2 version 1.0 to the same feature
level as the current Windows 95/NT version.



9. Getting the latest version
-----------------------------

The latest version will always be available together with Kim Henkel's
ZTreeWin from his web site, http://www.ztree.com.




10. Version history
------------------

1.0   9/2/1996   First public OS/2 version.
2.0   8/2/1997   First Windows 95/NT version, based on the old OS/2 code,
                 but many new features.
2.01  8/9/1997   - Bugfix: file names that contained special characters (um-
                   lauts etc) weren't treated correctly
                 - New Feature: ANSI/OEM toggle


11. Contacting the author
------------------------

If you have any comments, wishes, or encounter problems, please e-mail me.
My e-mail address is

       tadzio@innocent.com

Currently, there is no homepage for tfc, neither is there a newsgroup or a
Fido echo. The newest version will, however, be always available bundled with
Kim Henkel's ZTreeWin, available from http://www.ztree.com.

---
