clewis@ecicrl.UUCP (Chris Lewis) (12/04/90)
A couple of the people trying to use psroff have encountered the fact that DEC changed the width table formats for Ultrix 4 CAT troff without seeming to ship any width table files in the new format or documentation on it whatsoever. Ultrix 4 CAT Troff can't even read the width tables it came with.... And, of course, since Ultrix troff is unsupported software, the support center is unwilling to help. If it wasn't supported, why the bleep did they change it?!!!! Twits-of-the-week. Sigh... It seems to want some sort of ASCII files rather than the more common binary. I seem to remember someone posting at least 6 months ago a patch to some piece of software to cope with the "new width table format for troff on the xxx OS" (where I can't remember xxx...) which was ASCII.... Which given my defective memory, might be what we're looking for. As an idiot myself, I neglected to save it. If anyone can help, either on Ultrix 4 width tables specifically, or that old posting, please e-mail me (perhaps psroff-request@eci386 would be the better address than below). You'll make many people very happy. [BTW: for Ultrix 4 users, all is not lost. You can run Psroff 2.0 as-is by removing the ".fp"'s from "cmn.pre" temporarily. Then troff/psroff will use the width tables that have been compiled into troff. Unfortunately, the widths are somewhat (but not grossly off), and you can't do any ".fp"'s to use fonts other than R, I, B and S, but it's still useable. I was unable to get through to one of the people reporting this problem.] Please don't post to comp.unix.ultrix alone - my machine isn't subscribed to it. comp.text is better. Thank you very much. -- Chris Lewis, Phone: (613) 832-0541 UUCP: uunet!utai!lsuc!ecicrl!clewis Moderator of the Ferret Mailing List (ferret-request@eci386) Psroff mailing list (psroff-request@eci386)
steve@fnord.umiacs.umd.edu (Steve D. Miller) (12/07/90)
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@umiacs.umd.edu UUCP: uunet!mimsy!steve Phone: +1-301-405-6736 USPS: UMIACS, Univ. of Maryland, College Park, MD 20742