=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.42 retrieving revision 1.47 diff -u -p -r1.42 -r1.47 --- mandoc/mdoc_html.c 2009/10/28 08:00:18 1.42 +++ mandoc/mdoc_html.c 2009/11/14 12:04:59 1.47 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.42 2009/10/28 08:00:18 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.47 2009/11/14 12:04:59 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -726,12 +725,11 @@ mdoc_nm_pre(MDOC_ARGS) { struct htmlpair tag; - if ( ! (HTML_NEWLINE & h->flags)) - if (SEC_SYNOPSIS == n->sec) { - bufcat_style(h, "clear", "both"); - PAIR_STYLE_INIT(&tag, h); - print_otag(h, TAG_BR, 1, &tag); - } + if (SEC_SYNOPSIS == n->sec && n->prev) { + bufcat_style(h, "clear", "both"); + PAIR_STYLE_INIT(&tag, h); + print_otag(h, TAG_BR, 1, &tag); + } PAIR_CLASS_INIT(&tag, "name"); print_otag(h, TAG_SPAN, 1, &tag); @@ -811,7 +809,7 @@ mdoc_xx_pre(MDOC_ARGS) pp = "BSDI BSD/OS"; break; case (MDOC_Dx): - pp = "DragonFlyBSD"; + pp = "DragonFly"; break; case (MDOC_Fx): pp = "FreeBSD"; @@ -952,9 +950,10 @@ mdoc_it_head_pre(MDOC_ARGS, int type, struct roffsu *w switch (type) { case (MDOC_Item): - /* FALLTHROUGH */ - case (MDOC_Ohang): return(0); + case (MDOC_Ohang): + print_otag(h, TAG_DIV, 0, &tag); + return(1); case (MDOC_Column): bufcat_su(h, "min-width", width); bufcat_style(h, "clear", "none"); @@ -1068,6 +1067,8 @@ mdoc_it_pre(MDOC_ARGS) /* Override width in some cases. */ switch (type) { + case (MDOC_Ohang): + /* FALLTHROUGH */ case (MDOC_Item): /* FALLTHROUGH */ case (MDOC_Inset): @@ -1115,8 +1116,10 @@ mdoc_bl_pre(MDOC_ARGS) return(1); ord = malloc(sizeof(struct ord)); - if (NULL == ord) - err(EXIT_FAILURE, "malloc"); + if (NULL == ord) { + perror(NULL); + exit(EXIT_FAILURE); + } ord->cookie = n; ord->pos = 1; ord->next = h->ords.head;