term(5)term(5)Nameterm - terminal driving tables for nroff
Description
The command uses driving tables to customize its output for various
types of output devices. These driving tables are written as C pro‐
grams, compiled, and installed in /usr/lib/term/tabname, where name is
the name for that terminal type as given in The structure of the tables
is as follows:
#define INCH 240
struct {
int bset;
int breset;
int Hor;
int Vert;
int Newline;
int Char;
int Em;
int Halfline;
int Adj;
char *twinit;
char *twrest;
char *twnl;
char *hlr;
char *hlf;
char *flr;
char *bdon;
char *bdoff;
char *ploton;
char *plotoff;
char *up;
char *down;
char *right;
char *left;
char *codetab[256-32];
char *zzz;
} t;
The meanings of the various fields are:
bset Bits to set in the c_oflag field of the structure before out‐
put. For further information, see
breset Bits to reset in the c_oflag field of the structure before
output.
Hor Horizontal resolution in fractions of an inch.
Vert Vertical resolution in fractions of an inch.
Newline Space moved by a newline (linefeed) character in fractions of
an inch.
Char Quantum of character sizes, in fractions of an inch (that is,
a character is a multiple of Char units wide).
Em Size of an em in fractions of an inch.
Halfline Space moved by a half-linefeed (or half-reverse-linefeed)
character in fractions of an inch.
Adj Quantum of white space, in fractions of an inch (that is,
white spaces are a multiple of Adj units wide).
Note: if this is less than the size of the space character
(in units of Char; see the following fields for how the sizes
of characters are defined), outputs fractional spaces using
plot mode. Also, if the option to is used, sets Adj equal to
Hor.
twinit Set of characters used to initialize the terminal in a mode
suitable for
twrest Set of characters used to restore the terminal to normal
mode.
twnl Set of characters used to move down one line.
hlr Set of characters used to move up one-half line.
hlf Set of characters used to move down one-half line.
flr Set of characters used to move up one line.
bdon Set of characters used to turn on hardware boldface mode, if
any.
bdoff Set of characters used to turn off hardware boldface mode, if
any.
iton Set of characters used to turn on hardware italics mode, if
any.
itoff Set of characters used to turn off hardware italics mode, if
any.
ploton Set of characters used to turn on hardware plot mode (for
Diablo type mechanisms), if any.
plotoff Set of characters used to turn off hardware plot mode (for
Diablo type mechanisms), if any.
up Set of characters used to move up one resolution unit (Vert)
in plot mode, if any.
down Set of characters used to move down one resolution unit
(Vert) in plot mode, if any.
right Set of characters used to move right one resolution unit
(Hor) in plot mode, if any.
left Set of characters used to move left one resolution unit (Hor)
in plot mode, if any.
codetab Definition of characters needed to print an character on the
terminal. The first byte is the number of character units
(Char) needed to hold the character; that is, ``\001'' is one
unit wide, ``\002'' is two units wide, and so on. The high-
order bit (0200) is on if the character is to be underlined
in underline mode (.ul). The rest of the bytes are the char‐
acters used to produce the character in question. If the
character has the sign (0200) bit on, it is a code to move
the terminal in plot mode. It is encoded as:
0100 bit on Vertical motion
0100 bit off Horizontal motion
040 bit on Negative (up or left) motion
040 bit off Positive (down or right) motion
037 bits Number of such motions to make
zzz A zero terminator at the end
All quantities that are in units of fractions of an inch should be
expressed as INCH*num/denom, where num and denom are respectively the
numerator and denominator of the fraction; that is, 1/48 of an inch
would be written as ``INCH1/48''.
If any sequence of characters does not pertain to the output device,
that sequence should be given as a null string.
The source code for the terminal name is in
/usr/src/usr.bin/nroff/term/tabname. When a new terminal type is
added, the file should be updated to include the source to that driving
table (use #include). Note that the various terminal types are grouped
into ``parts'' labelled PART1, PART2, and PART3. If necessary, more
parts can be added. Users can make other changes to as needed. The
makefile in that directory should then be updated.
Files
/usr/lib/term/tabname Driving tables
tabname.c Source for driving tables
See Alsotty(4), term(7)
VAX term(5)