home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 January / chipcd20010102.iso / software / utilities / ztreewin / ztw141.exe / TFC.TXT < prev    next >
Encoding:
Text File  |  1997-08-09  |  13.8 KB  |  343 lines

  1.  
  2.  
  3.                          Tadzio's File Compare
  4.                          =====================
  5.  
  6.                                Version 2.01
  7.  
  8.                         (c) 1997 Daniel Schroeder (tadzio@innocent.com)
  9.  
  10. 0. Contents
  11. -----------
  12.  
  13.  1. What is it?
  14.  2. It's free!
  15.  3. Legal stuff
  16.  4. Command line options
  17.  5. Interactive usage
  18.  6. What does 'Tadzio' stand for?
  19.  7. Known bugs and problems
  20.  8. Future plans
  21.  9. Getting the latest version
  22. 10. Version history
  23. 11. Contacting the author
  24.  
  25.  
  26.  
  27.  
  28. 1. What is it?
  29. --------------
  30.  
  31. Tadzio's File Compare (or tfc) is a small and fast side-by-side file compare
  32. utility for Windows 95 and NT. It takes two file names from the command line
  33. (or one file name and one directory, or some wildcards - see below) and
  34. displays them side-by-side in a character-mode window, highlighting differing
  35. lines. Tfc employs a sophisticated resync mechanism to find matching portions
  36. of the two files. It will allow you two scroll through the two files, modify
  37. comparison criteria like case sensitivity or ignoring empty lines, and jump
  38. directly to the next or previous difference.
  39.  
  40. You may use it, for example, to compare your CONFIG.SYS to CONFIG.BAK to find
  41. out what that install routine you just ran did to your CONFIG.SYS.
  42.  
  43. Tfc was modelled after "Jeff's file compare" which was included in later
  44. versions of XTree, but has an improved resync mechanism and a better user
  45. interface. It was designed to be used both as a stand-alone program and a
  46. plug-in for Kim Henkel's great XTree clone ZTreeWin (available at fine
  47. shareware sites; starting with version 1.30, ZTreeWin distribution archives
  48. include tfc).
  49.  
  50.  
  51.  
  52.  
  53. 2. It's free!
  54. -------------
  55.  
  56. Yeah, that's right - it will cost you nothing! If you like it and still feel
  57. you want to give someone some money, I'd be very happy if you'd make a
  58. donation to any organisation fighting AIDS.
  59.  
  60. Oh, and as I'm the curious type, I'd appreciate you sending an e-mail to
  61. tadzio@innocent.com (that's me :-)) if you use it regularly. Thanks!
  62.  
  63.  
  64.  
  65.  
  66. 3. Legal stuff
  67. --------------
  68.  
  69. Copyright:
  70.  
  71. Tfc is copyrighted material. That means you must not do things to tfc I didn't
  72. allow you. Especially, don't sell it (give it away for free instead), don't
  73. patch or disassemble it. Don't use it in military environment or in a company
  74. producing arms or weapons!
  75.  
  76. Warranty:
  77.  
  78. Basically, "you get what you pay for." So there's no warranty at all. I will
  79. not be liable for any damage, loss of profit or other consequences arising out
  80. of the use of Tadzio's File Compare utility.
  81. That said, I can assure you I did my best as a professional programmer to make
  82. tfc very safe. Both files to be compared are opened in read-only mode and
  83. closed again as soon as they are read into memory. Tfc never attempts to write
  84. to your hard disk (except for its configuration file, tfc.ini, and maybe
  85. triggering Window's memory swapping mechanism if you compare very large files),
  86. so it's highly unlikely that anything on your hard disk gets corrupted.
  87.  
  88.  
  89.  
  90.  
  91. 4. Command line options
  92. -----------------------
  93.  
  94.                  tfc [-options] file1 [file2]
  95.  
  96. [] denote optional parts.
  97.  
  98. file1: Any valid file name, with or without path. Long file names are
  99.   supported. If it contains blanks, surround it with double quotes.
  100.   You can not use wildcards ('*' and '?') here.
  101.  
  102. file2: Either a file name or a directory or nothing. If you do not specify
  103.   file2, tfc assumes the same name as file1, with the extension changed
  104.   to '.bak'.
  105.   If you specify a directory, tfc will append the name and extension portion
  106.   (omitting the drive and directory parts, if any) of file1 to it. You may
  107.   specify the directory with or without a trailing backslash.
  108.   You may replace the name and/or extension portion of file2 with an asterisk.
  109.   In that case, the corresponding part of file1 is used in place of that
  110.   wild card. The question mark wild card '?' is not supported.
  111.  
  112. Examples: this command line      |  compares file     |     to file
  113. -----------------------------------------------------------------------------
  114.  tfc c:\config.sys               |  c:\config.sys     | c:\config.bak
  115.  tfc c:\config.sys  c:\backup    |  c:\config.sys     | c:\backup  (see Note)
  116.                                  |                    | c:\backup\config.sys
  117.  tfc c:\config.sys  *.old        |  c:\config.sys     | c:\config.old
  118.  tfc c:\config.sys  d:\aaa\*.old |  c:\config.sys     | d:\aaa\config.old
  119.  tfc autoexec.bat   4start.*     |  autoexec.bat      | 4start.bat
  120.  tfc "Letter to Diane"           |  "Letter to Diane" | "Letter to Rosie"
  121.              "Letter to Rosie"   |                    |
  122.  
  123. Note: If c:\backup exists; if not, tfc tries c:\backup\config.sys instead.
  124. ------------------------------------------------------------------------------
  125.  
  126.  
  127. Options:
  128.  
  129. -b: Batch mode. The two files are compared, a one-line-info is printed ("The
  130.   file are identical" or "The files are not identical"), and tfc exits with
  131.   one of the following error levels:
  132.   0: files are identical
  133.   1: files are not identical
  134.   2: one of the files could not be found or opened
  135.   3: out of memory (though I'm not sure if this will ever happen under Win32)
  136.   This option is meant for using tfc in batch files, e.g. for synchronising
  137.   directories or automatically checking if a file has changed before backing it
  138.   up.
  139.  
  140. -c: Case insensitive compare. By default, tfc treats upper case and lower case
  141.   characters as different. This option treats German umlauts correctly!
  142.  
  143. -d: Toggles highlighting of differing characters within a line on or off.
  144.   Turning this on may slow down tfc a bit, and may make for a confusing display
  145.   if lines are totally different, so that characters will only randomly match.
  146.  
  147. -e: Suppress empty lines. All lines that contain only whitespace
  148.   characters (blanks, tabs) are ignored during compare and display.
  149.  
  150. -h: Toggles between hex and ASCII mode. The toggle affects the compare
  151.   routines as well as the display routines. In hex mode, every line contains
  152.   as many characters as can be displayed at this moment.
  153.   Due to the fixed line length, resync is unlikely to work satisfactorily when
  154.   characters were inserted or deleted in one file. Therefore this mode should
  155.   be used when characters were merely changed.
  156.  
  157. -o: Toggles between OEM and ANSI character sets. OEM (or ASCII) is used by
  158.   DOS-based programs, whereas Windows-based programs use ANSI.
  159.  
  160. -s: Sync scan +500 lines. If tfc finds two lines to be different, it assumes
  161.   some lines were inserted in one of the files, and the matching line is some-
  162.   where further down in the file. So by default it scans the next 100 lines
  163.   to find it ("resync"). If you compare files of which you know that more than
  164.   100 lines were inserted somewhere, you may want to use this option. However,
  165.   this may slow down tfc considerably.
  166.  
  167. -w: Compress white space. All sequences of one or more whitespace characters
  168.   are treated as one single blank character during compare and display. This
  169.   makes it possible to compare two versions of a file where one version has
  170.   tabs, and some editor changed those tabs to a series of blanks in the second
  171.   version.
  172.  
  173.  
  174.  
  175.  
  176. 5. Interactive usage
  177. --------------------
  178.  
  179. By default, tfc displays the two file side-by-side on a vertically split
  180. screen. The colors are taken from tfc.ini, if it can be found in the
  181. directory where tfc.exe lives; otherwise, tfc tries to read the colors
  182. from ZTW.INI. If that also fails, default colors are used. There is a
  183. color setup utility built into tfc (try pressing Alt-F10) that creates
  184. tfc.ini.
  185.  
  186. The usual cursor keys can be used to navigate through the two files. They work
  187. like in any other program, with one additional feature: If you scrolled the
  188. display to the right, Pos1 does not jump to the beginning of the files, but
  189. rather to the beginning of the line. If you press Pos1 again, it then jumps to
  190. the beginning of the files.
  191.  
  192. '+' and '-' jump to the next and previous block of different lines,
  193. respectively. If there is no such block, they jump to the end resp. beginning
  194. of the files. The space bar functions identically to '+'.
  195.  
  196. 's' toggles between horizontal and vertical splitting of the screen.
  197.  
  198. 'l' (thats an ell) toggles line numbers on and off - for those of you who want
  199. to see more of the files and are not interested in line numbers. For
  200. compatibility with jfc, 'n' is also accepted.
  201.  
  202. 't' toggles between 25 lines and x lines display, where x is either 50 (if tfc
  203. was started in 25-lines-mode) or the number of lines of the active mode when
  204. tfc was started (otherwise). Regardless of the state of this toggle, when
  205. exiting tfc always switches back to the mode that was active when tfc was
  206. started.
  207.  
  208. '1'...'9' sets the display width of tab characters. Note that this does NOT
  209. have any impact on the compare operation, only on the display!
  210.  
  211. 'c' toggles between case sensitive compare (the default) and case-insensitive
  212. compare. The case-insensitive setting handles German umlauts correctly!
  213.  
  214. 'o' toggles between OEM and ANSI character sets. OEM (or ASCII) is used by
  215. DOS-based programs, whereas Windows-based programs use ANSI.
  216.  
  217. 'w' toggles white space compression on and off. If on, all sequences of
  218. whitespace characters (blanks, tabs) in the two files are replaced by one
  219. single blank. This affects the compare operation as well as the display.
  220.  
  221. 'e' toggles empty line suppression on and off. If on, all lines that contain
  222. nothing but blanks and/or tabs are ignored.
  223.  
  224. F1 gives you access to the online help, although I feel tfc is so easy and
  225. intuitive to use that the online help shouldn't be really necessary.
  226.  
  227. Alt-F10 invokes the color setup facility, see below.
  228.  
  229. ESC and ENTER both exit tfc.
  230.  
  231.  
  232.  
  233.  
  234. 5a. Color Setup
  235. ---------------
  236.  
  237. The color setup facility allows you to customize tfc's color scheme.
  238. The colors are stored in a file named tfc.ini in the same directory as
  239. tfc.exe (which may be different from the current directory!)
  240.  
  241. The color setup screen shows two sample files which contain elements of all
  242. possible colors. Note that during 'real' usage you need to toggle 'Diff chars'
  243. on to see the 'Differing chars in differing line' color.
  244.  
  245. To change a foreground color, use uppercase letters, e.g. Shift-f or Shift-i.
  246. To change background colors, just use the indicated letters, e.g. 'f' or 'i'.
  247. The meaning of 'f', 'i', and 'l' should be rather self-explanatory.
  248. 'm' and 'd' are for characters in lines that differ between the two files.
  249. 'r' restores a built-in default color scheme - in case you got totally
  250. lost. 'k' deletes the file 'tfc.ini' from disk. If you called tfc from
  251. within ZTree, tfc reverts back to ZTree's color scheme. Otherwise, tfc uses
  252. its default scheme. By pressing ESC, all changes (except deleting tfc.ini)
  253. will be discarded. ENTER on the other hand writes the current color scheme to
  254. tfc.ini, regardless of how the color scheme was created (inherited by ZTree,
  255. 'R'estored, etc).
  256. Note that if you want tfc to inherit ZTree's color scheme each time you use
  257. it, you'll have to first 'k'ill tfc.ini, then press ESC - do NOT press ENTER,
  258. as this would write a new tfc.ini, overriding ZTree's settings.
  259.  
  260.  
  261.  
  262.  
  263. 6. What does 'Tadzio' stand for?
  264. --------------------------------
  265.  
  266. Tadzio is a nick name for 'Tadaeusz', a common Eastern European name. I used
  267. it as a handle/nick ever since I bought my first modem. I even ran a BBS named
  268. 'Tadzio BBS' for several years.
  269.  
  270. Tadzio is one of the two main characters in Thomas Mann's novell "Tod in
  271. Venedig" ("Death in Venice"). It's about a German doctor named "von
  272. Aschenbach" who visits Venice in the early decades of this century. He sees
  273. Tadzio, the 16-year-old son of a polish baroness, and is absolutely fascinated
  274. of him. But society on the one hand and his moral education on the other make
  275. it impossible for him to even talk to Tadzio, although the boy noticed him.
  276. Von Aschenbach dies, superficially from the plague, but metaphorically from
  277. the conflict between his feelings and his education, and the unability to live
  278. by his feelings. That same conflict and the same feelings are also present in
  279. Thomas Mann's life.
  280.  
  281. There also is an excellent film by Luchino Visconti. And now back to the
  282. profanities of computer programs... :-)
  283.  
  284.  
  285.  
  286.  
  287. 7. Know bugs and problems
  288. -------------------------
  289.  
  290. If a tab character is scrolled out of the left side of an window, the
  291. remainder of that line jumps left to the window border. Fixing this would make
  292. tfc much slower, so I hope you can live with it...
  293.  
  294.  
  295.  
  296.  
  297. 8. Future plans
  298. ---------------
  299.  
  300. That depends largely on the feedback I get from you. So, if you like it, or
  301. if you have ideas for additional features, email me! I can be reached as
  302. tadzio@innocent.com.
  303.  
  304. Sadly, as the feedback from the OS/2 version was less than overwhelming,
  305. I do not plan to bring the current OS/2 version 1.0 to the same feature
  306. level as the current Windows 95/NT version.
  307.  
  308.  
  309.  
  310. 9. Getting the latest version
  311. -----------------------------
  312.  
  313. The latest version will always be available together with Kim Henkel's
  314. ZTreeWin from his web site, http://www.ztree.com.
  315.  
  316.  
  317.  
  318.  
  319. 10. Version history
  320. ------------------
  321.  
  322. 1.0   9/2/1996   First public OS/2 version.
  323. 2.0   8/2/1997   First Windows 95/NT version, based on the old OS/2 code,
  324.                  but many new features.
  325. 2.01  8/9/1997   - Bugfix: file names that contained special characters (um-
  326.                    lauts etc) weren't treated correctly
  327.                  - New Feature: ANSI/OEM toggle
  328.  
  329.  
  330. 11. Contacting the author
  331. ------------------------
  332.  
  333. If you have any comments, wishes, or encounter problems, please e-mail me.
  334. My e-mail address is
  335.  
  336.        tadzio@innocent.com
  337.  
  338. Currently, there is no homepage for tfc, neither is there a newsgroup or a
  339. Fido echo. The newest version will, however, be always available bundled with
  340. Kim Henkel's ZTreeWin, available from http://www.ztree.com.
  341.  
  342. ---
  343.