home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / ztb180.zip / TFC.TXT < prev    next >
Text File  |  1999-03-09  |  13KB  |  325 lines

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