Follow-up Comment #4, bug #68252 (group groff):

Because I am a bulldog, I want to make an observation about this `TH` macro
redefinition in the specimen Clem sent me.

It does not appear to have been a popular or widespread practice even among
USG personnel.

Consider Ryan Woodsmall's archive of several USG/USL releases.

https://github.com/ryanwoodsmall/oldsysv/tree/master


$ git grep -E 'de[[:space:]]*TH'
SysVr2.0_32000/SysVr2.0_32000/dwb/macros.d/an.src:.de TH\"set title and
heading
SysVr2.0_32000/SysVr2.0_32000/dwb/macros.d/mmn.src:.de TH\"close off .TS H
diversion
SysVr2.0_32000/SysVr2.0_32000/dwb/macros.d/mmt.src:.de TH\"close off .TS H
diversion
Binary file sysv-pdp11_tape/sys_V_tape matches
Binary file sysv-pdp11_tape/usr.cpio matches
sysv-pdp11_tape/usr/lib/macros/an:.deTH
sysv-pdp11_tape/usr/lib/macros/mmn:.deTH
sysv-pdp11_tape/usr/lib/macros/mmt:.deTH
sysv-pdp11_tape/usr/src/cmd/text/macros.d/an.src:.de TH\"set title and
heading
sysv-pdp11_tape/usr/src/cmd/text/macros.d/mmn.src:.de TH\"close off .TS H
diversion
sysv-pdp11_tape/usr/src/cmd/text/macros.d/mmt.src:.de TH\"close off .TS H
diversion
sysv-pdp11_usr/lib/macros/an:.deTH
sysv-pdp11_usr/lib/macros/mmn:.deTH
sysv-pdp11_usr/lib/macros/mmt:.deTH
sysv-pdp11_usr/src/cmd/text/macros.d/an.src:.de TH\"set title and heading
sysv-pdp11_usr/src/cmd/text/macros.d/mmn.src:.de TH\"close off .TS H
diversion
sysv-pdp11_usr/src/cmd/text/macros.d/mmt.src:.de TH\"close off .TS H
diversion
sysvr4/svr4/lib/zlibeti/man3/menu.3c:.deTH
sysvr4/svr4/lib/zlibetitam/man3/tam.3c:.deTH
sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/an:.de TH
sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/exp.tbl:.de TH
sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/mmn:.deTH
sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/mmt:.deTH
sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/ms.tbl:.de TH
sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/sunman:.de TH
sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/tbl.me:.de TH


The only two instances of a man page redefining `TH` that I see are in this
"zlibeti{,tam}" library.


$ head sysvr4/svr4/lib/zlibeti/man3/menu.3c
.\"ident  "@(#)sti:man3/menu.3c 1.1"
.deTH
.PD
.nrIN \\n()Mu
.ift .ds ]H \\$1\^(\^\\$2\^)
.ifn .ds ]H \\$1(\\$2)
.if\\n()s .ds ]D
.if\\n()t .ds ]D UNIX System V
.ifn .ds ]D UNIX System V
.ds]L


Yup, looks like the same tomfoolery.

There is a "750ops.8" man page in this collection, but it seems to be an
earlier vintage than Clem's copy, and *doesn't redefine the TH macro*.  I
guess the nameless engineer who has earned my calumny hadn't gotten their
hands on it yet.


$ find -name '750ops.8'
./sysv-pdp11_man/a_man/man8/750ops.8
./sysv-pdp11_tape/man/a_man/man8/750ops.8
$ find -name '750ops.8' | xargs cksum
3977090405 7663 ./sysv-pdp11_man/a_man/man8/750ops.8
3977090405 7663 ./sysv-pdp11_tape/man/a_man/man8/750ops.8


And you know what?  _groff_ renders _this_ version of the page just fine.  In
fact, it's close to model input.


$ groff -t -ww -rCHECKTYLE=4 -man ./sysv-pdp11_man/a_man/man8/750ops.8 -z
troff:./sysv-pdp11_man/a_man/man8/750ops.8:244: warning: invalid input
character code 13 [-w input]
troff:./sysv-pdp11_man/a_man/man8/750ops.8:245: warning: invalid input
character code 13 [-w input]
troff:./sysv-pdp11_man/a_man/man8/750ops.8:286: warning: invalid input
character code 13 [-w input]
troff:./sysv-pdp11_man/a_man/man8/750ops.8:287: warning: invalid input
character code 13 [-w input]
$ groff -C -t -ww -rCHECKTYLE=4 -man ./sysv-pdp11_man/a_man/man8/750ops.8 -z
troff:./sysv-pdp11_man/a_man/man8/750ops.8:244: warning: invalid input
character code 13 [-w input]
troff:./sysv-pdp11_man/a_man/man8/750ops.8:245: warning: invalid input
character code 13 [-w input]
troff:./sysv-pdp11_man/a_man/man8/750ops.8:286: warning: invalid input
character code 13 [-w input]
troff:./sysv-pdp11_man/a_man/man8/750ops.8:287: warning: invalid input
character code 13 [-w input]


...and the man page looks fine visually, too, both in PostScript and in
terminal rendering.


$ nroff -t -ww -rCHECKTYLE=4 -man ./sysv-pdp11_man/a_man/man8/750ops.8 -z
troff:./sysv-pdp11_man/a_man/man8/750ops.8:244: warning: invalid input
character code 13
troff:./sysv-pdp11_man/a_man/man8/750ops.8:245: warning: invalid input
character code 13
troff:./sysv-pdp11_man/a_man/man8/750ops.8:286: warning: invalid input
character code 13
troff:./sysv-pdp11_man/a_man/man8/750ops.8:287: warning: invalid input
character code 13


Some stray carriage returns, that's all.  Maybe the document percolated
through a VMS system at some point.

So, Clem, I'm wondering if the exhibits you have on hand are not broadly
representative, but instead manifests a directional blunder by someone who
didn't have a strong command of man page composition idioms.  It kind of looks
like that person, or their colleagues, subsequently thought better of the
TH-redefinition approach they took.

If that's the case, then my confidence increases in recommending the special
preloaded macro file approach I've mooted, erecting guardrails against this
goofery, and applying them only where the exhibits demand them.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68252>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to