Terminals Under the UNIX Operating System
BBj-Specific Information
In BBj, realname is ignored, and the terminal on which BBj is invoked is used as the device to which the terminal alias is opened.
PRO/5-Specific Information
On invocation, PRO/5 will first attempt to determine if it is attached to a terminal. If it is, PRO/5 will get the terminal name and scan the ALIAS lines read from the config.bbx file, attempting to match the realname field. When PRO/5 has a match of the terminal name from the system and a realname from an ALIAS line, the bbxname is remembered and used as the device for the FID(0). For users with unusual configurations, all of the searching may be overridden using the "BBTERM=" environment variable. This variable, if set, overrides the terminal name lookup and makes PRO/5 open the aliased device named in the "BBTERM=" variable. For example, BBTERM=T0 forces PRO/5 to open the device on the line beginning with ALIAS T0 .
If PRO/5 cannot find an alias line fitting your terminal after reading config.bbx, it will use a device named "IO" for your channel 0 device. This is a device always present in PRO/5. Opening and reading the "IO" device is a direct attachment to your stdin and stdout handles. Remember that the "IO" device is not a terminal and will not translate mnemonics sent to it, nor will it report the same information in the FIN(0) that a terminal will. This can cause some interesting problems in starting software on a terminal running as "IO." These problems normally show up as reports of "garbage on the screen" or !ERROR=41 after starting your application.
All terminals used in PRO/5 are defined in the config.bbx file using an ALIAS line in the following form:
alias bbxname realname type modes
Parameter |
Description |
|
alias |
Identifies the following information as an alias (i.e., bbxname is an alias for realname). |
|
bbxname |
Refers to the name of the terminal. PRO/5 terminal names are normally in the range of 'T0'..'T9', 'TA'..'TZ'. Some application code may expect terminals in the range 'T0'..'T99'. All terminal names in PRO/5 start with the letter "T." For TCP/IP and UDP sockets, the bbxname must begin with "N". |
|
realname |
Must be the UNIX operating system name of the terminal device, such as "/dev/tty00" or "/dev/console." For TCP/IP and UDP sockets, use "tcp" or "udp", respectively. tty The name of the terminal device should come back. If an error message, such as "not found" is printed, then try the command: who am I This command will indicate which terminal device you are using. |
|
type |
Refers to the entry in the termcap file you wish to reference for this terminal device. If you are unfamiliar with termcap file usage, see Introduction to Termcap in the User's Reference Guide. TERM=vt100; export TERM If your UNIX OS shell is /bin/sh or setenv TERM vt100 If your UNIX OS shell is /bin/csh The install utility will automatically set your terminal type to "term" causing PRO/5 to use the TERM= environment variable. If you wish to force a particular type in the config.bbx file, you will have to edit the config.bbx file. echo $TERM |
|
modes |
Specifies additional information about the terminal device. |
|
|
Mode |
Description |
|
keywait=int |
The KEYWAIT mode may be defined for a terminal working in an environment where the input stream is subject to random delays. If a system places a delay between two characters randomly, the delay will eventually be placed between two characters sent by a function key. Because PRO/5 uses timing in determining when a character is part of a function key transmission, the random delay could make PRO/5 decide that the input is not a function key, and thus not perform a translation. |
|
k0 |
This is given for terminals whose function keys are described such that the termcap 'k0' entry is really function key 1. In this instance, you should place the entry 'K0' into the modes field. (See the Termcap Technical Reference Overview in the User's Reference Guide for further detail.) |
|
abort=nn |
This defines the signal that generates the abort signal. PRO/5 attempts to map this character out of range. In general, character 00 or 0F will prevent a user from generating this signal. However, there is no way for PRO/5 to know in advance which character is out of range. This mode allows you to define it. |
Example
alias T1 /dev/tty1a wy60 k1,keywait=3