6 using command files – Compaq DEC Text Processing Utility AA-PWCBD-TE User Manual
Page 124
DEC Text Processing Utility Program Development
5.6 Using DECTPU Startup Files
In EVE, the code that implements the initialization sequence calls
TPU$LOCAL_INIT before executing your command or initialization files. EVE
defines this procedure but leaves it empty. The user can use this procedure
in a command file to contain DECTPU statements that implement private
initializations.
You can see the code that implements TPU$LOCAL_INIT in EVE in
SYS$EXAMPLES:EVE$CORE.TPU.
A section file that implements a layered application should assign values to the
following special variables in the procedure TPU$INIT_PROCEDURE:
•
TPU$X_MESSAGE_BUFFER or MESSAGE_BUFFER
•
TPU$X_SHOW_BUFFER or SHOW_BUFFER
•
TPU$X_SHOW_WINDOW or INFO_WINDOW
If you write a section file that extends the EVE section file, EVE provides six
variables (three pairs of synonyms) to be used by layered applications. Although
DECTPU automatically declares the variables, the application must assign a
value to one of the synonyms in each pair. If you choose to write your own
application, your application must contain these structures and procedures.
Table 5–2 shows the names and uses of these variables.
Table 5–2 Special DECTPU Variables That Require a Value from a Layered Application
Recommended Name
Synonym Provided
for Backward
Compatibility
Data Type
Structure
How DECTPU Uses the Variable
TPU$X_MESSAGE_
BUFFER
MESSAGE_BUFFER
Buffer
DECTPU writes messages in this buffer. If the
MESSAGE_BUFFER is associated with a window
that is mapped to the screen, DECTPU updates the
window. If the application does not assign a buffer
to this variable, DECTPU writes messages to the
screen.
TPU$X_SHOW_
BUFFER
SHOW_BUFFER
Buffer
DECTPU writes information stored by the SHOW
built-in in this buffer.
TPU$X_SHOW_
WINDOW
INFO_WINDOW
Window
DECTPU displays information stored by the SHOW
built-in in this window.
If you want to use the SHOW built-in procedure in your application, you must
create these special variables that DECTPU uses for SHOW.
5.6.6 Using Command Files
A command file is a DECTPU source file that can contain procedures, key
definitions, and other DECTPU executable statements. You can have any number
of command files in your directory. You might want to write one command file
that customizes your editor for programming in Pascal, another command file
that customizes your editor for text editing, and so on. If you have several
command files, give them names that remind you of their contents. If you have
one command file that you use most of the time, name it TPU$COMMAND.TPU.
The command to invoke DECTPU with a command file is:
$ EDIT/TPU/COMMAND [[= filespec]]
5–24 DEC Text Processing Utility Program Development