home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / editors / tde150.arj / READ_ME.TDE < prev    next >
Text File  |  1992-04-01  |  18KB  |  371 lines

  1.  
  2.                      tde, the Thomson-Davis Editor
  3.                               Version 1.5
  4.                              April 1, 1992
  5.                               Frank Davis
  6.  
  7.  
  8. Author:
  9.  
  10.                program name:    tde, the Thomson-Davis Editor
  11.                                 version 1.5
  12.  
  13.                author:          Frank Davis
  14.                                 fmd@tifton.bitnet
  15.  
  16.                home address:    102 Starr Street
  17.                                 Tifton, Georgia  31794
  18.                                 USA
  19.  
  20.                work address:    U.S. Dept. of Agriculture
  21.                                 P.O. Box 946
  22.                                 Tifton, Georgia  31793
  23.                                 USA
  24.  
  25.  
  26. Based on an editor by:          Douglas Thomson
  27.                                 c/- Computing
  28.                                 M.U.C.G.
  29.                                 Switchback Road
  30.                                 Churchill
  31.                                 Victoria   3842
  32.                                 AUSTRALIA
  33.                                 doug@giaeb.cc.monash.edu.au
  34.  
  35.                                 Doug's old e-mail address was doug@giaea.oz
  36.  
  37.  
  38. Contributions by:
  39.  
  40.    Tom Waters, twaters@nswc-wo.navy.mil
  41.  
  42.  
  43.  
  44. File descriptions:
  45.  
  46.    TDE.EXE       tde executable for IBM PC or compatible
  47.    TDE.DOC       tde user's manual
  48.  
  49.    TDECFG.EXE    utility to customize color and keys in tde.exe
  50.    TDECFG.DOC    tdecfg user's manual
  51.    SAMPLE.HLP    sample file for redefining help screen
  52.  
  53.    READ_ME.TDE   this file (you're reading it now)
  54.  
  55.  
  56.       All source for tde editor, not needed unless you want to modify tde.
  57.  
  58.    INT24.ASM     critical error replacement - interrupt 24
  59.    SIMUL101.ASM  utility to simulate 101 scan codes on 83/84 key keyboards
  60.    BLOCK.C       line, stream, and box block functions
  61.    CRITER.C      critical error prompt and info
  62.    DIRLIST.C     directory list functions
  63.    ED.C          basic editor functions
  64.    FINDREP.C     Boyer-Moore search routines
  65.    HWIND.C       initialization and display routines
  66.    MAIN.C        main function and hardware routines
  67.    TDEASM.C      pointer/string/display assembly routines
  68.    UTILS.C       misc. editor functions
  69.    WINDOW.C      window routines
  70.    WORDWRAP.C    word wrap functions
  71.    COMMON.H      external global variable declarations
  72.    CRITER.H      critical error info
  73.    DEFAULT.H     default function key assignments
  74.    DEFINE.H      editor function defs
  75.    GLOBAL.H      initial global variable declarations and editor function array
  76.    HELP.H        intro and help screen
  77.    TDEFUNC.H     prototypes for all functions
  78.    TDESTR.H      defs for all structures and defines
  79.    TDE.NMK       MSC 6.0a make (nmake) file
  80.    TDE.QMK       QuickC 2.5 make (nmake) file
  81.  
  82.  
  83.   All source for configuration utility, not needed unless you want to modify.
  84.  
  85.    TDECFG.C      main programs for configuration
  86.    CFGCOLOR.C    color utility routines
  87.    CFGHELP.C     redefine the help screen
  88.    CFGKEYS.C     key redefinition routines
  89.    CFGMACRO.C    save macro file in tde.exe
  90.    CFGMODES.C    default editor routines
  91.    TDECFG.H      global structures and prototypes for tdecfg
  92.    CFGCOLOR.H    defines for color utility
  93.    CFGHELP.H     defines for rewriting help screen
  94.    CFGKEYS.H     structures for all available keys and functions
  95.    CFGMACRO.H    defines for macro screen
  96.    CFGMODES.H    structures for default editor modes
  97.    TDECFG.NMK    MSC 6.0a make (nmake) file
  98.    TDECFG.QMK    QuickC 2.5 make (nmake) file
  99.  
  100.  
  101. Disclaimer:
  102.  
  103.   This program is provided "as is" without warranty of any kind, either
  104. expressed or implied, including, but not limited to the fitness for a
  105. particular purpose.  You assume all risk for the use, inability to use,
  106. misuse, or abuse of this program.  In any event, you (and not Frank Davis)
  107. assume the entire cost of loss of use; loss of information; loss of
  108. savings; loss of business profits, business interruption; mental anguish,
  109. mental distress; all direct, consequential, or incidental damages or
  110. losses; all necessary servicing, repair, or correction; and all physical
  111. and mental health problems, acute or chronic, caused by direct or indirect
  112. use of this program by you or any of your relatives, friends, acquain-
  113. tances, co-workers, or otherwise fellow man either known or unknown by
  114. you.
  115.  
  116.   Your use of this software constitutes agreement with and notice of
  117. acknowledgement of the above heretofore stated warranty and limitations.
  118. In addition with your agreement, you henceforth and forever relinquish,
  119. waive, and forfeit all claims, rights, rulings, or judgements against the
  120. forementioned author of said software; however, you retain the right to
  121. keep your first born.  If you decide that it is in your best interest to
  122. waive your right to your first born child, the author is in no way
  123. obligated to accept or support the offspring regardless of age, marital
  124. or employment status of said offspring.
  125.  
  126.  
  127. Claimer:
  128.  
  129.   I use this program all-day-every-day on all of my FORTRAN, C, and
  130. assembly source code at home and at work, Frank Davis.
  131.  
  132.  
  133. Licensing:
  134.  
  135.   This program is released into the public domain.  You may use and
  136. distribute it freely.  There is no copyright, no fee for use, no
  137. licensing, no registration, no legal bull, no nothing.  This editor is not
  138. user supported, corporate sponsored, or government subsidized - it is
  139. sustained and maintained solely by Frank Davis.  This editor was written
  140. for use not only as a simple text editor but also as a learning tool.
  141. Examine the code and discover the basics of editor construction.
  142. Experiment a little and add your favorite functions or modify the existing
  143. functions to suit your needs/requirements/tastes/etc.  If anyone includes
  144. tde with their own software, please use common courtesy and give Douglas
  145. Thomson and Frank Davis credit for their work (that's the only payment I
  146. ask).  If you release any changes or additions to the tde editor, please
  147. observe the original spirit of Douglas Thomson's dte 5.1 and release the
  148. changes as public domain software.
  149.  
  150.  
  151. Distribution Sites:
  152.  
  153.   You will always be able to find the latest version of tde in the
  154. SIMTEL20 archives in the PD1:<MSDOS.EDITOR> directory or in Library 16 of
  155. the Utilforum in PC MagNet on CompuServe (search for TDE as the keyword).
  156. I do not upload tde to any other file archive.
  157.  
  158.                     Standard SIMTEL20 download Info
  159.  
  160. "SIMTEL20 files are also available from mirror sites OAK.Oakland.Edu
  161. (141.210.10.117), wuarchive.wustl.edu (128.252.135.4), ftp.uu.net
  162. (137.39.1.9), nic.funet.fi (128.214.6.100), src.doc.ic.ac.uk (146.169.3.7)
  163. or rana.cc.deakin.oz.au (128.184.1.4), or by e-mail through the
  164. BITNET/EARN file servers.
  165.  
  166. If you cannot access the archive sites via FTP or e-mail, most SIMTEL20
  167. MSDOS files, including the PC-Blue collection, are also available for
  168. downloading from Detroit Download Central (313) 885-3956.  DDC has
  169. multiple lines which support 300/1200/2400/9600/14400 bps (103/212/
  170. V22bis/HST/V32bis/V42bis/MNP).  This is a subscription system with an
  171. average hourly cost of 17 cents.  It is also accessible on Telenet via
  172. PC Pursuit and on Tymnet via StarLink outdial.  New files uploaded to
  173. SIMTEL20 are usually available on DDC within 24 hours."
  174.  
  175.  
  176.  
  177. Background:
  178.  
  179.   At work, I have written several editors that may only be used for a
  180. certain type of file (almost an expert system).  I have always wanted to
  181. write a general purpose public domain text editor.  It seems none of the
  182. existing public domain or shareware editors have all of the features I
  183. like.  Since I'm so stupid, the editor should be really easy to use.
  184. My wish list of features are:
  185.  
  186.    Blocks:
  187.       Line, stream, and box blocks.
  188.       Move, delete, copy, kopy, overlay, fill, print, and number block options.
  189.       Block actions within or between files.
  190.  
  191.    Files:
  192.       Multiple files limited only by memory.
  193.  
  194.    Windows:
  195.       Multiple windows limited only by memory.
  196.       Split screen horizontally and vertically
  197.       Changes to text in one window are updated in all windows of same file.
  198.       Interactively resize windows.
  199.       Two windows of same size so two files can be easily compared.
  200.  
  201.    Search/Replace:
  202.       Ignore or Match case of pattern.
  203.       Prompt or no prompt replace.
  204.       Boyer-Moore pattern matching algorithm.
  205.  
  206.    User Configuration:
  207.       Ability to assign any editor function to any recognized function key.
  208.       Redefine color attributes in all editor fields.
  209.       Change default editor settings.
  210.       Macro recording and playback.
  211.  
  212.    Other:
  213.       Split/join line.
  214.       Lines as long a 255 characters.
  215.       Paren balance.
  216.       Mode/information line.
  217.       Cursor sync.
  218.       Directory list
  219.       Ruler with a cursor pointer
  220.  
  221.  
  222. Douglas Thomson's editor, dte 5.1:
  223.  
  224.   Well, I found a public domain editor that had most of the features on my
  225. wish list.  The original code was extremely well documented.  That editor
  226. was dte 5.1, written by Douglas Thomson, Gippsland, Victoria, Australia.
  227. So instead of writing an editor from scratch, I based my editor around
  228. Doug's well designed and documented program.   My editor was written using
  229. dte 5.1 as an outline.  Doug, thanks a lot for releasing the source code
  230. for your editor.
  231.  
  232.   dte 5.1 is pretty much machine independent.  It runs on PC's, HP 3000's,
  233. and generic Unix system V release 2 systems.  It was designed to work well
  234. over slow communication lines, eg 1200 baud.  Screen updates are kept to a
  235. minimum which saves time and money when using dial-up phone lines.  dte
  236. 5.1 uses the WordStar/Turbo x style key definitions.  If you need an
  237. editor for use over slow communication terminals, check out Doug's editor.
  238.  
  239.  
  240. tde, the Thomson-Davis Editor:
  241.  
  242.   My dream editor was to be written specifically for PC's.  At work, we
  243. have an IBM mainframe.  The only reason I use the mainframe is for e-mail
  244. and for backup of my PC files (I have exaggerated a little).  I use my PC
  245. editors to compose my mail then upload to the mainframe to send it.  So, I
  246. really don't need or desire a machine independent editor.  Although I have
  247. IBM OS/2 1.3 on my machine at work, I don't use OS/2 enough to justify
  248. writing a bound version.  To make a program run under both IBM/MS DOS and
  249. OS/2, you have to bind it and refrain from doing neat BIOS and hardware
  250. tricks.
  251.  
  252.   Another of my design considerations was the machine-compiler-memory
  253. model factor.  At work I use a 16 Mhz 386 machine with Microsoft C 6.0a
  254. and at home I use a 8 Mhz 286 machine with Microsoft QuickC 2.51 w/
  255. QuickAssembler.  I wanted the editor to work fast on the slow machine, so
  256. I wrote some of the often used string functions in assembly.  To edit
  257. files larger than 64k, you just about have to use the huge memory model;
  258. however, QuickC cannot debug programs compiled with the huge option.
  259. Additionally, programs compiled using the huge model run a lot slower
  260. because of all the compiler generated pointer arithmetic.  I wrote some
  261. functions in assembly that allow my editor to be compiled with either the
  262. small, compact, medium, or large memory model.  Now, I can run and debug
  263. the program at work or at home.  All of those assembly routines that
  264. support huge pointer arithmetic are original.  If you're into assembly,
  265. check out the tdeasm.c module for some good assembly tips on manually
  266. manipulating far pointers.
  267.  
  268.   I also wanted the ability to edit the files produced by our water
  269. quality model at the USDA.  Null characters, or '\0', are allowed as part
  270. of the normal text in those files.  Since DOS uses ^Z to mark the end of
  271. files (in text mode), I decided to use ^Z to mark the end of strings.  Any
  272. character, except ^Z, is allowed in the text file. Conse-damn-quently, the
  273. standard C string library functions will not work when doing operations on
  274. text in the file (can't rely on library functions to handle '\0'
  275. properly).  The assembly language routines in tdeasm.c take care of the ^Z
  276. terminated strings.
  277.  
  278.   I modified almost all of the algorithms in the original dte 5.1 editor
  279. and added several more.  The block and find/replace algorithms are
  280. completely rewritten.  Block operations now use line, box, and stream
  281. blocks.  Available block operations include move, delete, copy, kopy,
  282. fill, overlay, block expand tabs, block print, block write to file, block
  283. upper case, block lower case, block strip hi bit, trim block, and number
  284. box block (some of these functions were available for stream blocks in the
  285. original dte 5.1).  Block operations are allowed within or between files.
  286. The "brute force" text find algorithm was replaced by the Boyer-Moore
  287. string matching algorithm, a very fast text search algorithm.  The text
  288. display algorithms were rewritten.  Window operations were rewritten,
  289. enhanced, and streamlined.  Windows may now be split vertically as well as
  290. horizontally.  Support for lines as long as 255 characters was added.
  291. Horizontal scrolling/paging are allowed.   A mode/information lite bar was
  292. added to display the various modes at the bottom of the screen.  Displayed
  293. in the lite bar are:  number of open files and total number of windows,
  294. available memory for editing the current file or additional files, and the
  295. editor mode flags.  Displayed with the file name are:  file attributes,
  296. the total number of lines in the file (size), and the current line number
  297. and column number of the cursor.  The join line, split line, and dup line
  298. functions were added.  Any ASCII or Extended ASCII character, except
  299. control Z, can be entered into the text file by using the ALT-xxx method.
  300. Several often used string routines were rewritten in assembly and
  301. optimized for 16 bit processors, which makes cursor movement very fast
  302. through any size file.  One function that I sorely missed, a simple
  303. undelete function, was added.  A few simple word processing functions were
  304. also added:  word wrap, paragraph format, and left, right, and center
  305. justify functions.  Also added was a cursor sync function.  After using
  306. the sync function for a day, it became apparent that a hilited cursor line
  307. was needed to keep track of cursor positions in all windows.  A directory
  308. function was added so users may search directories for files to load.
  309. Another useful feature, a key stroke record and playback (simple macros),
  310. was added to make simple, repititive, editing tasks easier.  A critical
  311. error handler was added to give the user more info on hardware faults.  To
  312. help users construct formatted data or formatted source code (FORTRAN)
  313. files, a ruler line with a column pointer was added.  A configuration
  314. utility was written to allow the user to customize all colors and the
  315. 230 recognized function keys with no restrictions.  For users who work
  316. with alphabets that contain special accent characters, any ASCII or
  317. Extended ASCII character may be assigned to unused function keys by
  318. permanently storing a macro definition file in tde.exe.  And last, an
  319. instant help screen with key definitions was added.
  320.  
  321.  
  322. Programming Notes:
  323.  
  324.   This program makes extensive use of multi-segment pointers.  The
  325. assembly routines in tdeasm.c were written to avoid a LOT of pointer
  326. arithmetic generated by the compiler.  If you do decide to modify tde,
  327. keep in mind that you are responsible for pointer integrity.  That is,
  328. functions that use pointers to access text forwards through the file need
  329. to check those pointers to make sure they don't "wrap" around a segment.
  330. Same goes for accessing text backwards through the file.  The functions
  331. responsible for pointer integrity are cpf (check pointer forwards) and cpb
  332. (check pointer backwards).  Also, you can't reliably add large numbers to
  333. pointers in the compact and large memory model.  The small, compact,
  334. medium, and large memory models were not designed for use with
  335. multisegment or huge pointers (you may always explicitly declare and use
  336. huge pointers in those models, though).  Use the function addltop (add
  337. long to pointer) to handle adding large numbers to pointers.
  338.  
  339.   The 101 key keyboard simulation utility requires an assembler to produce
  340. object code.  If you don't have access to an assembler, you may comment
  341. out the calls to function simulate_enh_kbd( ) in main.c.  tde will still
  342. take advantage of the 101 enhanced keyboard, but will not be able to use
  343. the simulated 101 keys on older 83/84 keyboard systems.
  344.  
  345.   Several functions in tde return an integer value that indicates whether
  346. or not an ERROR occured.  The variable name most often used to return the
  347. result is "rc".  For non-IBM mainframers, rc == return code.
  348.  
  349.  
  350. Bug reports:
  351.  
  352.   There are no bugs in tde, only features that may inconvenience you. ;*)
  353. Please send inconvenience reports via e-mail, if at all possible, to
  354. fmd@tifton.bitnet.  For y'all over there on CompuServe, my e-mail address
  355. is ">INTERNET:FMD%TIFTON.BITNET@CUNYVM.CUNY.EDU" (don't type the quotes,
  356. just everything between them).  I'll try to respond as quickly as possible
  357. to reports received via e-mail.
  358.  
  359.  
  360. About the author of tde, Frank Davis:
  361.  
  362.   Frank "yank" Davis, who has an impressive collection of inflatable bed
  363. bunnies, graduated near the bottom of his class in 1983 from Georgia Tech
  364. with a BS in Information and Computer Science.  He can be found drinking
  365. massive quantities of beer in his underwear (boxer shorts) on his couch
  366. while watching college football and Atlanta Braves baseball on his 19 inch
  367. color TV.  Hobbies include:  sex, drugs, and rock 'n' roll.
  368.  
  369.   This program is another quality product from Yank Software, "Software
  370. you just can't beat."
  371.