tech-userlevel archive

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

Re: groff/-mandoc replacement

The mdoc(3) scanner-parser is ad hoc and technically able to handle this

I think you have to handle any valid mdoc input, else you're telling
people to rewrite their man pages.  If they don't render properly with
mdocterm, will NetBSD  demand the pages get fixed, or use continue to use
groff instead?  (It's not just a matter of base, of course, but of

In this case, I can't speak for NetBSD -- I'm not a dev, just a guy. I gave some ideas in my response to Antti* about coexisting mdoc/non-mdoc manuals and punting from mdocterm to groff, but these are mostly policy questions. If everything in base is mdoc and groff is only used for rendering manuals, it stands to reason that groff (which is C++/GPL/huge) can be pkgsrc'd.


In my opinion, I wouldn't ask third-party apps to do anything, but base manuals are part of NetBSD and thus changeable. I also don't see /too/ many errors in the base manuals, mostly just broken scope and old Xo/Xc stuff from earlier groffs.

Xo/Xc is discouraged

By whom?  I find no mention of that in mdoc(7); in fact it includes
several examples.

I remembered that from OpenBSD's version of mdoc.samples.7:

"The `.Xo' and `.Xc' extended argument list macros were also built from the same underlying routines and are a good example of -mdoc macro usage at its worst."

I agree to this for reasons that it violates the nice, regular notion of line- and multi-line scoping. This is primarily a technical matter encountered whilst designing the scanner-parser, and only when `Xo'/`Xc' is used to extent a line-scope as with `It'.

$ cd /usr/share/man/ && grep -l Xo man*/* | wc -l
$ cd /usr/share/man/ && grep -l Xo man*/* \
  | while read F; do echo ${F%/*}; done | uniq -c
  21 man1
  38 man3
   2 man4
   4 man5
   4 man7
  27 man8
  41 man9

FWIW, though, it's less popular among packages.  Only a few  of the 4819
pages in my /usr/pkg/man uses that construct.  Anyone doing a bulk builds
would be able to give a more definitiive answer.
$ cd /usr/pkg/man && grep -l 'Xo' man*/*


Home | Main Index | Thread Index | Old Index