🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #3640

Re: NROFF drivers

#3640
From: mangler
Date: Fri, 03 Apr 1987 09:55
33 lines
2258 bytes
In article <799@cooper.UUCP>, c.steinb@cooper.UUCP (Craig Steinberger ) writes:
> Can anyone tell me how to write a terminal driver for NROFF?

An nroff driver table is an a.out, which nroff links in at run time.
It contains one struct, defined in /usr/src/*/troff/tw.h, which has
a bunch of ints describing the resolution of the terminal, and
pointers to strings for all the necessary character sequences.

The ints are all measured in nroff units, 240 per inch.

"codetab" is an array of pointers to the sequences used to print each
of the 224 nroff characters.  The first 95 of these are the printable
ASCII characters.  The first byte of each string is the width of the
glyph, in Chars (see tw.h).  Setting the 0200 bit means it's ok to
underline.  The remaining characters are output literally if ASCII;
non-ASCII bytes (i.e. with 0200 bit set) represent fine-positioning:
	0200 + N    move right by N plot-mode units
	0240 + N    move left by N
	0300 + N    move down by N
	0340 + N    move up by N
This uses plot mode, to give more flexibility in overstriking than
is possible with just backspace, half-line-up, and half-line-down.
On a Diablo-style printer it is possible to build up readable glyphs
for nearly the entire troff character set.  (The Spinwriter was lotsa
fun to watch when printing fancy things like copyright symbols).  If
all else fails, you can do dot-matrix, though it tends to wear out
the period pretty fast.

I could send you a spiffy Spinwriter 5525 driver table which I wrote in
1981 (I assume it's still public domain), but you'll need an AT&T Unix
source license for tw.h.

Don Speck   speck@vlsi.caltech.edu  {seismo,rutgers,ames}!cit-vax!speck
Technical Details
Message-ID: <2215@cit-vax.Caltech.Edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!cit-vax!mangler
References: <799@cooper.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!cit-vax!mangler
From: mangler@cit-vax.UUCP
Newsgroups: comp.text,comp.unix.questions,comp.unix.wizards
Subject: Re: NROFF drivers
Message-ID: <2215@cit-vax.Caltech.Edu>
Date: Fri, 3-Apr-87 04:55:05 EST
Article-I.D.: cit-vax.2215
Posted: Fri Apr  3 04:55:05 1987
Date-Received: Sun, 5-Apr-87 01:27:29 EST
References: <799@cooper.UUCP>
Organization: California Institute of Technology
Lines: 33
Summary: what's in them