C. Writing Termcap Descriptions : Supplied Termcap File : Format of a Termcap Description : How Capabilities of the Terminal Are Specified in a Termcap Description
Share this page                  
How Capabilities of the Terminal Are Specified in a Termcap Description
Capabilities are designated by commands, which must be separated by colons. All commands are two letters long. String and numeric commands are followed by additional information that is read by the forms system. The three types of commands are:
Strings contain sequences of characters. The command must be followed by an equal sign. For example, up=\EA indicates that the command up (which stands for the sequence to move the cursor up) is set to the sequence Escape-A.
Some string commands can be preceded by a time delay, which is referred to as padding. Padding may be required by older, slower terminals (such as the HDS AVT), which require a delay to execute some screen commands, such as clearing the screen. Padding ensures that the terminal has time to execute those commands without losing characters. Modern terminals and terminal emulators will almost never require padding.
The two types of padding are nonproportional (or straight) padding, and proportional padding (to the number of lines affected). To specify straight padding, put the needed time of delay (in milliseconds) before the command. To specify proportional padding, place an asterisk (*) after the amount of time. For example, on the concept 100 terminal, the ta command (tab character) takes a straight time delay of 8 milliseconds, and the cd command (clear display) takes a proportional delay of 16 milliseconds. The termcap entries look like this:
Straight padding:
Proportional padding:
Numeric commands are followed by a number sign (#). For example, co#80 indicates that there are 80 columns on the screen. (co is the command which specifies the number of columns on the screen.)
Boolean commands signify the existence of a capability by their presence. They are not followed by any sequence or other symbols.