void html_mdoc(void *arg, const struct roff_man *mdoc) { struct html *h; struct roff_node *n; struct tag *t; h = (struct html *)arg; n = mdoc->first->child; if ((h->oflags & HTML_FRAGMENT) == 0) { print_gen_decls(h); print_otag(h, TAG_HTML, ""); if (n->type == ROFFT_COMMENT) print_gen_comment(h, n); t = print_otag(h, TAG_HEAD, ""); print_mdoc_head(&mdoc->meta, h); print_tagq(h, t); print_otag(h, TAG_BODY, ""); } mdoc_root_pre(&mdoc->meta, h); t = print_otag(h, TAG_DIV, "c", "manual-text"); print_mdoc_nodelist(&mdoc->meta, n, h); print_tagq(h, t); mdoc_root_post(&mdoc->meta, h); print_tagq(h, NULL); }
static void print_mdoc(MDOC_ARGS) { struct tag *t; t = print_otag(h, TAG_HEAD, 0, NULL); print_mdoc_head(m, n, h); print_tagq(h, t); t = print_otag(h, TAG_BODY, 0, NULL); print_mdoc_nodelist(m, n, h); print_tagq(h, t); }
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); print_mdoc_nodelist(meta, n, h); print_tagq(h, t); }