HP-UX Reference (11i v2 04/09) - 4 File Formats (vol 8)
t
terminfo(4) terminfo(4)
(ENHANCED CURSES)
If the terminal has the ability to define a window as part of memory, which all commands affect, it should
be given as the argumentized string wind. The four arguments are the starting and ending lines in
memory and the starting and ending columns in memory, in that order.
If the terminal can retain display memory above, then the da capability should be given; if display
memory can be retained below, then db should be given. These indicate that deleting a line or scrolling
a full screen may bring nonblank lines up from below or that scrolling back with ri may bring down
nonblank lines.
Insert/Delete Character
There are two basic kinds of intelligent terminals with respect to insert/delete character operations which
can be described using terminfo. The most common insert/delete character operations affect only the
characters on the current line and shift characters off the end of the line rigidly. Other terminals, such as
the Concept 100 and the Perkin-Elmer Owl, make a distinction between typed and untyped blanks on the
screen, shifting upon an insert or delete only to an untyped blank on the screen which is either elim-
inated, or expanded to two untyped blanks. You can determine the kind of terminal you have by clearing
the screen and then typing text separated by cursor motions. Type "abc def" using local cursor motions
(not spaces) between the abc and the def. Then position the cursor before the abc and put the termi-
nal in insert mode. If typing characters causes the rest of the line to shift rigidly and characters to fall off
the end, then your terminal does not distinguish between blanks and untyped positions. If the abc shifts
over to the def which then move together around the end of the current line and onto the next as you
insert, you have the second type of terminal, and should give the capability in, which stands for "insert
null". While these are two logically separate attributes (one line versus multiline insert mode, and special
treatment of untyped spaces) we have seen no terminals whose insert mode cannot be described with the
single attribute.
terminfo can describe both terminals that have an insert mode and terminals which send a simple
sequence to open a blank position on the current line. Give as smir the sequence to get into insert mode.
Give as rmir the sequence to leave insert mode. Now give as ich1 any sequence needed to be sent just
before sending the character to be inserted. Most terminals with a true insert mode will not give ich1;
terminals that send a sequence to open a screen position should give it here. (If your terminal has both,
insert mode is usually preferable to ich1. Do not give both unless the terminal requires both to be used
in combination.) If post-insert padding is needed, give this as a number of milliseconds padding in ip (a
string option). Any other sequence which may need to be sent after an insert of a single character may
also be given in ip. If your terminal needs both to be placed into an "insert mode" and a special code to
precede each inserted character, then both smir/rmir and ich1 can be given, and both will be used.
The ich capability, with one argument, n, will insert n blanks.
If padding is necessary between characters typed while not in insert mode, give this as a number of mil-
liseconds padding in rmp.
It is occasionally necessary to move around while in insert mode to delete characters on the same line (for
example, if there is a tab after the insertion position). If your terminal allows motion while in insert
mode you can give the capability mir to speed up inserting in this case. Omitting mir will affect only
speed. Some terminals (notably Datamedia) must not have mir because of the way their insert mode
works.
Finally, you can specify dch1 to delete a single character, dch with one argument, n, to delete n charac-
ters, and delete mode by giving smdc and rmdc to enter and exit delete mode (any mode the terminal
needs to be placed in for dch1 to work).
A command to erase n characters (equivalent to outputting n blanks without moving the cursor) can be
given as ech with one argument.
Highlighting, Underlining, and Visible Bells
Your device may have one or more kinds of display attributes that allow you to highlight selected charac-
ters when they appear on the screen. The following display modes (shown with the names by which they
are set) may be available:
• A blinking screen (blink)
• Bold or extra-bright characters (bold)
• Dim or half-bright characters (dim)
• Blanking or invisible text (invis)
Section 4−−352 Hewlett-Packard Company − 19 − HP-UX 11i Version 2: September 2004