=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_html.c,v retrieving revision 1.126 retrieving revision 1.127 diff -c -r1.126 -r1.127 *** src/usr.bin/mandoc/mdoc_html.c 2017/01/19 01:00:11 1.126 --- src/usr.bin/mandoc/mdoc_html.c 2017/01/19 13:34:59 1.127 *************** *** 1,4 **** ! /* $OpenBSD: mdoc_html.c,v 1.126 2017/01/19 01:00:11 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: mdoc_html.c,v 1.127 2017/01/19 13:34:59 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze *************** *** 297,321 **** html_mdoc(void *arg, const struct roff_man *mdoc) { struct html *h; ! struct tag *t, *tt; h = (struct html *)arg; ! if ( ! (HTML_FRAGMENT & h->oflags)) { print_gen_decls(h); ! t = print_otag(h, TAG_HTML, ""); ! tt = print_otag(h, TAG_HEAD, ""); print_mdoc_head(&mdoc->meta, mdoc->first->child, h); ! print_tagq(h, tt); print_otag(h, TAG_BODY, ""); ! print_otag(h, TAG_DIV, "c", "mandoc"); ! } else ! t = print_otag(h, TAG_DIV, "c", "mandoc"); 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); } static void --- 297,319 ---- html_mdoc(void *arg, const struct roff_man *mdoc) { struct html *h; ! struct tag *t; h = (struct html *)arg; ! if ((h->oflags & HTML_FRAGMENT) == 0) { print_gen_decls(h); ! print_otag(h, TAG_HTML, ""); ! t = print_otag(h, TAG_HEAD, ""); print_mdoc_head(&mdoc->meta, mdoc->first->child, h); ! print_tagq(h, t); print_otag(h, TAG_BODY, ""); ! } 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, NULL); } static void