term(5) — VAX
Name
term − terminal driving tables for nroff
Description
The nroff() command uses driving tables to customize its output for various types of output devices. These driving tables are written as C programs, compiled, and installed in /usr/lib/term/tabname, where name is the name for that terminal type as given in term(.). The structure of the tables is as follows:
#defineINCH240
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 termio structure before output. For further information, see tty(.).
breset Bits to reset in the c_oflag field of the termio 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), nroff outputs fractional spaces using plot mode. Also, if the −e option to nroff is used, nroff sets Adj equal to Hor.
twinit Set of characters used to initialize the terminal in a mode suitable for nroff.
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 nroff 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 characters 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 onVertical motion
0100 bit offHorizontal motion
040 bit onNegative (up or left) motion
040 bit offPositive (down or right) motion
037 bitsNumber 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 maketerms.c 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 maketerms.c as needed. The makefile terms.mk in that directory should then be updated.
Files
/usr/lib/term/tabname
Driving tables
tabname.c Source for driving tables