Psroff 2.0 meets Ultrix 4.0 troff width table format

Steve D. Miller steve at fnord.umiacs.umd.edu
Fri Dec 7 05:52:52 AEST 1990


The problem (as I described in agonizing detail several times during the
Ultrix 4.0 field test) is that the DECstation troff is really the MIPSco
troff.  Troff font width tables are a.out files; when ordinary troff reads
one, it skips the a.out header, then reads the next 224 bytes directly into
an array.  However, since it's sort of hard to make an a.out file on a COFF
machine, MIPS apparently started using an ASCII font width table format.
DEC ships the ASCII-fied troff, but not the ASCII-fied font width tables.

There's basically two things you can do:

	1) You can replace the DEC troff with the 4.3BSD troff, assuming
	that you have access to BSD sources.  To do this, you'll need to ftp
	to fnord.umiacs.umd.edu (128.8.120.3) and grab pub/trofffix.shar.
	The code that does .ev's in troff needs work before it'll function
	on a MIPS machine.  (The unfixed code is morbidly fascinating. (-: )
	Note that if you're messing with ditroff, the versions of ditroff
	that I know about need a very similar fix, for the same reasons.

	   If you do this, you'll also need to get pub/psfixfont.c.  The
	'normal' way to build a font width table is to make a C file that
	declares an array of 224 chars, then hand that file to the compiler.
	Once you've done that on the DECstation, run psfixfont over the
	resulting COFF format executable to get working a.out-style troff
	font width tables.

	2) You can try to come up with ASCII tables.  I think that in the
	ASCII format, a font width table is a sequence of 224 lines, where
	each line is a number giving the width of the corresponding
	character.  For example:

		5
		20
		35
		2
		...

	   I think that lines starting with # are ignored.  I don't remember
	the format offhand, so you'll need to mess with this a bit, but
	you'll eventually end up with tables that will work with DEC troff
	as distributed.

If you're desperate for more details, I could fish them out as time permits.

Of course, if you want to complain vociferously to DEC about this, it
wouldn't break my heart. (-:

	-Steve
--
Spoken: Steve Miller    Domain: steve at umiacs.umd.edu    UUCP: uunet!mimsy!steve
Phone: +1-301-405-6736  USPS: UMIACS, Univ. of Maryland, College Park, MD 20742



More information about the Comp.unix.ultrix mailing list