Hi Jaap,
At 2024-10-06T14:54:59+0200, Jaap Akkerhuis wrote:
On 6 Oct 2024,
at 00:22, G. Branden Robinson
<g.branden.robinson(a)gmail.com> wrote:
Unix nroff got frozen in amber in 1978 with respect to terminal
support, and continues to live in a world where the termcap and
terminfo libraries were never written.
Nroff did actually read in the output description from, if I remember
correctly, /usr/lib/termtab/xxx with the argument -Txxx.
Yes. When Kernighan refactored V7 troff/nroff for device-independence,
he implemented a similar scheme for each. While for troff, this
resulted in device and font description files, "DESC" and a motley
variety of capitalized one-or-two letter names for fonts, for nroff they
were termed "driving tables", a terminological choice that concealed how
closely they resembled the troff scheme.
Compare, for example:
https://github.com/n-t-roff/DWB3.3/blob/master/postscript/devopost/DESC
https://github.com/n-t-roff/DWB3.3/blob/master/postscript/devopost/R
with:
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V10/cmd/troff/tab.37
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V10/cmd/troff/tab.450
...and the family resemblance seems clear.
these where stripped object files.
I have heard tell of a "binary format" for Kernighan troff device and
font descriptions but never encountered it. groff never attempted to
replicate it and I gather that Plan 9 troff also discarded it.
I have made them for Diable daisy-wheel printers.
Some could create
bold characters by overprinting and we once had one with two print
heads, the second head had an italics daisy-wheel mounted.
Right. The Diablo features heavily in early '80s Unix documentation.
However none of this has much to do, in my opinion, with the _terminal
capability databases_ offered by termcap and (later) terminfo. The
whole point of these is to _query_ the user's terminal type, not have to
be told it with some `-T` option.
To my knowledge, no nroff has ever simply looked at "$TERM" and then
decided how to format output. Approximately all other Unix software
that writes to a terminal behaves that way. nroff didn't, and by God
some Unix grognards would have it stay that way.[1][2] Mark Nudelman's
less(1) is probably the foremost contributor of inertia here, since
man(1) is far and away the leading application of nroff(1), and less(1)
the victorious pager program after a long and bloody campaign of
attrition. (This isn't a complaint; we could have done worse. most(1)
could have won instead.[3])
Lennart Jablonka has contributed a patch to groff to resolve this
longevous discrepancy. (It ended up on my slow path for integration
because I decided I needed to understand terminfo much better, and that
in turn led me to contribute a large volume of man page revisions to
ncurses, many of which can be enjoyed(?) in its 6.5 release.[4])
https://savannah.gnu.org/bugs/?63583
Regards,
Branden
[1]
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=312935
[2]
https://unix.stackexchange.com/questions/729124/linux-9-commands-send-ansi-…
[3]
https://invisible-island.net/ncurses/ncurses-slang.html
[4]
https://invisible-island.net/ncurses/announce.html
https://invisible-island.net/ncurses/man/
Despite his grognard standpoint with respect to grotty(1)'s default
use of SGR escape sequences in output, I would emphasize that Thomas
Dickey has been a pleasure to work with. It's difficult to imagine
the same being true of Alan Curry.