[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [groff] Design and Implementation of *roff

From: Tadziu Hoffmann
Subject: Re: [groff] Design and Implementation of *roff
Date: Mon, 3 Dec 2018 20:33:03 +0100
User-agent: Mutt/1.9.1 (2017-09-22)

> Software Tools in Pascal by Brian W. Kernighan and P.J. Plauger

For what it's worth, some of the example code from the book
"Software Tools" is available from Brian Kernighan's web page.

It has a simple roff written in ratfor, which I've manually
converted slapdash into Fortran-90.  Some parts could be written
more concisely (e.g., the command decoder), but overall the code
is conveniently subdivided into short, easily understandable
routines and thus makes an instructive teaching model of the
internals of a text formatter.  Text filling, underlining,
centering, and pagination all work nicely, but this simple
version of roff perforce lacks the single one feature that
made the "new roff" so much more versatile than earlier roffs:
programmability.  However, this and the other niceties (traps,
diversions) could easily double the amount of code required.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]