Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nroff(1)

TERM(5)  —  FILE FORMATS

NAME

term − terminal driving tables for nroff

SYNOPSIS

/usr/lib/term/tabname

DESCRIPTION

Nroff(1) uses driving tables to customize its output for various types of output devices, such as terminals, line printers, daisy-wheel printers, or special output filter programs.  These driving tables are written as C programs, compiled, and installed in the directory /usr/lib/term. The name of the output device is specified with the −T option of nroff. The structure of the terminal table 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 as follows:

bset bits to set in the sg_flags field of the sgtty structure before output; see tty(4).

breset bits to reset in the sg_flags field of the sgtty structure after output; see tty(4).

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 below for how the sizes of characters are defined), nroff will output fractional spaces using plot mode.  Also, if the −e switch to nroff is used, Adj is set equal to Hor by nroff.

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. 

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, etc.  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 which 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 “INCH/48”. 

If any sequence of characters does not pertain to the output device, that sequence should be given as a null string. 

FILES

/usr/lib/term/tabname
driving tables

/usr/lib/term/README list of terminals supported by nroff(1)

SEE ALSO

nroff(1)

Sun Release 3.2  —  Last change: 16 June 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026