| United States-English |
|
|
|
![]() |
HP-UX 11i Version 1.5 Reference Volume 5, Section 4: File Formats > tterminfo(4)ENHANCED CURSES |
|
NAMEterminfo — printer, terminal, and modem capability database SYNOPSIS/usr/lib/terminfo/?/* List of Section Headings in DESCRIPTION
Terminfo Source Format Source File Syntax Minimum Guaranteed Limits Formal Grammar Defined Capabilities Sample Entry Types of Capabilities in the Sample Entry Device Capabilities Insert/Delete Line Printer Capabilities Capabilities that Cause Movement Alternate Character Sets Dot-Matrix Graphics Effect of Changing Printing Resolution Selecting a Terminal Application Usage DESCRIPTIONThe requirements in this manpage are in effect only for implementations that claim Enhanced Curses compliance. Terminfo Source FormatThe terminfo database contains a description of the capabilities of a variety of devices, such as terminals and printers. Devices are described by specifying a set of capabilities, by quantifying certain aspects of the device, and by specifying character sequences that effect particular results. This manpage specifies the format of terminfo source files. X/Open-compliant implementations must provide a facility that accepts source files in the format specified in this manpage as a means of entering information into the terminfo database. The facility for installing this information into the database is implementation-specific. A valid terminfo entry describing a given model of terminal can be added to terminfo on any X/Open-compliant implementation to permit use of the same terminal model. The "Source File Syntax" section describes the syntax of terminfo source files. A grammar and lexical conventions appear in the "Formal Grammar" section below. A list of all terminal capabilities defined by X/Open appears in the "Defined Capabilities" section below. An example follows in the "Sample Entry" section below. The "Device Capabilities" section describes the specification of devices in general, such as video terminals. The "Printer Capabilities" section describes the specification of printers. The terminfo database is often used by screen-oriented applications such as vi and Curses programs, as well as by some utilities such as ls and more. This usage allows them to work with a variety of devices without changes to the programs. Source File SyntaxSource files can use the ISO 8859-1 codeset. The behavior when the source file is in another codeset is unspecified. Traditional practice has been to translate information from other codesets into the source file syntax. terminfo source files consist of one or more device descriptions. Each description defines a mnemonic name for the terminal model. Each description consists of a header (beginning in column 1) and one or more lines that list the features for that particular device. Every line in a terminfo source file must end in a comma. Every line in a terminfo source file except the header must be indented with one or more white spaces (either spaces or tabs). Entries in terminfo source files consist of a number of comma-separated fields. White space after each comma is ignored. Embedded commas must be escaped by using a backslash. The following example shows the format of a terminfo source file: alias1 | alias2 | ... | aliasn | longname, whitespaceam, lines #24, whitespacehome=\Eeh, The first line, commonly referred to as the header line, must begin in column one and must contain at least two aliases separated by vertical bars. The last field in the header line must be the long name of the device and it may contain any string. Alias names must be unique in the terminfo database and they must conform to file naming conventions established by implementation-specific terminfo compilation utilities. Implementations will recognize alias names consisting only of characters from the portable file name character set except that implementations need not accept a first character of minus (-). For example, a typical restriction is that they cannot contain white space or slashes. There may be further constraints imposed on source file values by the implementation-specific terminfo compilation utilities. Each capability in terminfo is of one of the following types:
Capability names adhere to an informal length limit of five characters. Whenever possible, capability names are chosen to be the same as or similar to those specified by the ANSI X3.64-1979 standard. Semantics are also intended to match those of the ANSI standard. All string capabilities may have padding specified, with the exception of those used for input. Input capabilities, listed under the Strings section in the following tables, have names beginning with key_. These capabilities are defined in <term.h>. Minimum Guaranteed LimitsAll X/Open-compliant implementations support at least the following limits for the terminfo source file:
An implementation may support higher limits than those specified above. Formal GrammarThe grammar and lexical conventions in this section together describe the syntax for terminfo terminal descriptions within a terminfo source file. A terminal description that satisfies the requirements of this section will be accepted by all implementations. (The notation "(n)" refers to a note following the description.) descriptions : START_OF_HEADER_LINE(1) rest_of_header_line feature_lines | descriptions START_OF_HEADER_LINE rest_of_header_line | feature_lines ; rest_of_header_line : PIPE LONGNAME COMMA NEWLINE | aliases PIPE LONGNAME COMMA NEWLINE ; feature_lines : start_feature_line rest_of_feature_line | feature_lines start_feature_line rest_of_feature_line ; start_feature_line : START_FEATURE_LINE_BOOLEAN(2) | START_FEATURE_LINE_NUMERIC(3) | START_FEATURE_LINE_STRING(4) ; rest_of_feature_line : features COMMA NEWLINE | COMMA NEWLINE ; features : COMMA feature | features COMMA feature ; aliases : PIPE ALIAS | aliases PIPE ALIAS ; feature : BOOLEAN | NUMERIC | STRING ;
The lexical conventions for terminfo descriptions are as follows:
Defined CapabilitiesX/Open defines the capabilities listed in the following table. All X/Open-compliant implementations must accept each of these capabilities in an entry in a terminfo source file. Implementations use this information to determine how properly to operate the current terminal. In addition, implementations return any of the current terminal's capabilities when the application calls the query functions listed in tgetent() (in the cases where the following table lists a Termcap code) and tigetflag() (see tgetent(3X) and tigetflag(3X)). The table of capabilities has the following columns:
Booleans
Numbers
Strings
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||