![]() |
![]() |
|
|
![]() |
![]() |
MPE/iX Developer's Kit Reference Manual Volume 2: HP 3000 MPE/iX Computer Systems > Chapter 3 TERMINFO Database![]() TERMINFO Source File |
|
One or more devices are described in a TERMINFO source file. This section describes the contents of the source file. Each device entry in the TERMINFO source file has the following format:
The first line in the device description is called the header; it must start in column one of the file. The header contains the commonly-used aliases for the device being described and the full name, which by convention appears last on the line. The environmental variable TERM can be set to any one of the terminal aliases. Each name is separated by a vertical bar, (|). The aliases must be unique in the database. They must follow normal MPE/iX HFS naming conventions (avoid a hyphen in the alias name as it is used to append a suffix as described below). All lines in the file must end with a comma (,). A sample header of the model 33 teletype follows:
A special convention exists for naming terminals that have special hardware modes or user preferences (for example, a VT-100 with 132 columns). Attach a suffix to the alias name with a hyphen, as shown in the following example.
More than one suffix can be used by concatenating them together. When using multiple suffixes, repeat the alias with the suffixes in the opposite order so the user does not have to remember which is the correct order. The following example shows a terminal in wide mode with no automatic margins:
The suffix conventions used are shown in Table 3-1 “Suffixes for Mode and User Preferences”. Table 3-1 Suffixes for Mode and User Preferences
After the header come the descriptions of the capabilities, separated by commas (white space after the comma is ignored). Each line after the header is indented one or more spaces or tabs. An example that shows the syntax of the capabilities segment of the file follows:
There are three types of capabilities: Boolean, numeric, and string. The first line in the example shows Boolean capabilities; the second line shows numeric capabilities; and the third shows string capabilities. The Boolean capabilities indicate the presence or absence of a capability. They take no arguments. The terminal in the example has automatic margins (am)and uses the XON/XOFF handshaking protocols (xon). The numeric capabilities show size, spacing, or some other measurement. The capability is followed immediately by a pound sign (#) character and a positive integer. The terminal in the example has a screen with 80 columns (cols#80) and tab stops initially set to every 8 characters (it#8). The string capabilities describe a terminal operation. The capability is followed immediately by an equals sign (=), and the string that performs the operation. The terminal in the previous example beeps the terminal when sent a ^G sequence, performs a carriage return when sent a return character, moves the cursor down a line when sent a newline character, and scrolls forward from the bottom line of the screen when sent a newline character. (Control characters are entered in the device description as a caret (^), followed by a letter, as opposed to entered as the actual control character.) Padding is used to delay further output to terminals that need extra time to process the current command. Some terminals use the XON/XOFF protocol instead of padding to tell the sending computer not to send the next command until the terminal is ready to receive it. Padding can still be used with the XON/OFF protocol so that programs can calculate the speed of functions. Padding can be specified for all string capabilities with the exception of input capabilities (names preceded with key_). Padding is specified by a dollar sign ($) followed by a number enclosed within angle brackets (for example, $<15>). A forward slash (/) after the number specifies that padding is mandatory; that is, it should be applied regardless of the XON/XOFF setting. An asterisk (*) after the number specifies proportional padding; that is, it is applied to each line affected. The syntax of padding specifications is summarized in Table 3-2 “Syntax of Padding Specifications”. Table 3-2 Syntax of Padding Specifications
Strings that require run-time parameters are described using printf-like escapes (%x). Calculations are done on a stack using Reverse Polish Notation. Parameters are pushed onto the stack, manipulated in some way, and a result is output. The left-most operators are pushed first; for example, to subtract 10 from the first parameter, you would use:
A complex example that describes cursor movement for the Wyse-50 follows:
This parameterized string is described in Table 3-3 “Explanation of Parameter Description”. Table 3-3 Explanation of Parameter Description
The stack operators are defined as follows:
The following example describes more complex cursor movements using some of the stack operators described previously. For example, the hp2392a terminal needs to be sent the column before the row for cursor addressing. See Table 3-4 “hp2392a Terminal Cursor Movement” following the example for a complete explanation.
Table 3-4 hp2392a Terminal Cursor Movement
The following is an example of a cursor movement string for the ANSI terminal. The explanation of each argument is shown in Table 3-5 “ANSI Terminal Cursor Movement”.
Table 3-5 ANSI Terminal Cursor Movement
|
![]() |
||
![]() |
![]() |
![]() |
|||||||||
|