home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_100 / 186_01 / view.doc < prev    next >
Text File  |  1985-08-21  |  7KB  |  154 lines

  1. DOCUMENTATION FOR VIEW.COM
  2.  
  3. Version 1.5 -- 10/10/85
  4.  
  5.  
  6. Revisions:
  7.  
  8. 1.30 -- (JWP, 5/04/85) Changed the structure of the text buffer.  In versions
  9.     1.0 - 1.2, there was a char buffer and an array of char pointers to
  10.     the lines of text.  This made execution speed virtually instan-
  11.     taneous, but increased load time and decreased maximum file size.
  12.     Version 1.3 uses the maximum available space for a buffer, but uses
  13.     linear searching to locate line beginnings.  This slows things down,
  14.     especially on the "goto beginning" and "goto end" commands, but 
  15.     allows files of up to 40K.  
  16.  
  17. 1.31 -- (JWP, 6/10/85) Made slight revisions to make use of version 1.1 of
  18.     the TXTPLOT function.  The new TXTPLOT takes an extra parameter for
  19.     the tab size, so all calls to TXTPLOT had to be altered.
  20.  
  21. 1.4 --  (JWP, 6/24/85) Due to popular demand, I have revised VIEW to allow
  22.     unlimited file size.  Files are divided into 16K segments, with 2
  23.     segments present in memory at any given time.  Disk reads only occur
  24.     at segment boundaries, and when disk reads occur, there is a one
  25.     segment overlap, allowing scrolling in either direction for 16K before
  26.     another read is necessary.  I also have attempted to include the
  27.     ability to read WordStar files, but this is unpredictable, since not
  28.     all lines in a WordStar file end with a CR and a LF, as VIEW expects
  29.     them to.  Also fixed 2 bugs -- one caused problems when you did a
  30.     "goto end" command, scrolled back a few lines, then scrolled forward
  31.     by lines.  The other caused similar problems when the last screen
  32.     of a file did not contain 24 lines.  Finally, I put in a few kludgy
  33.     things to save some space, thus allowing the new version of VIEW to
  34.     be no larger than the previous one.
  35.  
  36. 1.5 --  (JWP, 10/10/85) Added the command line option "-t", where t is the
  37.     tab size.
  38.  
  39. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  40.  
  41. GENERAL
  42.  
  43. In the beginning, there was TYPE.  Before long, however, users got fed up
  44. with TYPE and thus began the torrent of screen dump programs (SHO, TYPE8,
  45. VLIST, TYPEL, TAIL, etc., etc.).  VIEW is yet another in this long line
  46. of text file viewers.  VIEW took off from the UNIX "more" command, which
  47. displays a file one line or one screen at a time.  One limitation of all
  48. file dumpers that are floating around is that you can't go backwards through
  49. a file.  Hence, VIEW:  A program that allows you to view a file forwards
  50. or backwards by line or screen.  It is ideal for viewing program listings,
  51. where you frequently want to check out a subroutine or function that occurs
  52. far removed from its call.  
  53.  
  54. VIEW has another advantage over other dumpers in that it uses the NEC PC-8801A
  55. memory-mapped video.  This makes the display quite fast.
  56.  
  57. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
  58.  
  59. OPERATION
  60.  
  61. Command syntax:
  62.  
  63.     VIEW [-t] [n/d:]filename.ext [[n/d:]filename.ext] [ . . . etc ]
  64.  
  65. VIEW defaults to 8-space tabs.  This default may be changed with the "-t"
  66. option, where t represents the desired tab size.  Hence, invoking VIEW
  67. with the option "-4" will produce 4-space tabs.
  68.  
  69. As many filenames as will fit on the command line will be accepted.  Ambig-
  70. uous filenames are also accepted, allowing you to view all the "C" files, 
  71. "ASM" files, or whatever.  
  72.  
  73. A special form of the command line:
  74.  
  75.     VIEW ![d:]filename.ext
  76.  
  77. A filename (ambiguous or not) preceded by a "!" will cause all files matching
  78. that filename to be EXCLUDED from viewing.  This is done using the BDS
  79. WILDEXP functions, which have some peculiarities.  First, no user numbers
  80. are allowed in an ambiguous filename. Second, if a "!" spec is the only 
  81. one given it cannot include a drive name, although, if there is another,
  82. ambiguous filename given on the command line, the drive name is OK on both.
  83. Some examples to clear this up:
  84.  
  85.     (1)  VIEW foobar
  86.     (2)  VIEW foobar binky
  87.     (3)  VIEW 1/a:foobar 2/b:binky
  88.     (4)  VIEW *.*
  89.     (5)  VIEW 1/b:*.*
  90.     (6)  VIEW b:*.asm
  91.     (7)  VIEW !*.asm
  92.     (8)  VIEW !b:*.asm
  93.     (9)  VIEW b:*.* !b:*.asm
  94.  
  95.     Example   Result
  96.     ---------------------------------------------------------------
  97.      (1)      Views "foobar" on logged drive
  98.      (2)      Views "foobar", then "binky", both on logged drive
  99.      (3)      Same as (2), but with "foobar" on drive A, user 1, and
  100.               "binky" on drive B, user 2
  101.      (4)      Views all files on logged drive and user
  102.      (5)      Does nothing, since ambiguous filenames can have a user spec
  103.      (6)      Views all "asm" files on drive B
  104.      (7)      Views all files on logged drive EXCEPT "asm" files
  105.      (8)      Does nothing, since a single "!" spec can't have a drive name
  106.      (9)      Views all files on drive B EXCEPT "asm" files (the extra
  107.               ambiguous filename allows the drive on the "!" spec)
  108.  
  109.  
  110. Once a file is loaded the following commands are possible:
  111.  
  112.     <CR>    Move forward one line
  113.     <SPACE>    Move forward one screen (24 lines)
  114.     ^H    Move backwards one line (this is the DEL key on the 8801A)
  115.     <ESC>    Move backwards one screen
  116.     ^B    Go to the beginning of the file
  117.     ^E    Go to the end of the file
  118.  
  119. You move around, forwards or backwards, in the file until one of the
  120. following commands is entered:
  121.  
  122.     ^N    Load next file (if an ambiguous filename or a list of
  123.         files was given on the command line)
  124.  
  125.     ^C    Exit to CP/M
  126.  
  127. If there are no more files matching the ambiguous name, or if the list of
  128. files has been exhausted, a ^N will exit to CP/M.   ^C exits, no matter
  129. how many files remain to be viewed.
  130.  
  131. ** NOTE:  All files must meet two criteria for VIEW to work:
  132.  
  133.     (1)  Each line (except the last one) MUST end in a CR and a LF.
  134.          The CR/LF is optional for the last line.
  135.  
  136.     (2)  The file MUST be terminated with the CP/M end-of-file char-
  137.          acter (1Ah).
  138.  
  139. Although VIEW strips parity and ignored imbedded control characters, Word-
  140. Star files sometimes have lines that do not end in the CR/LF combination.
  141. Hence, weird things may happen if you try to VIEW a WordStar file, although
  142. it's worth a try.  Also, some editors are bad about failing to put an
  143. end-of-file  if the text is exactly a multiple of 128 characters long.
  144. This will cause some garbage to show up at the end of the file, and if the
  145. file is longer than 32K, it will probably crash the whole thing (I don't
  146. really know, I've never tried it).  
  147.  
  148.  
  149. James Pritchett
  150. 275 Bleecker St., Apt. 1
  151. New York, NY  10014
  152.  
  153. 
  154. 9∙δ┴╔┼═\n}■┬█┴╔═\σ*