Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX 11i Version 1.5 Reference Volume 5, Section 4: File Formats > t

terminfo(4)

ENHANCED CURSES
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

terminfo — 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

DESCRIPTION

The requirements in this manpage are in effect only for implementations that claim Enhanced Curses compliance.

Terminfo Source Format

The 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 Syntax

Source 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:

  • Boolean capabilities show that a device has or does not have a particular feature.

  • Numeric capabilities quantify particular features of a device.

  • String capabilities provide sequences that can be used to perform particular operations on devices.

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 Limits

All X/Open-compliant implementations support at least the following limits for the terminfo source file:

Source File CharacteristicMinimum Guaranteed Value
Length of a line1023 bytes
Length of a terminal alias14 bytes
Length of a terminal model name128 bytes
Width of a single field128 bytes
Length of a string value1000 bytes
Length of a string representing a numeric value99 digits
Magnitude of a numeric value0 up to and including 32767

An implementation may support higher limits than those specified above.

Formal Grammar

The 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 ;

(1)

An ALIAS that begins in column one. This is handled by the lexical analyzer.

(2)

A BOOLEAN feature that begins after column one but is the first feature on the feature line. This is handled by the lexical analyzer.

(3)

A NUMERIC feature that begins after column one but is the first feature on the feature line. This is handled by the lexical analyzer.

(4)

A STRING feature that begins after column one but is the first feature on the feature line. This is handled by the lexical analyzer.

The lexical conventions for terminfo descriptions are as follows:

1.

White space consists of the <space> and <tab> characters.

2.

An ALIAS may contain any graph characters other than comma (,), slash (/), and bar (|). (Graph characters are those characters for which isgraph() returns nonzero; see ctype(3C).)

3.

A LONGNAME may contain any print characters other than comma (,) and bar (|). (Print characters are those characters for which isprint() returns nonzero; see ctype(3C).)

4.

A BOOLEAN feature may contain any print characters other than comma (,), equals (=), and pound sign (#).

5.

A NUMERIC feature consists of:

a.

A name which may contain any print character other than comma (,), equals (=), and pound sign (#).

b.

The pound sign (#) character.

c.

A positive integer which conforms to the C language convention for integer constants.

6.

A STRING feature consists of:

a.

A name which may contain any print character other than comma (,), equals (=), and pound sign (#).

b.

The equals (=) character.

c.

A string which may contain any print characters other than comma (,).

7.

White space immediately following a comma (,) is ignored.

8.

Comments consist of the beginning of a line, optional white space, a required pound sign (#), and a terminating end of line.

9.

A header line must begin in column one.

10.

A feature line must not begin in column one.

11.

Blank lines are ignored.

Defined Capabilities

X/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:

Variable

Names for use by the Curses functions that operate on the terminfo database. These names are reserved and the application must not define them.

Capname

The short name for a capability specified in the terminfo source file. It is used for updating the source file and by the tput command (see tput(1)).

Termcap

Codes provided for compatibility with older applications. These codes are TO BE WITHDRAWN. Because of this, not all Capnames have Termcap codes.

Description

A short summary of the capability.

Booleans

 Cap-Term- 
VariablenamecapDescription
auto_left_marginbwbwcub1 wraps from column 0 to last column
auto_right_marginamamTerminal has automatic margins
back_color_erasebceutScreen erased with background color
can_changecccccTerminal can re-define existing color
ceol_standout_glitchxhpxsStandout not erased by overwriting (hp)
col_addr_glitchxhpaYAOnly positive motion for hpa/mhpa caps
cpi_changes_rescpixYFChanging character pitch changes resolution
cr_cancels_micro_modecrxmYBUsing cr turns off micro mode
dest_tabs_magic_smsoxtxtDestructive tabs, magic smso char (t1061)
eat_newline_glitchxenlxnNewline ignored after 80 columns (Concept)
erase_overstrikeeoeoCan erase overstrikes with a blank
generic_typegngnGeneric line type (e.g., dialup, switch)
get_mousegetmGmCurses should get button events
hard_copyhchcHardcopy terminal
hard_cursorchtsHCCursor is hard to see
has_meta_keykmkmHas a meta key (shift, sets parity bit)
has_print_wheeldaisyYCPrinter needs operator to change
character set
has_status_linehshsHas extra "status line"
hue_lightness_saturationhlshlTerminal uses only HLS color
notation (Tektronix)
insert_null_glitchininInsert mode distinguishes nulls
lpi_changes_reslpixYGChanging line pitch changes resolution
memory_abovedadaDisplay may be retained above the screen
memory_belowdbdbDisplay may be retained below the screen
move_insert_modemirmiSafe to move while in insert mode
move_standout_modemsgrmsSafe to move in standout modes
needs_xon_xoffnxonnxPadding won't work, XON/XOFF required
no_esc_ctlcxsbxbBeehive (f1=escape, f2=ctrl C)
no_pad_charnpcNPPad character doesn't exist
non_dest_scroll_regionndscrNDScrolling region is nondestructive
non_rev_rmcupnrrmcNRsmcup does not reverse rmcup
over_strikeososTerminal overstrikes on hard-copy terminal
prtr_silentmc5i5iPrinter won't echo on screen
row_addr_glitchxvpaYDOnly positive motion for vpa/mvpa caps
semi_auto_right_marginsamYEPrinting in last column causes cr
status_line_esc_okeslokesEscape can be used on the status line
tilde_glitchhzhzHazeltine; can't print tilde (~)
transparent_underlineululUnderline character overstrikes
xon_xoffxonxoTerminal uses XON/XOFF handshaking

Numbers

 Cap-Term- 
VariablenamecapDescription
bit_image_entwiningbitwinYoNumber of passes for each bit-map row
bit_image_typebitypeYpType of bit image device
buffer_capacitybufszYaNumber of bytes buffered before printing
buttonsbtnsBTNumber of buttons on the mouse
columnscolscoNumber of columns in a line
dot_horz_spacingspinhYcSpacing of dots horizontally in dots per inch
dot_vert_spacingspinvYbSpacing of pins vertically in pins per inch
init_tabsititTabs initially every # spaces
label_heightlhlhNumber of rows in each label
label_widthlwlwNumber of columns in each label
lineslinesliNumber of lines on a screen or a page
lines_of_memorylmlmLines of memory if greater than lines; 0 means varies
max_attributesmamaMaximum combined video attributes terminal can display
magic_cookie_glitchxmcsgNumber of blank characters left by smso or rmso
max_colorscolorsCoMaximum number of colors on the screen
max_micro_addressmaddrYdMaximum value in micro_..._address
max_micro_jumpmjumpYeMaximum value in parm_..._micro
max_pairspairspaMaximum number of color-pairs on the screen
maximum_windowswnumMWMaximum number of definable windows
micro_col_sizemcsYfCharacter step size when in micro mode
micro_line_sizemlsYgLine step size when in micro mode
no_color_videoncvNCVideo attributes that can't be used with colors
num_labelsnlabNlNumber of labels on screen (start at 1)
number_of_pinsnpinsYhNumber of pins in print-head
output_res_charorcYiHorizontal resolution in units per character
output_res_lineorlYjVertical resolution in units per line
output_res_horz_inchorhiYkHorizontal resolution in units per inch
output_res_vert_inchorviYlVertical resolution in units per inch
padding_baud_ratepbpbLowest baud rate where padding needed
print_ratecpsYmPrint rate in characters per second
virtual_terminalvtvtVirtual terminal number
wide_char_sizewidcsYnCharacter step size when in double-wide mode
width_status_linewslwsNumber of columns in status line

Strings

 Cap-Term- 
VariablenamecapDescription
acs_charsacscacGraphic charset pairs aAbBcC
alt_scancode_escscesaS8Alternate escape for scancode emulation
(default is for VT100)
back_tabcbtbtBack tab
bellbelblAudible signal (bell)
bit_image_carriage_returnbicrYvMove to beginning of same row
bit_image_newlinebinelZzMove to next row of the bit image
bit_image_repeatbirepXyRepeat bit-image cell #1 #2 times
carriage_returncrcrCarriage return
change_char_pitchcpiZAChange number of characters per inch
change_line_pitchlpiZBChange number of lines per inch
change_res_horzchrZCChange horizontal resolution
change_res_vertcvrZDChange vertical resolution
change_scroll_regioncsrcsChange to lines #1 through #2 (VT100)
char_paddingrmprPLike ip but when in replace mode
char_set_namescsnmZyReturns a list of character set names
clear_all_tabstbcctClear all tab stops
clear_marginsmgcMCClear all margins (top, bottom,
and sides)
clear_screenclearclClear screen and home cursor
clr_bolel1cbClear to beginning of line, inclusive
clr_eolelceClear to end of line
clr_eosedcdClear to end of display
code_set_initcsinciInit sequence for multiple codesets
color_namescolornmYwGive name for color #1
column_addresshpachSet horizontal position to absolute #1
command_charactercmdchCCTerminal settable cmd character
in prototype
create_windowcwinCWDefine win #1 to go from #2,#3 to #4,#5
cursor_addresscupcmMove to row #1 col #2
cursor_downcud1doDown one line
cursor_homehomehoHome cursor (if no cup)
cursor_invisiblecivisviMake cursor invisible
cursor_leftcub1leMove left one space.
cursor_mem_addressmrcupCMMemory relative cursor addressing
cursor_normalcnormveMake cursor appear normal
(undo vs/vi)
cursor_rightcuf1ndNon-destructive space (cursor or
carriage right)
cursor_to_llllllLast line, first column (if no cup)
cursor_upcuu1upUpline (cursor up)
cursor_visiblecvvisvsMake cursor very visible
define_bit_image_regiondefbiYxDefine rectangular bit-image region
define_chardefcZEDefine a character in a character set
delete_characterdch1dcDelete character
delete_linedl1dlDelete line
device_typedevtdvIndicate language/codeset support
dial_phonedialDIDial phone number #1
dis_status_linedsldsDisable status line
display_clockdclkDKDisplay time-of-day clock
display_pc_chardispcS1Display PC character
down_half_linehdhdHalf-line down (forward 1/2 linefeed)
ena_acsenacseAEnable alternate character set
end_bit_image_regionendbiYyEnd a bit-image region
enter_alt_charset_modesmacsasStart alternate character set
enter_am_modesmamSATurn on automatic margins
enter_blink_modeblinkmbTurn on blinking
enter_bold_modeboldmdTurn on bold (extra bright) mode
enter_ca_modesmcuptiString to begin programs that use cup
enter_delete_modesmdcdmDelete mode (enter)
enter_dim_modedimmhTurn on half-bright mode
enter_doublewide_modeswidmZFEnable double wide printing
enter_draft_qualitysdrfqZGSet draft quality print
enter_horizontal_hl_modeehhlmTurn on horizontal highlight mode
enter_insert_modesmirimInsert mode (enter)
enter_italics_modesitmZHEnable italics
enter_left_hl_modeelhlmTurn on left highlight mode
enter_leftward_modeslmZIEnable leftward carriage motion
enter_low_hl_modeelohlmTurn on low highlight mode
enter_micro_modesmicmZJEnable micro motion capabilities
enter_near_letter_qualitysnlqZKSet near-letter quality print
enter_normal_qualitysnrmqZLSet normal quality print
enter_pc_charset_modesmpchS2Enter PC character display mode
enter_protected_modeprotmpTurn on protected mode
enter_reverse_moderevmrTurn on reverse video mode
enter_right_hl_modeerhlmTurn on right highlight mode
enter_scancode_modesmscS4Enter PC scancode mode
enter_secure_modeinvismkTurn on blank mode (characters invisible)
enter_shadow_modesshmZMEnable shadow printing
enter_standout_modesmsosoBegin standout mode
enter_subscript_modessubmZNEnable subscript printing
enter_superscript_modessupmZOEnable superscript printing
enter_top_hl_modeethlmTurn on top highlight mode
enter_underline_modesmulusStart underscore mode
enter_upward_modesumZPEnable upward carriage motion
enter_vertical_hl_modeevhlmTurn on vertical highlight mode
enter_xon_modesmxonSXTurn on XON/XOFF handshaking
erase_charsechecErase #1 characters
exit_alt_charset_modermacsaeEnd alternate character set
exit_am_modermamRATurn off automatic margins
exit_attribute_modesgr0meTurn off all attributes
exit_ca_modermcupteString to end programs that use cup
exit_delete_modermdcedEnd delete mode
exit_doublewide_moderwidmZQDisable double wide printing
exit_insert_modermireiEnd insert mode
exit_italics_moderitmZRDisable italics
exit_leftward_mode