As I slog through the beast, correcting the occasional typo
(that one in the pic chapter was a doozy), I note more
utilities that are no longer available or not cooperating.
I decided to replace all the spell section with aspell, and
that worked out.

So far, I’ve run into:

* checkmm (groff and groff -mm’s diagnostics can cover it)
* checkeq (ditto)
* checknr (It’s in the Heirloom repository)

Now there’s deroff, style, and diction. I’m getting nowhere
with GNU deroff. In an up to date Kubuntu, it compiled with
a few warnings but produces garbled output. On my old iMac
(running Catalina/10.15.8), attempting to compile throws
errors. The context here is stripping *roff markup to feed to
spell, but using `aspell -n` does it for you. That’s not the
only use case for deroff, though, but…

The magic AI box suggested just running nroff on it, and
that’s valid. I would suggest turning off hyphenation and full
justification, though. I might add a tweak to utp.mac to turn
them on/off at run time, it would help with testing. Formatting
with nroff produces something that (with a little massaging)
I could feed to my fuzzy matching reuse/inconsistency analyzer
script, so that’s a step forward.

I’ll have to look into style and diction again.

Then there’s “hyphen,” that lists hyphenated words in nroff
output. The core functionality can be reproduced with
11 lines of awk, including blank lines and a shebang:

#!/usr/bin/awk -f 

broken > 0 { 
   print stem $1 
   broken = 0 
} 

$NF ~ /-$/ { 
   stem = $NF 
   broken = 1 
}

So I’m calling that one solved, although I should probably
add a few comment lines (like don’t use -Tutf8 if you want
it to work).

It occurs to me that the deroff problem could perhaps be
solved with a somewhat longer but not at all complex awk
script. Shoot, maybe the entire set of DWB utilities could be
rebuilt with awk (but if the GNU style and diction work
without hassle, no sense in reinventing that wheel).

I’m sure I’ll run into a few more situations before I’m through
with this pass.

— Larry

Reply via email to