NAME
  tpu - a port of Digital's Text Processing Utility by a/Soft Development,
  Inc.

SYNOPSIS
          # setup tpu

          # tpu [-options] [filename]

OVERVIEW

  nu_tpu (aka tpu) is a programming language designed to emulate the DECTPU
  programming language.  It is a language specifically designed for writing
  editors.  It is *not*, by itself, an editing interface.

  The nu_tpu product is delivered with two editing interfaces -- that is,
  nu_tpu comes with two editors written in the nu_tpu programming language:

  SI   the Simple Interface

  eve.sec
       an interface compatible with EVE from VMS V5.4 at the callable EVE
       procedure level

  The best documentation on tpu programming is the EVE source code itself,
  available in the directory ${TPU_DIR}/nu_tpu/eve.  The build.tpu file, in
  particular, is very useful in understanding the details of putting together
  your own editing interface.

  The TPU_SECTION_FILE environmental variable may be used with the Fermi
  installation of nu_tpu to determine the section file to be used.

ADDITIONAL DOCUMENTATION

  The $TPU_DIR/html directory contains the full user guide and all the docu-
  mentation for the TPU editor and their EVE interface.

OPTIONS

  -command
       The -command switch is used to determine whether a file containing
       nu_tpu code is compiled and executed prior to starting the edit ses-
       sion.  The resulting executable code is layered on top of the current
       section file definitions.  Command files can be used for startup pro-
       cessing, but they are not exectued as fast as precompiled section
       files.  A section file or a sommand file must be used to startup a
       nu_tpu edit session.

       nu_tpu will look for the default command file tpuini.tpu in the nu/tpu
       common directory.  To avoid looking up a command file, use the -nocom-
       mand switch. If a command file is requested but cannot be found, the
       session will continue to process as if the command file was not
       the operating system.

       Example: the following prohibits the creation of a new login file.  If
       the file exists, it may be updated.
               # tpu -nocreate login

  -debug
       The -debug switch determines whether nu_tpu uses the debugger to load,
       compile, and exectue the contents of the debugger file.  If -debug is
       specified, the debugger file is processed prior to the
       TPU$INIT_PROCEDURE and any command file.

       Example: the following loads and exectues the nu_tpu debug file my.bug
       during the editor startup process.
               # tpu -debug=my.bug my.tpu

  -display
       The -display switch determine shether nu_tpu will make use of the
       screen management facility and keyboard.  By default, nu_tpu sessions
       will display the edit session to the screen and accept input from the
       keyboard.

       The -nodisplay switch is convenient for developing nu_tpu code for
       batch processing.  nu_tpu update stremas can run stand-alone or as
       part of a batch process.  Error messages will be generated if screen
       or window management built-ins are called when using nodisplay mode.

       Example: the following will run an update stream with no screen I/O.
               # tpu -nodisplay -nosection -command=custom.tpu

  -environment
       The -environment switch shows the settings for the current command
       switches and then exits the session. An editing interface cannot be
       run when the -environment switch is specified.  The switch values
       displayed are the result of the environment variables, defaults file
       settings, and any switch values defined on the command line.  The com-
       mand line values always supersede the defaults file settings.

       Example: examine the settings from the active defaults files:
               # tpu -environment

  -help
       The -help command line switch provides and on-line listing of the com-
       mand line switches and the required syntax.  If a command line con-
       tains an invalid switch or invalid syntax, nu_tpu will perform as if
       the -help switch was issued.  After the command list is provided,
       nu_tpu will exit back to the operating system command line.

       Example: display the command line options on the screen.
               # tpu -help

  -initialization

       By default, nu_tpu edit sessions will create a journal file with the
       filename nu_tpu.tjl.  The default filename may be overridden by pro-
       viding journal file specifications with the -journal switch.  The
       journal file is created in the current directory unless a directory
       path is provided as part of the journal filename.  Keystroke journal-
       ing is turned off with the -nojournal switch.

       Example: the following edit session will use the default journal file
       process.  The journal file will be named myfile.tjl:
               # tpu -journal=myfile.tjl myfile

  -modify
       The -modify switch determines if the initial user buffers created for
       the edit session can be modified. It only controls the ability to
       update the initial user buffers created during the edit session.  The
       editing interface is responsible for controlling the ability to modify
       additional buffers.

       Example: start the tpu editor with a non-modifiable buffer:
               # tpu -nomodify myfile.txt

  -output
       The -output switch determines whether the initial user buffer can be
       written to a file and the filename it is written to.  It will only
       affect the main buffer.  The editing interface must control the
       assignment of output filenames and the output status of subsequent
       buffers.

       Example: save the contents of my-file.dat by writing the changes to
       revised.txt in the current directory:
               # tpu -output=revised.txt myfile.dat

  -read_only
       The -read_only switch determines if the contents of the main buffer
       are used to create a file if the buffer has been modified.  If
       -read_only is specified at the command line, the modified contents of
       the first buffer cannot be written to disk.

       Example: edit the login file as read_only:
               # tpu -read_only login

  -recover
       The -recover switch determines whether nu_tpu will process keystrokes
       from a journal file at the beginning of the editing session.  Success-
       ful termination automatically deletes open journal files.

       It is very important that all files used during the editing session be
       restored to their original state before recovering with a journal
       file.  If the file contents have changed, using the journal file may
       not yield the desired results.  It is also important that the editing
       environment be duplicated.  The window size, tabs settings, margins,
       The TPU_SECTION_FILE environmental variable may be set to the full
       name (path and filename) of a section file to use.  The commandline
       switch will always take precedence over the environmental variable.

       Only files created with the built-in procedures SAVE can be used with
       the -section switch.  Section files for nu_tpu as delivered from the
       vendor are located in the $TPU_DIR/nu_tpu/common directory (SI inter-
       face) and $TPU_DIR/nu_tpu/eve directory (EVE interface).

       If you have setup tpu, the default editing interface is the SI (Simple
       Interface).  An EVE interface compatible with VMS V5.0 EVE at the EVE
       procedure level (not at the TPU code level) is also available via the
       command
               # eve filename
         or
               # tpu -section=$TPU_DIR/nu_tpu/eve/eve.sec filename
         or
               # setenv TPU_SECTION_FILE $TPU_DIR/nu_tpu/eve/eve.sec
               # tpu filename

       If you have setup fermitpu, the TPU_SECTION_FILE will be set to the
       fermitpu default, which is the EVE interface from VMS V6.1, with the
       EDT-style keypad as the default keypad.

       Example: use your own private section file named my.sec.sec in the
       current default directory to edit the file xyzzy:
               # tpu -section=$HOME/my.sec xyzzy
        or
               # TPU_SECTION_FILE=$HOME/my.sec; export TPU_SECTION_FILE
               # tpu xyzzy

       Use the [default nu_tpu] SI section file:
               # setup tpu
               # tpu xyzzy     ! only if $TPU_SECTION_FILE is undefined
        or
               # si xyzzy      ! reliable always
        or
               # tpu -section=${TPU_DIR}/nu_tpu/common/si.sec xyzzy
        or
               # setenv TPU_SECTION_FILE $TPU_DIR/nu_tpu/common/si.sec
               # tpu xyzzy

       Use the VMS V5.0 EVE-compatible section file:
               # setup tpu
               # eve xyzzy
        or
               # tpu -section=${TPU_DIR}/nu_tpu/common
        or
               # setenv TPU_SECTION_FILE $TPU_DIR/nu_tpu/eve/eve.sec
               # tpu xyzzy

  -start_position

       Using the -nowrite switch prevents the main buffer from being altered.

       Example: prevent the contents of test.code from being written:
               # tpu -nowrite test.code

ENVIRONMENTAL VARIABLES

  nu_tpu will use the following environment values:

  HOME The HOME variable tells nu_tpu where the user's home directory is
       located on the system.  The value of the HOME variable is used when
       locating the nu_tpu defaults file.

  KEYBOARD
       The KEYBOARD variable tells nu_tpu which keyboard driver to use.
       nu_tpu must have the correct keyboard driver active for editing keys
       to be assigned properly. a/Soft's preconfigured keyboard drivers are
       located in the ${TPU_DIR}/nu_tpu/dev directory.  The KEYBOARD variable
       will override the KEYBOARD settings in the nu_tpu defaults files.

  SHELL
       The SHELL variable tells nu_tpu what operation is used with the SPAWN
       command.

  TERM The TERM variable tells nu_tpu what terminal is being used.  This
       variable is normally set by the system administrator during installa-
       tion and never needs to be reset.

  TPU_DEFAULTS_FILE
       The TPU_DEFAULTS_FILE variable tells nu_tpu where to perform its ini-
       tial search for the nu_tpu defaults file.  If TPU_DEFAULTS_FILE is not
       specified, nu_tpu looks first in the user's home directoryu then in
       the ${TPU_DIR}/nu_tpu directory.

  TPU_HOME
       The TPU_HOME variable tells nu_tpu the starting point in the directory
       tree to find its supporting directories and files.

  The fermi implementation of tpu will also use the TPU_SECTION_FILE environ-
  mental variable.

BUILDING YOUR OWN SECTION FILE

  Instructions for building your own section file are included in the man
  page for fermitpu.

SOME DISCLAIMERS

  NOTE: nu_tpu *claims* to use the HOME environmental variable, but I haven't
  been able to figure out how to get it to work.  The section file specifica-
  tion given in the TPU_DEFAULTS_FILE evidently must include a full path
  seems to be a bug.  Therefore, backups have been set to 0 in the default
  Fermi implementation.

  None of the BOX routines (BOX COPY, BOX CUT, BOX SELECT, BOX INSERT, etc.)
  work properly.  Don't use them.

  tpu v5_0 (at least) does NOT produce good code when compiling on OSF1.
  This problem is fixed in tpu v5_0a.  Do NOT build section files on OSF1
  unless you've upgraded to tpu v5_0a.

ADDITIONAL INFORMATION OF SOME POSSIBLE USE

  See the $TPU_DIR/README file for lots of details from a/Soft on glitches,
  gotchas, and known bugs and limitations.

  The $TPU_DIR/html directory contains the full documentation as supplied by
  a/Soft.