contents.gifprev1.gifnext1.gif

Startup Process

This section outlines the startup process for the nu/TPU engine, the si interface, and the EVE interface. This information is helpful when building TPU editing extensions that include initialization phases.

nu/TPU Engine:

nu/TPU engine is loaded.

Load defaults file.

Verify license file value.

Load command line switch values.

Load environment variable values.

Load keyboard file.

Load section file, if any.

Execute DEBUG file, if any.

Call TPU$INIT_PROCEDURE.

Execute command file source code, if any.

Call TPU$INIT_POSTPROCEDURE.

Enter nu/TPU main process input loop.

Procedure calls when the si Interface is loaded: (section file: si.sec)

Call TPU$INIT_PROCEDURE.

Call SI$INIT_VARIABLES.

Initialize all global variables.

Call SI$INIT_SESSION.

Call SI$INIT_TERMINAL. # Define terminal.

Call SI$INIT_BUFFERS. # Define systems buffers.

Call TPU$LOCAL_INIT.

Call TPU$INIT_POSTPROCEDURE.

Execute command in initialization file, if any.

Procedure calls when the EVE Interface is loaded: (section file: si.sec)

nu/TPU engine is loaded.

Call TPU$INIT_PROCEDURE.

Call EVE$INIT_PROCEDURE.

Call EVE$$INIT_VARIABLES.

Call EVE$$INIT_SETTINGS.

Call EVE$$PRE_INIT_MODULES.

Includes user-defined pre-init modules.

Call EVE$$INIT_MODULES.

Call EVE$$RESTORE_SETTINGS.

Call EVE$SET_SECTION_PREFERENCES.

Call TPU$LOCAL_INIT.

Call TPU$INIT_POSTPROCEDURE.

Call EVE$INIT_POSTPROCEDURE.

Execute command in initialization file, if any.

Create default buffer.

Adding End Users’ Extensions

The TPU$LOCAL_INIT procedure is an empty procedure in the si and EVE interfaces. It is called after the main interface initialization process is completed, thus allowing the end users’ definitions to supersede.

Help Information

The nu/TPU help system includes on-line help documentation for all built-in procedures, si and EVE commands, dynamic keypad help for editing keys, the TPU language, and general information on the nu/TPU product. The files that contain the help system information are in the nu_tpu/common directory. The *.hlb files are ASCII files containing the help text descriptions. The *.idx files are indexes to the text description files, created by the makehelp utility. The makehelp utility is provided for the nu/TPU end user that wishes to modify the nu/TPU help information.

Syntax

Each help entry must begin with a form-feed character and carriage re- turn, ASCII values 12 and 13 respectively. The next line is the unique help entry index name, starting in the first column, followed by a carriage return. The help index name is usually the command name being described. The index name may be multiple works connected by underscored characters.

BOTTOM

CENTER_LINE

CREATE_KEY_MAP “line_numbers”; !Turn on line#s

[“OFF”]: bol_string := “”; !Turn off BOL prefix

endcase;

set (BOL_TEXT, current_buffer, bol_string);

ENDPROCEDURE

Help text entries do not have to be alphabetical. Below, help text is added to the end of the si.hlb  file:

BOL_TEXT (bol_string)

SYNTAX: BOL_TEXT string

DESCRIPTION

The BOL_TEXT command allows the user to add a prefix to the

display of each line of text for a specific buffer. Two BOL_

STRING values have special meaning. “OFF” terminates the

current prefix display value. “ON” displays the buffer

record for each line.

EXAMPLE

To display buffer record numbers:

bol text ON

result: 000001 First line of text

000002 Second line of text

000003 Last line of text

After the help text file modifications are complete, run the makehelp utility to regenerate the help index file. See the makehelp syntax earlier in this section.

Executing the following statement in si interface will display the new help entry.

help_text (“si”, “BOL_TEXT”, OFF, HELP$BUFFER);

Keyboard Files

The main function of the nu/TPU keyboard file is to associate a keyboard press to an edit function. The assignment is accomplished by mapping an escape sequence, scan code, or key code to a nu/TPU keyname. Non-typewriter section keys must be mapped in the keyboard file for use with the keypad help as well as nu/TPU as a whole. For specifics on how nu/TPU keynames are assigned, see Keyboard File in the nu/TPU Files section.

Keyboard Help Diagram

All keyboard files supplied with nu/TPU contain an image of the physical layout of the key locations. The keyboard image usually shows the edit and numeric keypads, cursor keys, and the function key definitions listed to the left. The keypad image may take any form to display desired keys. The user is free to modify the keyboard images while following the keypad help diagram syntax rules below. The keyboard image is only provided as a visual guide to edit functions.

Interactive help information is available for all keys, not just those included in the keyboard image.

Keyboard Help Diagram Syntax Rules

The first line of the keyboard image in the nu/TPU keyboard file must be the keyword HELP_KEYPAD followed by a colon and the number of lines included defining the keyboard image.

Each keyname must be proceeded by a tilde (˜) or a circumflex (^) character followed by a space. All other characters will be included as part of the diagram text for the keyboard image.

The tilde (˜) indicates the comment location for the keyname it proceeds.

The circumflex (^) indicates the comment location for the shifted or gold key definition of the keyname it proceeds.

The keypad comment text for each key is extracted from the comment description for the key definitions in the active key-map and key-map-list combination. The comment description is provided through the third parameter of the DEFINE_KEY built-in procedure. Only the first six characters from the comment text are displayed.