=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_html.c,v retrieving revision 1.106 retrieving revision 1.107 diff -c -r1.106 -r1.107 *** src/usr.bin/mandoc/mdoc_html.c 2015/04/18 16:04:40 1.106 --- src/usr.bin/mandoc/mdoc_html.c 2015/04/18 17:50:02 1.107 *************** *** 1,4 **** ! /* $OpenBSD: mdoc_html.c,v 1.106 2015/04/18 16:04:40 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: mdoc_html.c,v 1.107 2015/04/18 17:50:02 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze *************** *** 46,52 **** void (*post)(MDOC_ARGS); }; - static void print_mdoc(MDOC_ARGS); static void print_mdoc_head(MDOC_ARGS); static void print_mdoc_node(MDOC_ARGS); static void print_mdoc_nodelist(MDOC_ARGS); --- 46,51 ---- *************** *** 262,276 **** }; - void - html_mdoc(void *arg, const struct roff_man *mdoc) - { - - print_mdoc(mdoc_meta(mdoc), mdoc_node(mdoc)->child, - (struct html *)arg); - putchar('\n'); - } - /* * Calculate the scaling unit passed in a `-width' argument. This uses * either a native scaling unit (e.g., 1i, 2m) or the string length of --- 261,266 ---- *************** *** 329,357 **** } } ! static void ! print_mdoc(MDOC_ARGS) { - struct tag *t, *tt; struct htmlpair tag; PAIR_CLASS_INIT(&tag, "mandoc"); if ( ! (HTML_FRAGMENT & h->oflags)) { print_gen_decls(h); t = print_otag(h, TAG_HTML, 0, NULL); tt = print_otag(h, TAG_HEAD, 0, NULL); ! print_mdoc_head(meta, n, h); print_tagq(h, tt); print_otag(h, TAG_BODY, 0, NULL); print_otag(h, TAG_DIV, 1, &tag); } else t = print_otag(h, TAG_DIV, 1, &tag); ! mdoc_root_pre(meta, n, h); ! print_mdoc_nodelist(meta, n, h); ! mdoc_root_post(meta, n, h); print_tagq(h, t); } static void --- 319,350 ---- } } ! void ! html_mdoc(void *arg, const struct roff_man *mdoc) { struct htmlpair tag; + struct html *h; + struct tag *t, *tt; PAIR_CLASS_INIT(&tag, "mandoc"); + h = (struct html *)arg; if ( ! (HTML_FRAGMENT & h->oflags)) { print_gen_decls(h); t = print_otag(h, TAG_HTML, 0, NULL); tt = print_otag(h, TAG_HEAD, 0, NULL); ! print_mdoc_head(&mdoc->meta, mdoc->first->child, h); print_tagq(h, tt); print_otag(h, TAG_BODY, 0, NULL); print_otag(h, TAG_DIV, 1, &tag); } else t = print_otag(h, TAG_DIV, 1, &tag); ! mdoc_root_pre(&mdoc->meta, mdoc->first->child, h); ! print_mdoc_nodelist(&mdoc->meta, mdoc->first->child, h); ! mdoc_root_post(&mdoc->meta, mdoc->first->child, h); print_tagq(h, t); + putchar('\n'); } static void