home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_100 / 179_01 / tvx_refb.doc < prev    next >
Text File  |  1986-01-27  |  34KB  |  1,125 lines

  1.  
  2.  
  3. TVX Reference Manual                                          11/27/85
  4.  
  5.  
  6. the mistake, all the edit commands before the last '^B' as well as the
  7. '^B' should be removed from the log file before  applying  it  to  the
  8. previous  version  since '^B' created a backup copy of the file.  This
  9. means that all the editing  commands  entered  before  the  '^B'  will
  10. already  be  saved,  and thus should not be restored.  Failure to take
  11. this into account will result in a randomly edited file!!! 
  12.  
  13.      The other case involves the '^Y' yank external file command.  The
  14. external file read as a part of the '^Y' command  is  read  using  the
  15. same I/O channel as the backup log file input, and thus both cannot be
  16. used  at  the  same  time.   If  the backup log file contains any '^Y'
  17. commands (displayed in the log file as '@Y'), you  must  remove  them.
  18. Obviously,  this will alter the order of the commands in the file, and
  19. you will need to use a special procedure.  Suppose, for example,  that
  20. the  backup  log  file contained one '^Y' command.  Make two copies of
  21. the backup  log  file.   Edit  the  first,  and  remove  all  commands
  22. following the '^Y' command, including the '^Y' command.  Then edit the
  23. other  copy,  and  remove  all commands before the '^Y', including the
  24. '^Y'.  Then, edit the backup copy of the original file.  First,  apply
  25. the  first  backup  log  file.   This  will get you to the point right
  26. before the '^Y'.  Then without changing the cursor position,  manually
  27. enter  the '^Y' command and file name.  Finally, apply the second copy
  28. of the backup log file. 
  29.  
  30.      It is also possible to write log command files  of  your  own  to
  31. carry  out  specific  commands.   This allows the creation of "macros"
  32. that can be executed as needed.  When creating log files of your  own,
  33. you should remember that control characters and backspaces must appear
  34. as  encoded  characters.   The '@' is the encoding character.  Control
  35. characters will appear as '@' followed by the appropriate letter: '^I'
  36. = '@I', enter = '@M', etc.  An '@' itself is '@@',  and  backspace  is
  37. '@H',  although  you  should  never need a backspace in your own files
  38. (use -K). 
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                  -18-                                 
  65.  
  66.  
  67.  
  68.  
  69. TVX Reference Manual                                          11/27/85
  70.  
  71.  
  72.                   *** USER CUSTOMIZATION of TVX ***
  73.  
  74.      A program called TVCONFIG is also provided with most versions  of
  75. TVX.   It  allows you to customize TVX to a great extent.  The program
  76. generates a file called  CONFIG.TVX.   When  TVX  is  started  with  a
  77. command  line  of  the  form: 'TVX filename -c=config.tvx", the values
  78. defined in CONFIG.TVX will be used instead of the defaults.  (Warning:
  79. TVCONFIG is may not be implemented for all systems.  Specifically, the
  80. default Unix distribution does not provide TVCONFIG capabilities.)
  81.  
  82.      TVCONFIG is mostly self explanatory.  It allows you to change the
  83. following:
  84.  
  85. 1. Commands.  All of the approximately 50 commands can  be  redefined.
  86. There are some restrictions: all commands must be a single letter, and
  87. case  is  ignored.   The  '@',  ESCAPE,  and  '<>'  commands cannot be
  88. changed.  Commands cannot be a number, including a '-'. 
  89.  
  90. 2. Synonyms.  You may define some synonyms, such as space  for  right,
  91. or   RETURN   for  down.   You  cannot  duplicate  previously  defined
  92. commands. 
  93.  
  94. 3. Function Keys.  Up to  50  function  keys  may  be  defined  to  be
  95. equivalent  to  any command (in fact any letter or character).  When a
  96. function key is pressed, TVX will translate it to  the  character  you
  97. specify.   If  your function keys use an ESCAPE as a prefix character,
  98. you will have to redefine a function key to be ESCAPE! 
  99.  
  100. 4. Parameters.  You  may  change  the  default  for  any  of  the  ':'
  101. parameters. 
  102.  
  103.      After you  have  built  a suitable working version of CONFIG.TVX,
  104. another program called TVPATCH has been provided (for  MS-DOS  systems
  105. only) to allow TVX.EXE (or TVX.COM) to be permanently patched with the
  106. options  set by TVCONFIG.  This means you won't have keep track of the
  107. CONFIG.TVX file any more, and won't need the '-c' switch. 
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                                  -19-                                 
  131.  
  132.  
  133.  
  134.  
  135. TVX Reference Manual                                          11/27/85
  136.  
  137.  
  138.                         *** Error Messages ***
  139.  
  140. *** Abort, are you sure? 
  141.      This message is displayed after  the  "abort"  command  has  been
  142. entered.  A reply of y or Y will cause the session to be terminated. 
  143.  
  144. *** Bad O= switch
  145.      An incorrect format was specified for the O= switch. 
  146.  
  147. *** Bad @ name
  148.      An invalid file name was specified.  Re-enter. 
  149.  
  150. *** Bad command: x
  151.      The command is not a valid TVX command. 
  152.  
  153. *** Bad file name
  154.      An invalid file name was specified.  Re-enter. 
  155.  
  156. *** Bad output file: filename
  157.      An invalid output file was specified. 
  158.  
  159. *** Bad par (val | name)
  160.      An invalid value or parameter name was specified. 
  161.  
  162. *** Bad switch
  163.      An invalid   switch   was  specified.   Re-enter  file  name  and
  164. switches. 
  165.  
  166. *** buffer empty
  167.      Information message.   Displayed  after  a  new  file  has   been
  168. created,  or  when  the  write buffer command is executed and the text
  169. buffer is empty. 
  170.  
  171. *** Can't create new name
  172.      TVX was unable to create a new name for the  output  file.   Free
  173. some disk space, rename the file, try again. 
  174.  
  175. *** Can't insert that
  176.      There are three values that TVX uses internally, and thus are not
  177. valid as user inserted characters in the text buffer. 
  178.  
  179. *** Compacting buffer
  180.      Information message.    Displayed  when  TVX  is  compacting  the
  181. buffer.  The compaction process may take several seconds. 
  182.  
  183. *** Compacting done
  184.      Information.  The compaction is complete. 
  185.  
  186. *** Compactor lost: quit now! 
  187.      An internal error has been discovered.  Exit TVX immediately, and
  188. preserve the backup copy.  Try the session again. 
  189.  
  190. *** Create?  (y/n)
  191.      The file name specified does not exist.  A y  answer  will  cause
  192. the  file  to  be  created.  A n answer will allow the file name to be
  193. respecified. 
  194.  
  195.  
  196.                                  -20-                                 
  197.  
  198.  
  199.  
  200.  
  201. TVX Reference Manual                                          11/27/85
  202.  
  203.  
  204. *** Error reopening
  205.      Something has gone  wrong  with  the  'File  beginning'  command.
  206. Exit,  and try editing the file again.  Be careful since an empty file
  207. may have been created. 
  208.  
  209. *** File only part read
  210.      There was not enough room in the save buffer to hold  the  entire
  211. external  file specified in the 'merge' command.  Try re-editing using
  212. the 's' big buffer switch. 
  213.  
  214. *** lines filled
  215.      TVX has run out of room  to  add  more  lines.   Use  the  'write
  216. buffer' or 'file beginning' command to get more space for new lines. 
  217.  
  218. *** no get room
  219.      There is  not  enough  room  in the text buffer to insert all the
  220. text in the save buffer.  Use  the  'file  begin'  or  'write  buffer'
  221. commands, and try again.  The '-^W' command is often useful. 
  222.  
  223. *** no more lines for insert
  224.      See "lines filled". 
  225.  
  226. *** no nesting
  227.      TVX does not allow nested repeat loops: "<<..>>". 
  228.  
  229. *** no save room
  230.      There is  not  enough room left to save any more text in the save
  231. buffer.  Try saving smaller blocks, or use the 'file begin' command to
  232. get more space. 
  233.  
  234. *** No!  buffer empty
  235.      Many TVX commands are not allowed on an empty buffer.  Sometimes,
  236. just inserting a blank line will  allow  the  desired  command  to  be
  237. used. 
  238.  
  239. *** No: read only
  240.      'File beginning'  command  invalid  when the 'r' read only switch
  241. was used. 
  242.  
  243. *** not found
  244.      The current find pattern was not found. 
  245.  
  246. *** Not last line! 
  247.      TVX will allow you to save the last line of the file only once. 
  248.  
  249. *** reading file... 
  250.      Displayed while TVX is reading in the file. 
  251.  
  252. *** rename fails
  253.      Something has gone wrong with  the  'File  beginning'  or  'quit'
  254. commands.   On timeshared systems, this may mean you didn't have write
  255. capability for the file.  The work file will probably be retained, and
  256. can be manually renamed or  copied  using  standard  operating  system
  257. commands. 
  258.  
  259. *** search fails
  260.  
  261.  
  262.                                  -21-                                 
  263.  
  264.  
  265.  
  266.  
  267. TVX Reference Manual                                          11/27/85
  268.  
  269.  
  270.      A cross-buffer search has failed to find pattern. 
  271.  
  272. *** writing buffer
  273.      Displayed when the buffer is being written out. 
  274.  
  275. *** writing partial buffer
  276.      Partial buffer only, as caused by the '-^W' command. 
  277.  
  278. *** Yank filename:
  279.      Enter the  name  of  the  file  you  want  to  read into the save
  280. buffer. 
  281.  
  282. *** 100 chars only
  283.      At most, 100 characters are allowed in each find pattern and each
  284. repeat loop. 
  285.  
  286. *** <> not complete
  287.      The repeat loop has terminated before the specified number  times
  288. have  been  executed.   This  is  usually  what you wanted, and can be
  289. caused by failing to find a  pattern,  or  reaching  the  end  of  the
  290. buffer.   An  invalid  command or other error will also cause a repeat
  291. loop to terminate. 
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                                  -22-                                 
  329.  
  330.  
  331.  
  332.  
  333. TVX Reference Manual                                          11/27/85
  334.  
  335.  
  336.                            *** TTY MODE ***
  337.  
  338.      Normally, TVX is used as a full screen editor.  It will  work  on
  339. dumb  crt terminals or on hard copy terminals, however.  The alternate
  340. mode of operation is called tty mode.  Tty mode  is  also  useful  for
  341. terminals hooked up with slow baud rates.  Almost all TVX commands are
  342. supported  in  tty  mode.   The  main difference is that the editor no
  343. longer operates in a what you see is what you get mode. 
  344.  
  345.      When TVX is first started in tty mode (either by the  -t  command
  346. line  switch,  or  using  1:t),  it will display a 'tvx>' prompt.  The
  347. normal mnemonic commands are then entered  on  the  input  line.   The
  348. input  line  is  terminated  by  a  <return>  (which  is not sent as a
  349. command).  Each letter on the input line will be interpreted as a  TVX
  350. command.   Thus, entering a line: 'dddr' would move the cursor 3 lines
  351. down and one character right.  The result of the commands will not  be
  352. displayed however. 
  353.  
  354.      The 'V'  verify  command  operates specially for tty mode, and is
  355. used to type out lines of the file.  The normal procedure, then is  to
  356. enter  commands  on the command input line, then enter appropriate 'V'
  357. commands to display relevant lines of the buffer. 
  358.  
  359.      As long as normal TVX commands  are  entered,  the  command  line
  360. prompt  is  'tvx>', and the terminating <return> sends commands to TVX
  361. to execute.  In insert, find, and repeat, the prompt  will  change  to
  362. '+'.  All text entered, including <return>'s is entered into the text,
  363. the  find  pattern,  or  the  repeat  loop buffer.  An Escape ends the
  364. command, and an additional <return> sends the line to TVX. 
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.                                  -23-                                 
  395.  
  396.  
  397.  
  398.  
  399. TVX Reference Manual                                          11/27/85
  400.  
  401.  
  402.                      *** INSTALLATION OF TVX ***
  403.  
  404.      If you have the C source code of TVX, this section has some notes
  405. you should find useful if you recompile the code to customize TVX  for
  406. your system.  It should also be helpful if you are installing TVX on a
  407. new  system.   If  you  are  just  a  user,  then  you can ignore this
  408. section. 
  409.  
  410.  
  411. *** General Comments ***
  412.  
  413.      TVX has been designed  to  be  portable.   It  has  had  versions
  414. running  under  CP/M-80, MS-DOS, RT-11, RSX-11, VMS, and Unix BSD 4.2.
  415. The heart of TVX portability is the terminal  driver.   For  dedicated
  416. systems,  the control codes used by a specific terminal are hard wired
  417. into  a  C  global  variables  and  a  terminal  specific  version  is
  418. compiled.   It  has  been  customary  to  give  a  unique name to each
  419. different version such as TVV for a VT-52 version, TVT for a televideo
  420. version, etc.  The Unix version  of  TVX  has  been  written  to  take
  421. advantage  of  the  TERMCAP  library  usually  provided,  and  is thus
  422. terminal independent. 
  423.  
  424.      Since terminals differ widely, TVX tries to update the screen  as
  425. best  as  possible using the control codes available.  The minimum set
  426. of control  sequences  required  by  TVX  include  direct  x-y  cursor
  427. positioning,  and  erase  from  cursor to the end of the current line.
  428. Almost all terminals have at least these two controls.  The only known
  429. terminal widely available that does not have  both  of  these  is  the
  430. ADM-3a.   Thus,  TVX  will  NOT  work  on ADM-3a's.  Another desirable
  431. control sequence is the ability to insert a blank line at the  top  of
  432. the  screen  (reverse  scroll).  This allows TVX to scroll rather than
  433. jump  from  one  screen  to  the  next.   However,  TVX  will  perform
  434. adequately even on terminals with only x-y and erase to end of line. 
  435.  
  436. *** Source Files Supplied ***
  437.  
  438.      The following files are included in most distributions:
  439.  
  440.   TVX_1.C  - main part of code (part 1)
  441.   TVX_2.C  - main part of code (part 2)
  442.              These two files are mostly os and terminal independent.
  443.   TVX_LEX.C - defaults, some os dependent stuff in here.  Major
  444.             changes in defaults can be fixed by recompiling this file.
  445.   TVX_IO.C - almost all I/O, including screen, confined to this file.
  446.   TVX_LIB.C - misc library routines needed by TVX.
  447.   TVX_IBM.C - IBM-PC specific code, specifically the screen driver
  448.               (TVX_IBM.ASM - hand optimized version of TVX_IBM.C)
  449.   TVX_UNIX.C - contains unix specific code, including termcap driver
  450.   TVX_DEFS.IC - #define's for version, os, terminal, defaults
  451.   TVX_GLBL.IC - global data structures
  452.   TVX_TERM.IC - definitions for various terminals and systems
  453.  
  454.   TVCONFIG.C - used to build CONFIG.TVX file for -c switch
  455.   TVPATCH.C - MS-DOS versions only - used to permanently apply
  456.               config settings to TVX.EXE.
  457.  
  458.  
  459.  
  460.                                  -24-                                 
  461.  
  462.  
  463.  
  464.  
  465. TVX Reference Manual                                          11/27/85
  466.  
  467.  
  468.   TVX_MAKE.BAT - MS-DOS Batch file to build TVX using cii c-86.
  469.   TVX_MAKE.UNX - Unix Makefile to make on unix.
  470.  
  471.   TVX_REF.DOC - This file, preformatted for printing on a "standard"
  472.                 printer - 80 columns by 66 lines.
  473.  
  474.  
  475. *** Screen Driver and Control Sequences ***
  476.  
  477.      The actual  codes  used  by  TVX  to update the screen are global
  478. variables in the 'tvx_glbl.ic' file.  Using the '#ifdef EXTERN'  trick
  479. described in that file, the screen variables (plus most other relevant
  480. global  variables)  are  included  as external references.  The actual
  481. definitions for a  given  terminal  are  included  in  a  file  called
  482. 'tvx_term.ic'.    Several  sample  definitions  are  included  in  the
  483. distribution code.  A description of each relevant variable follows:
  484.  
  485.  
  486. ** X-Y Cursor Addressing
  487.  
  488. int addx - amount to add to  internal  x  position  get  terminal's  x
  489. value.    Terminals   typically  encode  x-y  as  a  single  printable
  490. character, thus  requiring  the  addition  of  a  blank  to  make  x-y
  491. printable.   Since  TVX uses a 1,1 origin, this value will commonly be
  492. 31. 
  493.  
  494. int addy - same as addx, but for y position. 
  495.  
  496. char cxychr - true (1) if convert xy binary  representation  to  ascii
  497. string. 
  498.  
  499. char cxy1st - 'l' if line coordinate first, 'c' if column first. 
  500.  
  501. char  cxybeg[8],  char  cxymid[8],  char  cxyend[8]  -  The x-y cursor
  502. control sequence usually takes one of two  forms:  <control><x><y>  or
  503. <control><x><middle><y><end>.   The  x  and  y may be reversed.  These
  504. three arrays are used to send  the  proper  control  sequence  for  xy
  505. positioning. 
  506.  
  507.  
  508. *** Other control sequences
  509.  
  510. char cversn[12] - a version string to identify terminal. 
  511.  
  512. char  cerrbg[8], char cerred[8] - sequences sent when an error message
  513. sent to terminal's last line.  Note that cerrbe  is  sent  BEFORE  the
  514. cursor is moved to the last line, and cerred is sent before the cursor
  515. is returned to the original position.  Some terminals give problems if
  516. a  highlight sequence is sent before a cursor positioning sequence.  A
  517. bell is usually safe for most versions. 
  518.  
  519. char ctopb[8] - This sequence should insert  a  blank  line  when  the
  520. cursor  is  at  the  top left corner.  It is often called reverse line
  521. feed.  A command to insert a line usually performs the same  function,
  522. but some terminals don't have both. 
  523.  
  524.  
  525.  
  526.                                  -25-                                 
  527.  
  528.  
  529.  
  530.  
  531. TVX Reference Manual                                          11/27/85
  532.  
  533.  
  534. char  cinit[20],  char  cendit[20]  -  these  sequences  are  sent  to
  535. initialize and reset the terminal. 
  536.  
  537. char cbotb[8] - this sequence scrolls the screen up one line when  the
  538. cursor  is  on  the  last  line.   Line  feed  works  for any terminal
  539. encountered to date. 
  540.  
  541. char celin[8] - Erase from cursor to end of line.   This  sequence  is
  542. required for operation of TVX. 
  543.  
  544. char  cescr[8]  - Erase from cursor to end of screen.  If the terminal
  545. doesn't have this, it is simulated using multiple celins. 
  546.  
  547. char ccsrcm[8], char ccsrin[8] - These are used to change  the  cursor
  548. from  command  mode  to  insert mode.  Many terminals do not support a
  549. method of changing the cursor shape.  These have been also  been  used
  550. to change the screen from normal to reverse video an back. 
  551.  
  552. char ciline[8] - Insert a blank line.  A blank line is inserted on the
  553. line the cursor is on.  If available, it can be used for ctopb, too. 
  554.  
  555. char  ckline[8]  - Kill a line.  The line the cursor is on is deleted,
  556. and the following text scrolled up. 
  557.  
  558. char cundlb[8], cundle[8] -  TVX  has  the  capability  to  optionally
  559. support  bold  and underline for some text processors.  For example, a
  560. ^U can be used to toggle underscore.  This is only useful for  a  text
  561. formatter that can recognize such a sequence. 
  562.  
  563. char cboldb[8], char cbolde[8] - Similar to undlb, but boldface. 
  564.  
  565.  
  566. *** Default settings
  567.  
  568. int  ddline  -  default  display  line.   This  sets which line is the
  569. default home display line.  For scrolling versions (dscrl != 0), right
  570. in the middle is a  good  place.   For  fixed  cursor  line  versions,
  571. something  below  the  middle  seems  better  (like  16  for  24  line
  572. screens). 
  573.  
  574. int dscrl - default scroll lines.  If this  is  non-zero,  the  cursor
  575. will  move  up  and  down  lines  on  the  screen with cursor movement
  576. commands.  This requires a bit less screen  update  overhead,  and  is
  577. better for slower time shared systems.  If it is zero, the cursor will
  578. remain  fixed on ddline, and text will scroll on and off the screen as
  579. needed.  Both these are resettable with the : command. 
  580.  
  581. int dxcase - default search case.  0 means find is case insensitive, 1
  582. means find must match exact case. 
  583.  
  584. int usecz - MS-DOS versions only.  If 1, TVX will put a Control-Z  end
  585. of  file  mark  in the file (this is CP/M compatible).  If 0, TVX uses
  586. MS-DOS end of file conventions. 
  587.  
  588. int autoin - TRUE (1) if auto indent, FALSE (0) otherwise. 
  589.  
  590.  
  591.  
  592.                                  -26-                                 
  593.  
  594.  
  595.  
  596.  
  597. TVX Reference Manual                                          11/27/85
  598.  
  599.  
  600. int logdef - Create backup log file by default?  0->no, 1-> yes. 
  601.  
  602. char wildch - The character used as a wild card in finds. 
  603.  
  604. char delkey - the delete character key, usually backspace. 
  605.  
  606. int tvhardlines - number of physical lines on screen. 
  607.  
  608. int tvlins - number of lines on virtual screen.  Initially  should  be
  609. same value as tvhardlines. 
  610.  
  611. int  tvcols  - number of columns on screen.  If the terminal wraps new
  612. text to the next line rather than discarding characters after the last
  613. column, then tvcols must be set to 1 less than the true width  of  the
  614. terminal. 
  615.  
  616. int  isibmpc  - TRUE (1) if this version uses the custom IBM-PC screen
  617. driver.  FALSE (0) if uses regular terminal output code. 
  618.  
  619. char synofr[20], char synoto[20] - These are  used  to  map  commands.
  620. The  synofr  contains  commands  to  be  aliased  to the corresponding
  621. command in the synoto table.  For example, the '[' and  '{'  keys  are
  622. often  reversed  on some terminals.  Making '[' in synofr a synonym to
  623. '{' in synoto will make the two commands the same. 
  624.  
  625. char funkey - If the terminal has function keys, they can be supported
  626. by TVX by setting this variable to the first code sent by the function
  627. key, usually  ESCAPE.   TVX  supports  only  two  code  sequences  for
  628. function keys. 
  629.  
  630. char funchar[50] - this is the second code sent by a function key. 
  631.  
  632. char  funcmd[50] - this is the equivalent command a given function key
  633. will be mapped to.  Similar to synofr and synoto. 
  634.  
  635.  
  636. *** #define options
  637.  
  638.      The file 'tvx_defs.ic' has many #define statements  that  can  be
  639. used  to  customize  TVX  for  particular installations.  Ideally, the
  640. source for TVX should  be  maintained  as  one  set,  and  differences
  641. between  versions handled by #defines.  Most #defines are explained in
  642. the source code, but a few deserve  a  few  extra  comments,  and  are
  643. summarized below. 
  644.  
  645. #define  VERSION  "  -  TVX (7/1/85) - " - This defines the version of
  646. TVX.  Any time a modification is made, the VERSION  define  should  be
  647. updated. 
  648.  
  649. #define VB - whether or not to create backup log version or not.  This
  650. does  NOT  imply the file "backup.log" will be used automatically (see
  651. variable logdef), simply that the code is included. 
  652.  
  653. #define ULBD - If defined, TVX supports  underline,  bold  in  ^U,  ^B
  654. format. 
  655.  
  656.  
  657.  
  658.                                  -27-                                 
  659.  
  660.  
  661.  
  662.  
  663. TVX Reference Manual                                          11/27/85
  664.  
  665.  
  666. #define  BACKUPNAME - This defines the name of the backup log file, if
  667. used. 
  668.  
  669. #define BUFFLIMIT - This defines how much space is saved in  the  text
  670. buffer  when  reading  in  a  file.  This determines how much space is
  671. reserved for saving text with the 'S' command, and how  much  is  left
  672. over for new inserts.  Smaller values allow more text from the file to
  673. be  read,  larger values allow more text to be saved.  The '-s' switch
  674. at runtime increases this value. 
  675.  
  676. #define FILEREAD, #define FILEWRITE - These define the string used for
  677. file mode in the fopen() calls.  Unix  and  MS-DOS  versions  are  not
  678. typically  exactly  compatible,  as  most MS-DOS C's allow a different
  679. mode to handle the CR/LF problem. 
  680.  
  681. #define FNAMESIZE - maximum length of file names. 
  682.  
  683. #define INT16 - If #defined, then the normal C int is  16  bits  long.
  684. This changes the way memory status is displayed. 
  685.  
  686. #define  LINELIMIT  -  Like  BUFFLIMIT, only number of lines.  #define
  687. MAXBUFF - Defines maximum  number  of  characters  allocated  to  text
  688. buffer.   Malloc()  is  used to get the space from the runtime system.
  689. It is possible less than  MAXBUFF  will  be  available.   The  maximum
  690. allowed  for  any  given  system  must  be less than the maximum value
  691. represented by an unsigned int.  If MAXBUFF is very large,  there  get
  692. to be a noticeable initialization delay. 
  693.  
  694. #define  MAXLINE  -  This  determines  the  maximum  number  of  lines
  695. allocated per buffer.  It is related to MAXBUFF. 
  696.  
  697. #define REPEATBUFS - defines how many repeat  buffers  are  allocated.
  698. If space is a problem, allocate fewer repeat buffers. 
  699.  
  700. #define  USELF - This symbol should be defined if the terminal needs a
  701. line feed character after each carriage return.  Almost always true. 
  702.  
  703. #define FILELF - This symbol is defined if  text  files  use  a  CR/LF
  704. combination.  It causes a NEWLINE/LF to be written to files. 
  705.  
  706. #define NEWLINE - This defines the actual character used as a new line
  707. in  files.  On CR/LF systems, it should be a CR (13).  On systems like
  708. Unix with a single new line separator, it  should  be  that  character
  709. (LF). 
  710.  
  711. #define  USECTRLZ  -  defined if the code for handling a Control-Z and
  712. end of file mark should be used. 
  713.  
  714. #define NEEDTVLIB - define this if the  standard  C  library  provided
  715. doesn't have the routine in TVX_LIB. 
  716.  
  717. #define  HELP  -  Define  this  if help should be supported.  The help
  718. routine uses significant space, which  can  be  saved  if  help  isn't
  719. compiled in. 
  720.  
  721. #define  CONFIGFILE  -  define  this if support for the '-c' switch is
  722.  
  723.  
  724.                                  -28-                                 
  725.  
  726.  
  727.  
  728.  
  729. TVX Reference Manual                                          11/27/85
  730.  
  731.  
  732. desired. 
  733.  
  734.  
  735.  
  736. **** MS-DOS Notes ***
  737.  
  738.      TVX can be built as a generic MS-DOS version  and  as  an  IBM-PC
  739. specific  version.  The MS-DOS version uses the standard DOS character
  740. output routines.  Thus, it could use the ANSI.SYS driver, but it would
  741. run very slowly then.  The IBM-PC version has a custom  screen  driver
  742. that  calls  the  ROM BIOS directly, and is very fast.  A special hand
  743. optimized version of the driver is also included in the source  (valid
  744. for  cii  c-86  only!).   The  definitions  for  and IBMPC included in
  745. "tvx_term.ic" also define the keypad keys to  work  in  a  predictable
  746. manner. 
  747.  
  748.  
  749.  
  750. *** Unix Notes ***
  751.  
  752.      The usual Unix version will be the TERMCAP version.  That version
  753. works  very  well,  but  is  not  in  all  cases  optimal  for a given
  754. terminal.  It might be desirable to build a specific version  for  the
  755. terminal  you  use most often.  Most notably, the TERMCAP version does
  756. not know about cursor shapes or other control sequences to distinguish
  757. command mode from insert mode.  Also, it sets tvcols to one less  than
  758. the  true  value to avoid wrapping problems.  The termcap version also
  759. only sends a bell for the error message. 
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.                                  -29-                                 
  791.  
  792.  
  793.  
  794.  
  795. TVX Reference Manual                                          11/27/85
  796.  
  797.  
  798.                         *** TVX File Usage ***
  799.  
  800.      TVX uses four logical files: the original file,  the  destination
  801. file,  a  work  file,  and the source file.  The original file and the
  802. destination file are not touched until a normal exit from TVX. 
  803.  
  804.      The source file is the current copy of the file providing text to
  805. be entered.  When TVX is  first  started,  the  source  file  and  the
  806. original  file are the same.  The work file is used to hold the edited
  807. output file. 
  808.  
  809.      When the '^B' file beginning command is issued, the remainder  of
  810. the  source  input  file is written to the work output file.  The work
  811. file then becomes the  new  source  file,  and  a  new  work  file  is
  812. created.   Thus,  it is possible to have four copies of a file around:
  813. The .BAK backup copy of the original file, the original  copy  of  the
  814. file,  the  copy  of the source file, and the (partially written) work
  815. file.  Under normal operation, there will  only  be  two  copies:  the
  816. source  file  (which  is  really  the  original file) and the possibly
  817. partially written work file.  Only by using the '^B'  commands  can  3
  818. copies of the file exist. 
  819.  
  820.      When you  issue  the  normal  '^X'  exit  command,  the following
  821. actions take place: Any old .BAK files are deleted.  The original file
  822. is renamed to be  the  new  .BAK  version.   If  the  source  file  is
  823. different  than  the original file, it will be deleted.  The work file
  824. is then renamed to be the destination file.  If you don't  have  write
  825. access to the directory with the original file, then the original file
  826. and  the work file will not be renamed.  A message to that effect will
  827. be printed.  The normal operating system copy and rename commands  can
  828. be  used  to  recover  the work file, which contains the edits made to
  829. date. 
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.                                  -30-                                 
  857.  
  858.  
  859.  
  860.  
  861. TVX Reference Manual                                          11/27/85
  862.  
  863.  
  864.                    *** Quick Reference Summary ***
  865.  
  866.  
  867.        TVX Commands (n => count allowed)
  868.  
  869.     nA Append lines            B Buffer beginning
  870.     ^B File beginning         nC Change chars
  871.     nD Down line             n^D Down column
  872.      E Buffer end            n^E Edit repeat buffer
  873.     nF Find pattern           ^F Find across buffs
  874.      G Get save buffer        ^G Unkill last line
  875.     nH Half page              nI Insert (till $)
  876.      J Jump back              nK Kill character
  877.    n^K Kill line              nL Left
  878.      M Memory status          nN Note location
  879.    n^N Reset location         nO Open blank line
  880.     ^O Operating system       nP Page
  881.     ^P Print screen           nR Right
  882.     ^R Restore edited buffer  nS Save lines
  883.     nT Tidy (fill text)       ^T Abort session
  884.     nU Up                    n^U Up column
  885.      V Verify                n^W Write buff
  886.     ^X Exit, end session     n^Y Yank to(-n)/from(+n) file
  887.    nBS Delete prev. char.     n; Find again
  888.      / Delete last thing       = Change last thing
  889.      ' Del to line beginning   " Delete to line end
  890.      , Line beginning          . Line end
  891.   nTAB Word right             n{ Word left
  892.   n<>$$ Repeat loop           n& Repeat again
  893.    n#k Execute repeat buffer k n times
  894.      ? Help                    @ Invoke cmd file
  895.      * Insert pattern found last
  896.      $ Escape - end insert, find, repeat
  897.    n:p Set parameter p
  898.  
  899.  
  900.   Possible parameters:
  901.  
  902.     A - Autoindent (1=y,0=n)       D - display line
  903.     E - Expand tabs to n spaces    F - find case (0=exact,1=any)
  904.     M - Match wild cards           O - set output file name
  905.     S - scroll window              R - repeat buffer to use
  906.     T - tty mode                   U - define user wild card set
  907.     V - virtual window             W - autowrap width
  908.  
  909.  
  910.   Usage: tvx filename [-b -i -l -o=f -r -s -t -w -# {-z -c=f}]
  911.  
  912.     -[no]b : backup file           -[no]i : autoindent
  913.     -[no]l : make command log file -t : tty mode
  914.     -o=outputfile                  -r : read only
  915.     -s : big save buff             -[no]w : word processing mode
  916.     -# : set virtual window lines to #
  917.  
  918.   On MS-DOS versions:
  919.     -[no]z : use control-z for end of file
  920.  
  921.  
  922.                                  -31-                                 
  923.  
  924.  
  925.  
  926.  
  927. TVX Reference Manual                                          11/27/85
  928.  
  929.  
  930.     -c=configfile                  -c : use /bin/config.tvx
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.                                  -32-                                 
  989.  
  990.  
  991.  
  992.  
  993. TVX Reference Manual                                          11/27/85
  994.  
  995.  
  996.                             *** INDEX ***
  997.                          TVX Reference Manual
  998.  
  999. abort - 10
  1000. append - 4, 10
  1001. auto wrap - 16
  1002. autoindent - 15
  1003.  
  1004. backspace - 2, 12, 17, 18
  1005. backup file - 3, 4, 10, 17
  1006. beginning of file - 4, 6, 17
  1007. buffer - 2, 4, 5, 6, 8, 9, 11
  1008. buffer beginning - 4
  1009.  
  1010. change - 4
  1011. commands - 2, 4
  1012. cursor - 2
  1013. cursor character - 3
  1014.  
  1015. default source settings - 26
  1016. define options - 27
  1017. delete last thing - 12
  1018. delete line front - 13
  1019. delete line tail - 13
  1020. delete previous character - 12
  1021. down - 4, 10
  1022. down in column - 4
  1023.  
  1024. end buffer - 5
  1025. end session - 11
  1026. Error Messages - 20
  1027. escape - 3, 4, 5, 7, 17
  1028. exit - 11
  1029. external file - 12
  1030.  
  1031. find - 5, 6, 12, 15
  1032. find case - 15
  1033.  
  1034. get - 6
  1035. get killed line - 7
  1036.  
  1037. half page - 7
  1038. home display line - 15
  1039.  
  1040. insert - 7, 8
  1041. Insert find pattern - 13
  1042. Installation - 24
  1043. Installation - MS-DOS - 29
  1044. Installation - Unix - 29
  1045. invoke command file - 15
  1046.  
  1047. jump - 7
  1048.  
  1049. kill characters - 7
  1050. kill lines - 8
  1051.  
  1052.  
  1053.  
  1054.                                  -33-                                 
  1055.  
  1056.  
  1057.  
  1058.  
  1059. TVX Reference Manual                                          11/27/85
  1060.  
  1061.  
  1062. left - 8
  1063. line beginning - 13
  1064. line end - 13
  1065. log file - 3, 12, 15, 17
  1066.  
  1067. memory - 8
  1068. mode - 3, 4, 7, 8, 12
  1069.  
  1070. note - 8
  1071.  
  1072. open line - 8
  1073. operating system - 8
  1074. other control sequences - 25
  1075. output file - 15
  1076.  
  1077. page - 7, 9
  1078. parameters - 15
  1079. print - 9
  1080.  
  1081. Quick Reference Summary - 31
  1082. quit - 4
  1083.  
  1084. repeat buffer - 9
  1085. repeat loop - 5, 13, 16
  1086. right - 9
  1087.  
  1088. save buffer - 4, 7, 9, 12
  1089. scroll lines - 16
  1090. search - 5
  1091. skip over words - 13
  1092. source code - 24
  1093. starting up - 1
  1094. status - 8
  1095. switches - 1
  1096.  
  1097. tab expansion - 15
  1098. terminate - 10
  1099. tidy - 10
  1100. tty mode - 16, 23
  1101. TVX File Usage - 30
  1102.  
  1103. unkill - 7
  1104. up - 11
  1105. up in column - 11
  1106. user customization - 19
  1107.  
  1108. verify - 11
  1109. virtual window - 16
  1110.  
  1111. wild card - 6, 15
  1112. word - 13
  1113. write buffer - 11
  1114.  
  1115. -Y Cursor Addressing - 25
  1116.  
  1117. yank external file - 12
  1118.  
  1119.  
  1120.                                  -34-                                 
  1121.  
  1122.  
  1123.  
  1124.  
  1125.