man.openbsd.org truncating ksh(1) man page

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

man.openbsd.org truncating ksh(1) man page

Gabriel Guzman-2
Hello misc@,

Not sure if there are other pages that also have this problem, but
ksh(1): http://man.openbsd.org/OpenBSD-current/man1/ksh.1 is truncated
somewhere in the *Parameters* section.  

The man page from 5.0: http://man.openbsd.org/OpenBSD-5.0/cat1/ksh.0 is
ok, but starting at 5.1: http://man.openbsd.org/OpenBSD-5.1/man1/ksh.1
we have the problem, and it exists in all subsequent release man pages
(on the web, man(1) manuals are just fine).

I'm not sure where these are generated, or I'd take a look to see what's
wrong.

Thanks for OpenBSD!
gabe.

Reply | Threaded
Open this post in threaded view
|

Re: man.openbsd.org truncating ksh(1) man page

Ingo Schwarze
Hi,

Gabriel Guzman wrote on Tue, Feb 21, 2017 at 10:24:12PM -0500:

> Not sure if there are other pages that also have this problem, but
> ksh(1): http://man.openbsd.org/OpenBSD-current/man1/ksh.1 is truncated
> somewhere in the *Parameters* section.  

Ooops.

> The man page from 5.0: http://man.openbsd.org/OpenBSD-5.0/cat1/ksh.0 is
> ok, but starting at 5.1: http://man.openbsd.org/OpenBSD-5.1/man1/ksh.1
> we have the problem, and it exists in all subsequent release man pages
> (on the web, man(1) manuals are just fine).

Yes, the problem was in the HTML formatter, not in the parser nor
in the terminal formatter.

> I'm not sure where these are generated,

 $ man -l /usr/src/usr.bin/mandoc/man.cgi.8
 http://man.openbsd.org/man.cgi
 http://mdocml.bsd.lv/man/mandoc_html.3.html

Yours,
  Ingo


Log Message:
-----------
Handle an odd edge case where .It is preceded by .Sm.
NULL dereference in man.cgi reported by Gabriel Guzman <gabe at
guzman dash nunez dot com> on misc@.

Modified Files:
--------------
    mdocml:
        mdoc_html.c

Revision Data
-------------
Index: mdoc_html.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_html.c,v
retrieving revision 1.271
retrieving revision 1.272
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.271 -r1.272
--- mdoc_html.c
+++ mdoc_html.c
@@ -751,6 +751,7 @@ mdoc_it_pre(MDOC_ARGS)
  case ROFFT_HEAD:
  if (h->style != NULL && !bl->norm->Bl.comp &&
     (n->parent->prev == NULL ||
+     n->parent->prev->body == NULL ||
      n->parent->prev->body->child != NULL)) {
  t = print_otag(h, TAG_DT, "csWl",
     cattr, bl->norm->Bl.width);