home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 6 File
/
06-File.zip
/
tfc100.zip
/
tfc.doc
< prev
next >
Wrap
Text File
|
1996-09-02
|
11KB
|
286 lines
Tadzio's File Compare
=====================
Version 1.0
(c) 1996 Daniel Schroeder
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 OS/2. 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 VIO window, indicating 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 comparision 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 the 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 both as a stand-alone program and a plug-in for Kim
Henkel's great XTree clone ZTree Bold (available at fine OS/2 shareware sites;
starting with V1.64, ZTree 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 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
daniel@camelot.de (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 triggering OS/2's memory swapping mechanism if
you compare vely 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, c:\backup\config.sys is used 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 codes:
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 OS/2)
This option is meant for using tfc in batch files, e.g. for synchronising
directories or automatic 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!
-e: Suppress empty lines. All lines that contain only whitespace
characters (blanks, tabs) are ignored during compare and display.
-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.
-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.
5. Interactive usage
--------------------
By default, tfc displays the two file side-by-side on a vertically split
screen. The colors are taken from ZTBOLD.INI, if it can be found in the
directory where tfc.exe lives; otherwise, default colors are used.
The usual cursor keys can be used to navigate through the two files. They work
as 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. For
compatibility with jfc, 'h' is also accepted.
'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. Again, 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!
'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.
ESC and ENTER both exit tfc.
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
---------------
If enough people use tfc (e-mail me!), I'll add a color-setup mechanism.
Currently tfc reads its color settings from ZTBOLD.INI, so if you want to
change colors, get a copy of ZTree, customize the color settings and copy
ZTBOLD.INI to the directory where tfc lives.
9. Getting the latest version
-----------------------------
The latest version will always be available at LEO (http://www.leo.org)
10. Version history
------------------
1.0 9/2/1996 First public version.
11. Contacting the author
------------------------
If you have any comments, wishes, or encounter problems, please e-mail me.I'm
going to move in October, so there's no surface mail address. However, my
e-mail address is NOT going to change the next few years. Send your mails to
daniel@camelot.de
There is no homepage for tfc, neither is there a newsgroup or a Fido echo, and
I don't think this will be necessary.
---