home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / tfc100.zip / tfc.doc < prev    next >
Text File  |  1996-09-02  |  11KB  |  286 lines

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