HP-UX Reference (11i v2 03/08) - 4 File Formats (vol 8)

t
terminfo(4) terminfo(4)
(ENHANCED CURSES)
Two miscellaneous capabilities complete the list of motion capabilities. One of these is needed for
printers that move the current position to the beginning of a line when certain control characters, such as
linefeed or formfeed, are used. The other is used for the capability of suspending the motion that nor-
mally occurs after printing a character.
Miscellaneous Motion Strings
docr List of control characters causing cr
zerom Prevent auto motion after printing next single character
Margins
terminfo provides two strings for setting margins on terminals: one for the left and one for the right
margin. Printers, however, have two additional margins, for the top and bottom margins of each page.
Furthermore, some printers require not using motion strings to move the current position to a margin and
then fixing the margin there, but require the specification of where a margin should be regardless of the
current position. Therefore terminfo offers six additional strings for defining margins with printers.
Setting Margins
smgl Set left margin at current column
smgr Set right margin at current column
smgb Set bottom margin at current line
smgt Set top margin at current line
smgbp Set bottom margin at line N
smglp Set left margin at column N
smgrp Set right margin at column N
smgtp Set top margin at line N
The last four strings are used with one or more arguments that give the position of the margin or margins
to set. If both of smglp and smgrp are set, each is used with a single argument, N, that gives the
column number of the left and right margin, respectively. If both of smgtp and smgbp are set, each is
used to set the top and bottom margin, respectively: smgtp is used with a single argument, N, the line
number of the top margin; however, smgbp is used with two arguments, N and M, that give the line
number of the bottom margin, the first counting from the top of the page and the second counting from
the bottom. This accommodates the two styles of specifying the bottom margin in different manufacturers
printers. When coding a terminfo entry for a printer that has a settable bottom margin, only the first
or second argument should be used, depending on the printer. When writing an application that uses
smgbp to set the bottom margin, both arguments must be given.
If only one of smglp and smgrp is set, then it is used with two arguments, the column number of the left
and right margins, in that order. Likewise, if only one of smgtp and smgbp is set, then it is used with
two arguments that give the top and bottom margins, in that order, counting from the top of the page.
Thus when coding a terminfo entry for a printer that requires setting both left and right or top and bot-
tom margins simultaneously, only one of smglp and smgrp or smgtp and smgbp should be defined; the
other should be left blank. When writing an application that uses these string capabilities, the pairs
should be first checked to see if each in the pair is set or only one is set, and should then be used accord-
ingly.
In counting lines or columns, line zero is the top line and column zero is the left-most column. A zero
value for the second argument with smgbp means the bottom line of the page.
All margins can be cleared with mgc.
Shadows, Italics, Wide Characters, Superscripts, Subscripts
Five sets of strings describe the capabilities printers have of enhancing printed text.
HP-UX 11i Version 2: August 2003 28 Hewlett-Packard Company Section 4339