=================================================================== RCS file: /cvs/mandoc/man_html.c,v retrieving revision 1.24 retrieving revision 1.27 diff -u -p -r1.24 -r1.27 --- mandoc/man_html.c 2009/11/16 08:46:59 1.24 +++ mandoc/man_html.c 2010/03/22 05:59:32 1.27 @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.24 2009/11/16 08:46:59 kristaps Exp $ */ +/* $Id: man_html.c,v 1.27 2010/03/22 05:59:32 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -14,6 +14,10 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include @@ -66,11 +70,6 @@ static int man_SH_pre(MAN_ARGS); static int man_SM_pre(MAN_ARGS); static int man_SS_pre(MAN_ARGS); -#ifdef __linux__ -extern size_t strlcpy(char *, const char *, size_t); -extern size_t strlcat(char *, const char *, size_t); -#endif - static const struct htmlman mans[MAN_MAX] = { { man_br_pre, NULL }, /* br */ { NULL, NULL }, /* TH */ @@ -115,7 +114,7 @@ html_man(void *arg, const struct man *m) h = (struct html *)arg; - print_gen_doctype(h); + print_gen_decls(h); t = print_otag(h, TAG_HTML, 0, NULL); print_man(man_meta(m), man_node(m), h); @@ -575,8 +574,12 @@ man_IP_pre(MAN_ARGS) width = a2width(nn, &su); } - if (MAN_TP == n->tok && NULL != nn) + if (MAN_TP == n->tok && NULL != nn) { + while (nn && MAN_TEXT != nn->type) + nn = nn->next; + /* FIXME: sync with pre_TP(), man_term.c */ width = a2width(nn, &su); + } if (MAN_BLOCK == n->type) { bufcat_su(h, "margin-left", &su); @@ -605,6 +608,8 @@ man_IP_pre(MAN_ARGS) if ( ! width) return(1); + + /* FIXME: sync with pre_TP(), man_term.c */ if (MAN_IP == n->tok) for (nn = n->child; nn->next; nn = nn->next)