Compaq AA-PWCBD-TE Computer Accessories User Manual


 
DEC Text Processing Utility Program Development
5.6 Using DECTPU Startup Files
For example, to add a program called MY_CUSTOMIZATIONS.TPU to the EVE
section file, you would enter the following:
$ EDIT/TPU/SECTION=EVE$SECTION/COMMAND=my_customizations.tpu
This command causes DECTPU to load the EVE section file and then read,
compile, and execute the command file you specify. A new section file is created.
The new file includes both the EVE section file and the binary form of your
program. The section file is written to the file you specified as the parameter to
the SAVE statement in your program. To use the section file, invoke DECTPU,
specifying your section file.
For more information on invoking DECTPU, see Chapter 2.
For more information on extending the EVE section file, see the Extensible
Versatile Editor Reference Manual.
5.6.5.3 Sample Section File
If you choose to design an application layered on DECTPU and not layered on
EVE, you must provide certain basic structures and key definitions to be able to
use the DECTPU compiler and interpreter. Example 5–5 is a sample of the source
code that creates a minimal interface. It provides the following basic structures:
A buffer and a window for DECTPU messages
A buffer and a window for information from the SHOW built-in procedure
A buffer and a window in which to enter DECTPU programs or text
A prompt area in which to enter DECTPU commands
Because DECTPU does not have any keys defined when invoked without a section
file, the sample program also contains the following key definitions:
Return key
Delete key
Key for exiting from DECTPU
Key for entering DECTPU statements (Example 5–5 uses the Tab key)
By default, DECTPU looks for TPU$INIT_PROCEDURE, so the statements
that create the structures for a minimal interface are contained in TPU$INIT_
PROCEDURE. Individual statements that define keys come after any procedures
in the file.
If you entered the text from Example 5–5 into a file named MINI.TPU and you
want to compile that file into a section file, enter the following command:
$ EDIT/TPU/NOSECTION/COMMAND=MINI.TPU
In the previous example, the /NOSECTION qualifier specifies that DECTPU does
not read a section file. This ensures that none of the procedures or variables
from an existing section file are loaded into the internal DECTPU tables.
The /COMMAND qualifier specifies that DECTPU compiles the command file
MINI.TPU. The SAVE built-in procedure at the end of the command file specifies
that all of the procedures, variables, and key definitions in the file are to be
saved in binary form in SYS$LOGIN:MINI.TPU$SECTION. The QUIT built-in
procedure then causes you to leave DECTPU.
Example 5–5 contains the source code for a command file that you can use for a
minimal interface to DECTPU.
DEC Text Processing Utility Program Development 5–21