tech-userlevel archive

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

Re: groff/-mandoc replacement

Kristaps Džonsons wrote:


Looks promising!  So far, so good.  The devil will certainly be in the
details, as I'm sure you're aware.  

> >>       - some constructs not [evergoingtobe] implemented (`Xo'/`Xc')
> mdoc(3) has an internal hard-limit of 32 tokens per line, but this can
> be easily converted to be infinite with realloc.  Xo/Xc are rendered
> meaningless, which is excellent, because it caused some really, really
> uglified situations....
> The mdoc(3) scanner-parser is ad hoc and technically able to handle this
> situation

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

> Xo/Xc is discouraged

By whom?  I find no mention of that in mdoc(7); in fact it includes
several examples. 
$ 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