-
-/* ARGSUSED */
-static int
-mdoc_bl_pre(MDOC_ARGS)
-{
- struct ord *ord;
-
- if (MDOC_BLOCK != n->type)
- return(1);
- if (MDOC_Enum != a2list(n))
- return(1);
-
- ord = malloc(sizeof(struct ord));
- if (NULL == ord)
- err(EXIT_FAILURE, "malloc");
- ord->cookie = n;
- ord->pos = 1;
- SLIST_INSERT_HEAD(&h->ords, ord, entry);
-
- return(1);
-}
-
-
-/* ARGSUSED */
-static void
-mdoc_bl_post(MDOC_ARGS)
-{
- struct ord *ord;
-
- if (MDOC_BLOCK != n->type)
- return;
- if (MDOC_Enum != a2list(n))
- return;
-
- ord = SLIST_FIRST(&h->ords);
- assert(ord);
- SLIST_REMOVE_HEAD(&h->ords, entry);
- free(ord);
-}
-
-
-static int
-mdoc_it_pre(MDOC_ARGS)
-{
- int type;
-
- if (MDOC_BLOCK == n->type)
- type = a2list(n->parent->parent);
- else
- type = a2list(n->parent->parent->parent);
-
- return(mdoc_tbl_pre(m, n, h, type));
-}
-
-
-/* ARGSUSED */
-static int
-mdoc_ex_pre(MDOC_ARGS)
-{
- const struct mdoc_node *nn;
- struct tag *t;
- struct htmlpair tag;
-
- print_text(h, "The");
-
- tag.key = ATTR_CLASS;
- tag.val = "utility";
-
- for (nn = n->child; nn; nn = nn->next) {
- t = print_otag(h, TAG_SPAN, 1, &tag);
- print_text(h, nn->string);
- print_tagq(h, t);
-
- h->flags |= HTML_NOSPACE;
-
- if (nn->next && NULL == nn->next->next)
- print_text(h, ", and");
- else if (nn->next)
- print_text(h, ",");
- else
- h->flags &= ~HTML_NOSPACE;
- }
-
- if (n->child->next)
- print_text(h, "utilities exit");
- else
- print_text(h, "utility exits");
-
- print_text(h, "0 on success, and >0 if an error occurs.");
- return(0);
-}
-
-
-/* ARGSUSED */
-static int
-mdoc_dq_pre(MDOC_ARGS)
-{
-
- if (MDOC_BODY != n->type)
- return(1);
- print_text(h, "\\(lq");
- h->flags |= HTML_NOSPACE;
- return(1);
-}
-
-
-/* ARGSUSED */
-static void
-mdoc_dq_post(MDOC_ARGS)
-{
-
- if (MDOC_BODY != n->type)
- return;
- h->flags |= HTML_NOSPACE;
- print_text(h, "\\(rq");
-}
-
-
-/* ARGSUSED */
-static int
-mdoc_pq_pre(MDOC_ARGS)
-{
-
- if (MDOC_BODY != n->type)
- return(1);
- print_text(h, "\\&(");
- h->flags |= HTML_NOSPACE;
- return(1);
-}
-
-
-/* ARGSUSED */
-static void
-mdoc_pq_post(MDOC_ARGS)
-{
-
- if (MDOC_BODY != n->type)
- return;
- print_text(h, ")");
-}
-
-
-/* ARGSUSED */
-static int
-mdoc_sq_pre(MDOC_ARGS)
-{
-
- if (MDOC_BODY != n->type)
- return(1);
- print_text(h, "\\(oq");
- h->flags |= HTML_NOSPACE;
- return(1);
-}
-
-
-/* ARGSUSED */
-static void
-mdoc_sq_post(MDOC_ARGS)
-{
-
- if (MDOC_BODY != n->type)
- return;
- h->flags |= HTML_NOSPACE;
- print_text(h, "\\(aq");
-}
-
-
-/* ARGSUSED */
-static int
-mdoc_em_pre(MDOC_ARGS)
-{
- struct htmlpair tag;
-
- tag.key = ATTR_CLASS;
- tag.val = "emph";
-
- print_otag(h, TAG_SPAN, 1, &tag);
- return(1);
-}
-
-
-/* ARGSUSED */
-static int
-mdoc_d1_pre(MDOC_ARGS)
-{
- struct htmlpair tag[2];
-
- if (MDOC_BLOCK != n->type)
- return(1);
-
- buffmt("margin-left: %dem;", INDENT);
-
- tag[0].key = ATTR_CLASS;
- tag[0].val = "lit";
- tag[1].key = ATTR_STYLE;
- tag[1].val = buf;
-
- print_otag(h, TAG_DIV, 2, tag);
- return(1);
-}
-
-
-/* ARGSUSED */