home *** CD-ROM | disk | FTP | other *** search
- DOCUMENTATION FOR VIEW.COM
-
- Version 1.5 -- 10/10/85
-
-
- Revisions:
-
- 1.30 -- (JWP, 5/04/85) Changed the structure of the text buffer. In versions
- 1.0 - 1.2, there was a char buffer and an array of char pointers to
- the lines of text. This made execution speed virtually instan-
- taneous, but increased load time and decreased maximum file size.
- Version 1.3 uses the maximum available space for a buffer, but uses
- linear searching to locate line beginnings. This slows things down,
- especially on the "goto beginning" and "goto end" commands, but
- allows files of up to 40K.
-
- 1.31 -- (JWP, 6/10/85) Made slight revisions to make use of version 1.1 of
- the TXTPLOT function. The new TXTPLOT takes an extra parameter for
- the tab size, so all calls to TXTPLOT had to be altered.
-
- 1.4 -- (JWP, 6/24/85) Due to popular demand, I have revised VIEW to allow
- unlimited file size. Files are divided into 16K segments, with 2
- segments present in memory at any given time. Disk reads only occur
- at segment boundaries, and when disk reads occur, there is a one
- segment overlap, allowing scrolling in either direction for 16K before
- another read is necessary. I also have attempted to include the
- ability to read WordStar files, but this is unpredictable, since not
- all lines in a WordStar file end with a CR and a LF, as VIEW expects
- them to. Also fixed 2 bugs -- one caused problems when you did a
- "goto end" command, scrolled back a few lines, then scrolled forward
- by lines. The other caused similar problems when the last screen
- of a file did not contain 24 lines. Finally, I put in a few kludgy
- things to save some space, thus allowing the new version of VIEW to
- be no larger than the previous one.
-
- 1.5 -- (JWP, 10/10/85) Added the command line option "-t", where t is the
- tab size.
-
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
- GENERAL
-
- In the beginning, there was TYPE. Before long, however, users got fed up
- with TYPE and thus began the torrent of screen dump programs (SHO, TYPE8,
- VLIST, TYPEL, TAIL, etc., etc.). VIEW is yet another in this long line
- of text file viewers. VIEW took off from the UNIX "more" command, which
- displays a file one line or one screen at a time. One limitation of all
- file dumpers that are floating around is that you can't go backwards through
- a file. Hence, VIEW: A program that allows you to view a file forwards
- or backwards by line or screen. It is ideal for viewing program listings,
- where you frequently want to check out a subroutine or function that occurs
- far removed from its call.
-
- VIEW has another advantage over other dumpers in that it uses the NEC PC-8801A
- memory-mapped video. This makes the display quite fast.
-
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
- OPERATION
-
- Command syntax:
-
- VIEW [-t] [n/d:]filename.ext [[n/d:]filename.ext] [ . . . etc ]
-
- VIEW defaults to 8-space tabs. This default may be changed with the "-t"
- option, where t represents the desired tab size. Hence, invoking VIEW
- with the option "-4" will produce 4-space tabs.
-
- As many filenames as will fit on the command line will be accepted. Ambig-
- uous filenames are also accepted, allowing you to view all the "C" files,
- "ASM" files, or whatever.
-
- A special form of the command line:
-
- VIEW ![d:]filename.ext
-
- A filename (ambiguous or not) preceded by a "!" will cause all files matching
- that filename to be EXCLUDED from viewing. This is done using the BDS
- WILDEXP functions, which have some peculiarities. First, no user numbers
- are allowed in an ambiguous filename. Second, if a "!" spec is the only
- one given it cannot include a drive name, although, if there is another,
- ambiguous filename given on the command line, the drive name is OK on both.
- Some examples to clear this up:
-
- (1) VIEW foobar
- (2) VIEW foobar binky
- (3) VIEW 1/a:foobar 2/b:binky
- (4) VIEW *.*
- (5) VIEW 1/b:*.*
- (6) VIEW b:*.asm
- (7) VIEW !*.asm
- (8) VIEW !b:*.asm
- (9) VIEW b:*.* !b:*.asm
-
- Example Result
- ---------------------------------------------------------------
- (1) Views "foobar" on logged drive
- (2) Views "foobar", then "binky", both on logged drive
- (3) Same as (2), but with "foobar" on drive A, user 1, and
- "binky" on drive B, user 2
- (4) Views all files on logged drive and user
- (5) Does nothing, since ambiguous filenames can have a user spec
- (6) Views all "asm" files on drive B
- (7) Views all files on logged drive EXCEPT "asm" files
- (8) Does nothing, since a single "!" spec can't have a drive name
- (9) Views all files on drive B EXCEPT "asm" files (the extra
- ambiguous filename allows the drive on the "!" spec)
-
-
- Once a file is loaded the following commands are possible:
-
- <CR> Move forward one line
- <SPACE> Move forward one screen (24 lines)
- ^H Move backwards one line (this is the DEL key on the 8801A)
- <ESC> Move backwards one screen
- ^B Go to the beginning of the file
- ^E Go to the end of the file
-
- You move around, forwards or backwards, in the file until one of the
- following commands is entered:
-
- ^N Load next file (if an ambiguous filename or a list of
- files was given on the command line)
-
- ^C Exit to CP/M
-
- If there are no more files matching the ambiguous name, or if the list of
- files has been exhausted, a ^N will exit to CP/M. ^C exits, no matter
- how many files remain to be viewed.
-
- ** NOTE: All files must meet two criteria for VIEW to work:
-
- (1) Each line (except the last one) MUST end in a CR and a LF.
- The CR/LF is optional for the last line.
-
- (2) The file MUST be terminated with the CP/M end-of-file char-
- acter (1Ah).
-
- Although VIEW strips parity and ignored imbedded control characters, Word-
- Star files sometimes have lines that do not end in the CR/LF combination.
- Hence, weird things may happen if you try to VIEW a WordStar file, although
- it's worth a try. Also, some editors are bad about failing to put an
- end-of-file if the text is exactly a multiple of 128 characters long.
- This will cause some garbage to show up at the end of the file, and if the
- file is longer than 32K, it will probably crash the whole thing (I don't
- really know, I've never tried it).
-
-
- James Pritchett
- 275 Bleecker St., Apt. 1
- New York, NY 10014
-