the X.org man pages love this ZN macro that they define, but mandoc 
doesn't.  this has the unfortunate effect of making them all kinda 
useless.  see for example man XCreateGC.  the sentence "can generate 
and errors" is repeated a few times, but omits the juicy details.

patch below adds "support" for ZN.  i think.  i'm not totally sure what it 
does, but it makes the words after .ZN show up when i view the page, so 
it's a big win in my book.

Index: man.c
===================================================================
RCS file: /home/tedu/cvs/src/usr.bin/mandoc/man.c,v
retrieving revision 1.43
diff -u -r1.43 man.c
--- man.c       16 Oct 2010 20:49:37 -0000      1.43
+++ man.c       25 Nov 2010 01:07:15 -0000
@@ -40,7 +40,7 @@
        "nf",           "fi",           "r",            "RE",
        "RS",           "DT",           "UC",           "PD",
        "Sp",           "Vb",           "Ve",           "AT",
-       "in",           "TS",           "TE"
+       "in",           "TS",           "TE",           "ZN"
        };
 
 const  char * const *man_macronames = __man_macronames;
Index: man.h
===================================================================
RCS file: /home/tedu/cvs/src/usr.bin/mandoc/man.h,v
retrieving revision 1.28
diff -u -r1.28 man.h
--- man.h       23 Oct 2010 15:49:30 -0000      1.28
+++ man.h       25 Nov 2010 01:06:39 -0000
@@ -60,6 +60,7 @@
        MAN_in,
        MAN_TS,
        MAN_TE,
+       MAN_ZN,
        MAN_MAX
 };
 
Index: man_macro.c
===================================================================
RCS file: /home/tedu/cvs/src/usr.bin/mandoc/man_macro.c,v
retrieving revision 1.21
diff -u -r1.21 man_macro.c
--- man_macro.c 15 Oct 2010 20:45:03 -0000      1.21
+++ man_macro.c 25 Nov 2010 01:08:31 -0000
@@ -82,6 +82,7 @@
        { in_line_eoln, 0 }, /* in */
        { blk_exp, MAN_EXPLICIT }, /* TS */
        { blk_close, 0 }, /* TE */
+       { in_line_eoln, 0 }, /* ZN */
 };
 
 const  struct man_macro * const man_macros = __man_macros;
Index: mdoc.c
===================================================================
RCS file: /home/tedu/cvs/src/usr.bin/mandoc/mdoc.c,v
retrieving revision 1.68
diff -u -r1.68 mdoc.c
--- mdoc.c      16 Oct 2010 20:49:37 -0000      1.68
+++ mdoc.c      25 Nov 2010 01:12:02 -0000
@@ -69,7 +69,7 @@
        /* LINTED */
        "Dx",           "%Q",           "br",           "sp",
        /* LINTED */
-       "%U",           "Ta",           "TS",           "TE"
+       "%U",           "Ta",           "TS",           "TE",
        };
 
 const  char *const __mdoc_argnames[MDOC_ARG_MAX] = {            

Reply via email to