README file for tops.

Program Tops - a stack-based computing environment
Copyright (C) 1999-2008  Dale R. Williamson

Author: Dale R. Williamson <dale.williamson@prodigy.net>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

------------------------------------------------------------------------

Description.

tops 3.1.0 (Sat Dec 6 10:57:17 PST 2008)
http://savannah.gnu.org/projects/tops
  This program provides a stack-based computing environment.  Four
  types of stack items--numbers, matrices, strings, and arrays of
  strings--are manipulated by commands called words.  Words inter-
  act through items on the stack, and can be assembled as building
  blocks into new and more powerful words.
 
  The stack and stack items, the catalog and catalog items, and
  simple pattern matching to items in the catalog keep the machine
  running from word to word.  A few stack manipulation words allow
  a user to juggle stack items and feed words in phrases with ex-
  traordinary interactive control of the machine, word by word.
  Useful new words and phrases committed to text files or scripts
  can later be run in batch mode.
 
  Manipulation of the stack and the running of words follows post-
  fix notation, and a writer of postfix phrases is responsible for
  staging operations with the correct precedence.  Payoff for the
  effort of writing for a stack machine is speed comparable to
  compiled code with simple phrases that run immediately from the
  interactive prompt or an included file.  Networking, multitask-
  ing, text manipulation and queuing are examples where interac-
  tive development of postfix phrases to control the machine is
  very convenient.
 
  When writing numerical equations, rather than a series of steps
  to, say, manage a network connection, staging stack operations
  for postfix input is cumbersome due to precedence.  Infix nota-
  tion, common to C, Fortran and other programming languages, uses
  algebraic expressions that are more convenient to write.  Paren-
  theses, brackets and braces are used to isolate terms and force
  precedence.  Unlike postfix, infix statements cannot be run sym-
  bol by symbol, and require a parser to turn them into sequential
  operations, like postfix, that can run the machine.
 
  For applications better suited to infix notation, the program
  uses an infix parser of C-like statements and matrix bracket
  notation to transform infix phrases like these into their post-
  fix analogs and immediately run them:
 
    i = sqrt(-1); // cmplx number i
 
    (Alpha, Beta, VL, VR) = zggev(A, B*(1 + 0*i)); // B into cmplx
 
 // Sig(t) is updated to H(t) when P(t) equals S1 or S2
    Sig = looking(H, (P==S1 || P==S2)); // Sig[0] = H[0]
 
    eta = H \* gam[*, 1:cols(gam)/2]; // all rows, left half cols
 
 /* Using << ... >> to embed a postfix phrase into infix (in post-
    fix, items in parentheses are comments): */
    STEPS = (<< H (hr) 60 (min/hr) M (min/step) / * >>);
 
    C = rget(node[3])[*, .C]; /* column .C from rget(node[3]) */
 
 /* Sort all rows of D based upon real part of column 3 of D: */
    Dsort = D[[sort([Re(D[*, 3]) , 1:rows(D)], yes)][*, 2]];
 
  Applications can be written that take advantage of the conven-
  ience and matrix symbols of infix notation and the immediacy of
  postfix notation, all in the same file.
 
  Over 1,500 words exist as concrete examples of tasks in matrix
  analysis, signal processing, sound, voice, text manipulation,
  multitasking and networking.  Words for new applications can be
  written from existing words, using postfix or infix, and sourced
  from text files; or as new words in C or Fortran compiled into
  the program to work alongside existing native words.
 
Usage: 
  tops -h -i -l -p -v [-c sh] [-d /bin] [-u usrpath] [-s syspath] file
 
Arguments:
  -h    Display this message and halt
  -i    After start up, text read will be infix
  -l    Log file, /tmp/Txx.tops.log, not deleted (xx = Unix PID)
  -p    After start up, text read will be postfix (default)
  -v    Display the program version and halt
 
  -c    Name of the Unix shell program file (default sh)
  -d    Directory of the Unix shell program file (default /bin)
  -u    Define usrpath (default ./), the path to program user
          source files, such as: uboot.v, ukey.v
  -s    Define syspath, the path to program system source files,
          such as: boot.v, file.v, hash.v, key.v, sys.v, xterm.v
  file  Input file name (given last)
 
Argument Notes:
  Input file name is the last argument on the command line
  Runs interactively if last argument is not a file name
  Search path: present directory, then usrpath, then syspath
  File boot.v on the search path is required at program start up
  File uboot.v, if found, is run after boot.v for additional
     user-specific actions during program start up
  If -u is not given, environment variable TOPS_USRPATH is sought,
     pre-defined as in: export TOPS_USRPATH=/opt/tops/mytops/usr
  If -s is not given, environment variable TOPS_SYSPATH or a path
     defined at compile time is used

The preceding was obtained by running "tops -h" at the system prompt.

------------------------------------------------------------------------

The notes below show how to make the program from its tar file and run 
it, and how to install packages that can be used by the program.

Download the program from:

  http://savannah.nongnu.org/download/tops/

Browse CVS source files:

  http://savannah.nongnu.org/projects/tops

  This jumps directly to CVS and shows files sorted by date, latest on 
  top:

  http://savannah.gnu.org/cgi-bin/viewcvs/tops/tops/?sortby=date#dirlist


The following packages can be downloaded and used with the program:

   Fast Fourier Transform:
      FFTW: discrete fast Fourier transform
         http://www.fftw.org/fftw-2.1.3.tar (September 2001)

   Linear Analysis:
      Lapack: linear analysis of matrix equations; real and complex 
         matrix solution, real and complex eigenanalysis
         http://www.netlib.org/lapack/lapack.tgz (September 2001)

      Atlas: installation tool for Lapack
         http://www.netlib.org/atlas/atlas3.2.1.tgz (September 2001)

      SuperLU: sparse linear equation solution
         http://crd.lbl.gov/~xiaoye/SuperLU/superlu_2.0.tar.gz 
         (December 2003)

   Database:
      SQLite: 
         http://www.hwaci.com/sw/sqlite/download.html
         file sqlite-2.8.6.tar.gz (September 2003)

Notes on building libraries from these packages for use in this program
are given below.

------------------------------------------------------------------------

Putting the program on a machine.

CVS provides the latest version, while the tar file in the download 
directory can be months old.

1. Checking out the program from CVS.  Run this command in the directory
   that contains, or will contain, directory tops/:

    cvs -z3 -d:pserver:anonymous@cvs.sv.nongnu.org:/sources/tops co tops

   Later updating of changed files can be done with this command run in
   the directory that contains directory tops/:

    cvs -z3 -d:pserver:anonymous@cvs.sv.nongnu.org:/sources/tops update

   The update command will change files that have been updated.  If 
   files in src/ have changed, the program is recompiled by running 
   "make" (see step 3; running "make clean; make" will recompile all 
   files and is safest).

2. From tar file tops.tgz: 

   Place file tops.tgz in the directory that is to contain directory
   tops/, and untar the program:

      [user@host] /opt > tar -zxvf tops.tgz

   For versions of tar that do not work with zipped files (use gzip -d
   if gunzip is missing):

      [user@host] /opt > gunzip -c tops.tgz | tar xvf -

------------------------------------------------------------------------

Making the program and running it.

1. Go into the tops directory:

      [user@host] /opt > cd tops

2. A view of the files and directories within directory tops/ will 
   appear something like this:

      [user@host] /opt/tops > ls -F
      admin/      doc/         Makefile.ibm    src/     TODO
      apps/       LICENSE      Makefile.linux  sys/     tx/
      AUTHORS     Makefile     README          test/    usr/
      configure*  Makefile.hp  slice           timing/

3. Configuring a Makefile for your machine with minimal options involves
   running the configure script; then the program is created by running
   make:

      [user@host] /opt/tops > ./configure
      [user@host] /opt/tops > make

4. Immediately running the program:

      [user@host] /opt/tops > src/tops -s sys -u usr
               Tops 2.4.2
      Fri Dec 27 07:05:15 PST 2002
      [tops@host] ready > 

   At the ready prompt, type help for some notes on getting started;
   type exit, quit or bye or Ctrl-D to end.

   If the program fails to run in the window, try running under another
   terminal type such as XTERM, which should be selectable from a system
   menu (try right or left mouse button click).  

   If errors occur during start up, the start up log can be reviewed for
   faults:

      [user@host] /opt/tops > src/tops -s sys -u -usr
       Start up failed.  See log file: /tmp/T1692.tops.log
      [user@host] /opt/tops >

   The start up log echoes words being created and 'info:' milestones
   that show pertinent information as start up progresses; a successful
   start up ends with the line:

      info: start up complete

   If the start up log is not saved, -l forces it to be:

      [user@host] /opt/tops > src/tops -l -s sys -u -usr
       log file kept: /tmp/T1753.tops.log
      [user@host] /opt/tops >

   Note: If start up failed too soon, the message that the log file
   is kept may not appear; look in /tmp for T*tops.log.

5. Setting the environment.  

   When ./configure is run in step 3, the path to directory /sys will
   be embedded into source file src/sys.c and compiled into the pro-
   gram.

   To use a path name different from this, you can add environment 
   variable TOPS_SYSPATH to file .bashrc or .kshrc as shown next.

   The following lines in your .bashrc or .kshrc file run the program 
   from anywhere using a command called tops.  They also set environ-
   mental variables that the program will use for its paths syspath and 
   usrpath: 

      TOPS=/opt/tops # the directory of step 2

      export TOPS_SYSPATH=$TOPS/sys # system files for the program
      export TOPS_USRPATH=$TOPS/usr # your files for the program

      alias tops='$TOPS/src/tops' # running the executable file

   The program always looks for its files locally, then at TOPS_USRPATH,
   and finally at TOPS_SYSPATH.

   Later, you may want to change TOPS_USRPATH to another location, such
   as:

      export TOPS_USRPATH=/opt/mytops/usr # your files for the program

   to contain your modified .v files (taken from sys/ or from usr/) for
   using the program.  This will make them safe from being overwritten 
   when you install a later version of the program.  

   Alias tops shown above is unnecessary if root installs something like
   the following in a bin accessible to all users:

      [root@host] # ln -s /opt/tops/src/tops /usr/local/bin/tops

   which one can check for:

      [user@host] > which tops
      /usr/local/bin/tops

   For this to work, directory /usr/local/bin will have to be on your 
   PATH.  This is done with the following line in .bashrc or .kshrc:

      export PATH=$PATH:/usr/local/bin/

6. Making online documentation.  

   To create html documentation files, move to admin/ and run doc2html:

      [user@host] /opt/tops/admin > doc2html

   Doc2html will create html documentation in directory tops/doc, and a
   web browser can be used to view it by pasting the full path name for
   file doc/index.html into a browser 'Location:' window:

      file:/opt/tops/doc/index.html

   Documentation of each word is also available at the program's inter-
   active ready prompt using word man, in the form man xxx, as in:
   
      [tops@host] ready > man swap
       Entry for swap:
        swap (x y --- y x)
        exchange the topmost stack items
        synonyms: back, bob, duck, nod, rose
        related: over, pick, roll, rot, rev, depth
        category: stack operator
        defined: native word

   Documentation of each word includes its stack diagram, shown above
   as (x y --- y x) for word swap.  Stack items before firing a word
   are shown on the left side of the diagram--for this example of swap,
   y is topmost on the stack.  After firing swap (by typing swap and 
   pressing Enter), the right side of the stack diagram shows x is on 
   top of the stack.

   The Tab key can be used to fill out matches to partially typed words.
   When there is no unique match, pressing Tab again will show all the
   potential matches.  Here is a view of all words currently in the 
   program that start with letter r, by keying: man r Tab Tab

      [tops@host] ready > man r
       hints: rad/cyc rad/deg rake ram rand random random_text
         ranint ranreal rats reach readop4 real-imag recvec redraw
         refine refs remind remtab remtabf render reorder repeat
         replace replot reprint return return, rev revdate reversed
         revn rewind right rip rm rms roll rolldelta rose rot
         rotating rounded rows rss run runid runlevel running runt
         rview

7. Reading. 

   Files in TOPS_SYSPATH and TOPS_USRPATH are easily viewed from the
   interactive prompt (since the program will fill out the path):

      [tops@host] ready > vim file.v

   or

      [tops@host] ready > view file.v

   See boot.v for a summary of program hierarchy and files.

   Some Unix commands work from the ready prompt, like cd, cp, more, rm,
   ls (and variations on ls: ll and llr).

   File sys.v shows these words run by the program, and they serve as
   examples for writing other shell utilities for working interactively.

------------------------------------------------------------------------

Configuring Makefile.XXX.

   Makefile.XXX will need editing to include more features than are
   specified in the delivered files.

   For example, Makefile.XXX contains compiler switches and library 
   references (initially commented-out) for including libraries from 
   packages FFTW, Lapack, and SQLite.

   Installing these packages is described below. 

   Once a package is installed, the appropriate switches in Makefile.XXX
   can be set and './configure; make' run again from directory tops/.

------------------------------------------------------------------------

Below are notes for installing packages and building libraries for this
program.  

   I. FFTW and Lapack
   II. SQLite
   III. SuperLU
   IV. Parsing ANSI-compatible video terminal codes (Linux)

File admin/build_dep is being developed to automate installations. 
SQLite installation method Part B uses build_dep.

------------------------------------------------------------------------

I. FFTW and Lapack

   These notes show how to install FFTW, Lapack, and Atlas (a program 
   used in the compilation of Lapack).

   The installation process creates libraries for these packages that
   can then be included in this program by setting the appropriate 
   switches in Makefile.XXX.

   References for FFTW, Lapack, and Atlas:
      FTTW: http://www.fftw.org/fftw-2.1.3.tar
      Lapack: http://www.netlib.org/lapack/lapack.tgz
      Atlas: http://www.netlib.org/atlas/atlas3.2.1.tgz

   Here are the files of /usr/local/lib after making FFTW, Lapack, and
   Atlas using the steps given below (September 2001):

   [user@localhost.localdomain] /usr/local/lib > ll
   total 12807
   drwxr-xr-x   2 root     root         1024 Sep 28 21:12 ./
   drwxr-xr-x  12 root     root         1024 Sep 28 21:12 ../
   -rw-rw-r--   1 root     root      5011640 Sep 25 20:47 libatlas.a
   -rw-rw-r--   1 root     root       244700 Sep 25 20:38 libcblas.a
   -rw-rw-r--   1 root     root       336890 Sep 25 20:49 libf77blas.a
   -rw-r--r--   1 root     root       281916 Sep 28 21:12 libfftw.a
   -rwxr-xr-x   1 root     root          606 Sep 28 21:12 libfftw.la*
   -rw-rw-r--   1 root     root      6619622 Sep 25 20:49 liblapack.a
   -rw-r--r--   1 root     root       258682 Sep 28 21:12 librfftw.a
   -rwxr-xr-x   1 root     root          609 Sep 28 21:12 librfftw.la*
   -rw-rw-r--   1 root     root       293500 Sep 25 20:27 libtstatlas.a
   [user@localhost.localdomain] /usr/local/lib >

   And these additional files for FFTW land in /usr/local/include:
   [user@localhost.localdomain] /usr/local/include > ll
   total 20
   drwxrwxr-x   2 root     root         1024 Sep 12 12:48 ./
   drwxr-xr-x  12 root     root         1024 Sep 28 21:12 ../
   -rw-r--r--   1 root     root        12462 Sep 28 21:12 fftw.h
   -rw-r--r--   1 root     root         3764 Sep 28 21:12 rfftw.h
   [user@localhost.localdomain] /usr/local/include >

   Detailed steps for installing FFTW and Lapack.

   1. Installing FFTW library (Discrete Fourier Transform), to be used
   by native words in file fttw_driver.c.  File signal.v goes on to use
   these native words for signal processing.

   Here are the steps for making the library:

         ./configure --prefix=/path_where_install
         make
         make install

      If --prefix is not specified, the libraries will appear in
      /usr/local/lib (but must be logged in as root).

   2. Installing Lapack and Atlas libraries (in-core matrix utilities),
   to be used by words in essl.c and lapack.c.  

   Here are the steps for making the libraries:

      Step 1: building Lapack in /scratch.
         cd /scratch
         tar zxfv ~/packages/lapack.tgz
         cd LAPACK
         cp INSTALL/make.inc.LINUX make.inc
         make # takes 20 minutes to 2 hours depending on machine

         Produces:
            /scratch/lapack_Linux_XXX.a
         where XXX.a is a name you provide, like XXX.a=PII.a

      Step 2: building Atlas in /scratch.
         cd /scratch
         tar zxfv ~/packages/atlas/3.2.1.tgz
         cd ATLAS
         make # runs interactive config script

         Before running the make command from the completed config
         script, copy the Lapack library of step 1 to a directory
         under /scratch/ATLAS/lib/.  See details in file
         /scratch/ATLAS/doc/LAPACK.txt (line 16).

         Now run make:
         make install arch=Linux_PII # example of a make
                                     # command made by config

         When complete, lib files .a will be in
            /scratch/ATLAS/lib/PII

      Step 3: move the lib files from /scrach to /usr/local/lib and 
      they will be consistent with the names in Makefile.linux; 
      contents should look like the listing of /usr/local/lib shown 
      above.

------------------------------------------------------------------------

II. SQLite

   Part B shows a newer approach using admin/build_dep that supercedes 
   part A, which remains here just for its instructional value.

   A. These notes detail the installation of SQLite.  Part B shows a
   more recent approach that supercedes this part A.

   The download site for SQLite is:

      http://www.hwaci.com/sw/sqlite/download.html

   This latest version was downloaded in September 2003:

      file sqlite-2.8.6.tar.gz 831189 bytes, version 2.8.6 of CVS tree

   1. These are the steps, run by root, that install SQLite:

      /download # mkdir /usr/local/sqlite
      /download # mv sqlite-2.8.6.tar.gz /usr/local/sqlite
      /download # cd /usr/local/sqlite                    

      /usr/local/sqlite # tar -zxvf sqlite-2.8.6.tar.gz 
      /usr/local/sqlite # mkdir bld
      /usr/local/sqlite # cd bld

      /usr/local/sqlite/bld # /usr/local/sqlite/sqlite/configure
      /usr/local/sqlite/bld # make
      /usr/local/sqlite/bld # cd ../

      /usr/local/sqlite # ln -s /usr/local/sqlite/sqlite/src/ include
      /usr/local/sqlite # ln -s /usr/local/sqlite/bld/.libs/ lib

   2. Here is a view of completed directory /usr/local/sqlite:  

      [root@clacker] /usr/local/sqlite # ll
      drwxr-sr-x  3 root  root    4096 Sep 22 07:42 bld/
      lrwxrwxrwx  1 root  root      28 Sep 22 07:45 include -> 
         /usr/local/sqlite/sqlite/src/
      lrwxrwxrwx  1 root  root      27 Sep 22 07:47 lib -> 
         /usr/local/sqlite/bld/.libs/
      drwxrwxr-x  9 root  root    4096 Sep 22 08:48 sqlite/
      -rw-r--r--  1 root  root  831189 Sep 22 07:09 sqlite-2.8.6.tar.gz

   3. The following lines in this program's Makefile.* refer to the lib
   and include links created above.  They can be uncommented:

      SQLITE_LIB= -L/usr/local/sqlite/lib -lsqlite
      SQLITE_INC= -I/usr/local/sqlite/include                                 
   4. User file .bashrc needs a LD_LIBRARY_PATH.  The following shows 
   adding /usr/local/sqlite/lib to an existing LD_LIBRARY_PATH:

      export LD_LIBRARY_PATH=/home/user/mytops/txdir:/opt/tops/tops/tx/
      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/sqlite/lib/

   B. Building and installing SQLite using admin/build_dep.

   From directory tops/, build_dep is used to build SQLite and install 
   it into /usr/local/sqlite-3.0.7.  It uses the "su -c" command to do 
   the make install step, so you'll be prompted for root password.  

   Alternatively to install into a directory where you don't need root 
   privileges to write into, just replace "/usr/local" with the base 
   directory, i.e. "/home/al" would mean SQLite will go into 
   /home/al/sqlite-3.0.7. 

   This will take a few minutes to build SQLite:
      /opt/tops % admin/build_dep sqlite /tmp /usr/local

   Root creates a symbolic link to the sqlite3 executable:
      # ln -s /usr/local/sqlite-3.0.7/bin/sqlite3 /usr/local/bin/sqlite

   User file .bashrc needs a LD_LIBRARY_PATH.  The following shows 
   adding an SQLite path to an existing LD_LIBRARY_PATH:

     export LD_LIBRARY_PATH=/home/user/mytops/txdir:/opt/tops/tops/tx/
     export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/sqlite-3.0.7/lib

   Tweak SQLite stdout format by setting .sqliterc values (optional):
      % echo ".header on"   >  ~/.sqliterc
      % echo ".mode column" >> ~/.sqliterc

   Here is a script to create a simple database:
      # create a simple database
      rm -f test.db
      echo "create table t(a text, b integer);"      | sqlite test.db
      echo "insert into t values ('cat', 'felix');"  | sqlite test.db
      echo "insert into t values ('dog', 'scooby');" | sqlite test.db

      # show all the values:
      echo "select * from t;"                        | sqlite test.db

   The script should give the following output:
      a           b
      ----------  ----------
      cat         felix
      dog         scooby

   Edit tops/Makefile.linux so that it includes SQL references:
      Append switch -DSQLITE to the list with C_COMOPTS

      and set these:

         SQLITE_LIB= -L/usr/local/sqlite-3.0.7/lib -lsqlite3
         SQLITE_INC= -I/usr/local/sqlite-3.0.7/include

   Build tops again, and things are ready to go with SQLite:
      /opt/tops % make clean; make

------------------------------------------------------------------------

III. SuperLU

   These notes detail the installation of SuperLU.

   The download site for SuperLU is:
         http://crd.lbl.gov/~xiaoye/SuperLU/superlu_2.0.tar.gz 
         (December 2003)

   Running admin/buildsu will download the SuperLU tar file and build 
   the SuperLU library in /tmp.

   Root copying /tmp/superlu to /usr/local/ will make available the
   library and include files required by this program's Makefile.XXX
   files.  

   Here are the files at /usr/local in superlu/lib and superlu/include:

   [root@clacker] /usr/local/superlu/lib # ll
   drwxr-sr-x    2 root     root         4096 Dec 20 09:54 ./
   drwxr-sr-x    4 root     root         4096 Dec 20 09:53 ../
   -rw-r--r--    1 root     comm       443502 Dec 20 09:41 libsuperlu.a

   [root@clacker] /usr/local/superlu/include # ll
   drwxr-sr-x    2 root     root         4096 Dec 20 09:54 ./
   drwxr-sr-x    4 root     root         4096 Dec 20 09:53 ../
   -rw-r--r--    1 root     comm         4762 Dec 20 09:41 Cnames.h
   -rw-r--r--    1 root     comm         2485 Dec 20 09:41 colamd.h
   -rw-r--r--    1 root     comm         9819 Dec 20 09:41 csp_defs.h
   -rw-r--r--    1 root     comm         1606 Dec 20 09:41 dcomplex.h
   -rw-r--r--    1 root     comm         9710 Dec 20 09:41 dsp_defs.h
   -rw-r--r--    1 root     comm         1536 Dec 20 09:41 scomplex.h
   -rw-r--r--    1 root     comm         9635 Dec 20 09:41 ssp_defs.h
   -rw-r--r--    1 root     comm         5859 Dec 20 09:41 supermatrix.h
   -rw-r--r--    1 root     comm         3385 Dec 20 09:41 util.h
   -rw-r--r--    1 root     comm        10138 Dec 20 09:41 zsp_defs.h

   Then it is simply a matter of uncommenting the SuperLU library file
   and include file references in Makefile.XXX and adding the -DSUPER 
   switch to the list of compiler options, C_COMOPTS, and then running
   "make clean;make."

------------------------------------------------------------------------

IV. Parsing ANSI-compatible video terminal codes

   A finite state machine for parsing ANSI escape and control sequences
   is presented in the following: 

      http://www.vt100.net/emu/dec_ansi_parser ,

   and an implementation in C is in the following public domain file:

      http://www.vt100.net/emu/vtparse.tar.gz .

   A copy of vtparse.tar.gz (4763 bytes), with source files dated 
   Sep 10, 2005, is contained in usr/telnetd.  It requires Ruby to
   create a parse tables file, vtparse_table.c, prior to compiling.

   Here is an example of building the vtparse library used by this pro-
   gram under the -DVT compiler switch (but see Update below):

     /usr/local # tar -zxvf vtparse.tar.gz
     /usr/local # mv vtparse.tar.gz vtparse
     /usr/local # cd vtparse
     /usr/local/vtparse # make
     /usr/local/vtparse # gcc -c vtparse.c vtparse_table.c
     /usr/local/vtparse # ar -crs libvtparse.a vtparse.o vtparse_table.o

   Place the following in the relevant tops/Makefile.XXXX:

      VTPARSE_LIB= -L/usr/local/vtparse -lvtparse
      VTPARSE_INC= -I/usr/local/vtparse

   and specify compiler switch -DVT (or -DVTAIX for ibm).

   Update. 
   For portability, untarred copies of files after Ruby processing are 
   included in usr/telnetd, and it is not necessary to build vtparse in
   /usr/local.  An alternate procedure for building the vtparse library
   for the program is as follows:  

      [user@host] /opt/tops > cd usr/telnetd
      [user@host] /opt/tops/usr/telnetd > make_lvtparse
      [user@host] /opt/tops/usr/telnetd > ls *.h lib*
      libvtparse.a  vtparse.h  vtparse_table.h

   After running make_lvtparse, command ls shows that the required .h 
   include files and library file libvtparse.a are present.  References
   to these are made in tops/Makefile.XXXX as follows, using the path 
   to this point relative to the compilation directory tops/src:

      VTPARSE_LIB= -L../usr/telnetd -lvtparse
      VTPARSE_INC= -I../usr/telnetd

   and compiler switch -DVT (or -DVTAIX for ibm) is specified.

------------------------------------------------------------------------
