Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ term(F) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     TERM(F)                  XENIX System V                   TERM(F)



     Name
          term - Terminal driving tables for nroff.

     Description
          nroff(CT) uses driving tables to customize its output for
          various types of output devices, such as printing terminals,
          special word-processing printers (such as Diablo, Qume, or
          NEC Spinwriter mechanisms), or special output filter
          programs.  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 shown in term(CT).

          The structure of the tables is as follows.  Sizes are in
          240ths of an inch.

          #define   INCH 240

          struct termtable tlp ; { \* lp is the name of the term, *\
               int bset; \* modify with new name, such as tnew *\
               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 *iton;
               char *itoff;
               char *ploton;
               char *plotoff;
               char *up;
               char *down;
               char *right;
               char *left;
               char *codetab[256-32];
               char *zzz;
          } ;

          The meanings of the various fields are as follows:

          bset      bits to set in termio.c_oflag see tty(M) and
                    termio(M)).  after output.




     Page 1                                           (printed 8/7/87)





     TERM(F)                  XENIX System V                   TERM(F)



          breset    bits to reset in termio.c_oflag 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.  (i.e., characters are multiples of Char
                    units wide.  See codetab below.)

          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 for margin adjustment in
                    the abscence of the -e option, in fractions of an
                    inch.  (i.e., 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.  Nroff assumes that
                    boldface mode is reset automatically by the twnl
                    string, because many letter-quality printers reset
                    the boldface mode when they receive a carriage
                    return; the twnl string should include whatever
                    characters are necessary to reset the boldface
                    mode.



     Page 2                                           (printed 8/7/87)





     TERM(F)                  XENIX System V                   TERM(F)



          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   Array of sequences to print individual characters.
                    Order is nroff's internal ordering.  See the file
                    /usr/lib/term/tabuser.c for the exact order.

          zzz       a zero terminator at the end.

          The codetab sequences each begin with a flag byte.  The top
          bit indicates whether the sequence should be underlined in
          the .ul font.  The rest of the byte is the width of the
          sequence in units of Char.

          The remainder of each codetab sequence is a sequence of
          characters to be output.  Characters with the top bit off
          are output as given;  characters with the top bit on
          indicate escape into plot mode.  When such an escape
          character is encountered, nroff shifts into plot mode,
          emitting ploton, and skips to the next character if the
          escape character was '\200'.

          When in plot mode, characters with the top bit off are
          output as given.  A character with the top bit on indicates
          a motion.  The next bit indicates coordinate, with 1 being
          vertical and 0 being horizontal.  The next bit indicates
          direction, with 1 meaning up or left.  The remaining five
          bits give the amount of the motion.  An amount of zero



     Page 3                                           (printed 8/7/87)





     TERM(F)                  XENIX System V                   TERM(F)



          causes exit from plot mode.

          When plot mode is exited, either at the end of the string or
          via the amount-zero exit, plotoff is emitted followed by a
          blank.

          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.

          The  Development System must be installed on the computer to
          create a new driving table.  The source code for a generic
          output device is in the file /usr/lib/term/tabuser.c Copy
          this file and make the necessary modifications, including
          the name of the termtable struct. Refer to the hardware
          manual for the codes needed for the output device (terminal,
          printer, etc.).  Name the file according to the convention
          explained in term(CT).  The makefile,
          /usr/lib/term/makefile, should be updated to include the
          source file to the new driving table.  When the files are
          prepared, enter the command :

       make cp

     (See make(CP)).  The source to the new driving table is linked
     with the object file mkterm.o, and the new driving table is
     created and installed in the proper directory.

     FILES
          /usr/lib/term/tabname  driving tables
          /usr/lib/term/tabuser.cgeneric source for driving tables
          /usr/lib/term/makefile makefile for creating driving tables
          /usr/lib/term/mkterms.olinkable object file for creating driving tables

     SEE ALSO
          nroff(CT), term(CT).














     Page 4                                           (printed 8/7/87)





     TERM(F)                  XENIX System V                   TERM(F)



     Notes
          The XENIX Development System must be installed on the
          computer to create new driving tables.

          Not all XENIX facilities support all of these options.


















































     Page 5                                           (printed 8/7/87)



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