- }
-
- if (LIST_column == type && MDOC_BODY == n->type) {
- nn = n->parent->child;
- for (i = 0; nn && nn != n; nn = nn->next)
- if (MDOC_BODY == nn->type)
- i++;
- if (i < (int)bl->data.Bl->ncols)
- a2width(bl->data.Bl->cols[i], &width);
- }
-
- if (MDOC_HEAD == n->type)
- return(mdoc_it_head_pre(m, n, h, type, &width));
- else if (MDOC_BODY == n->type)
- return(mdoc_it_body_pre(m, n, h, type, &width));
-
- return(mdoc_it_block_pre(m, n, h, type, comp, &offs, &width));
-}
-
-
-/* ARGSUSED */
-static int
-mdoc_bl_pre(MDOC_ARGS)
-{
- struct ord *ord;
-
- if (MDOC_HEAD == n->type)
- return(0);
- if (MDOC_BLOCK != n->type)
- return(1);
- assert(n->data.Bl);
- if (LIST_enum != n->data.Bl->type)
- return(1);
-
- ord = malloc(sizeof(struct ord));
- if (NULL == ord) {
- perror(NULL);
- exit((int)MANDOCLEVEL_SYSERR);
- }
- ord->cookie = n;
- ord->pos = 1;
- ord->next = h->ords.head;
- h->ords.head = ord;
- return(1);
-}
-
-
-/* ARGSUSED */
-static void
-mdoc_bl_post(MDOC_ARGS)
-{
- struct ord *ord;
-
- if (MDOC_BLOCK != n->type)
- return;
- if (LIST_enum != n->data.Bl->type)
- return;
-
- ord = h->ords.head;
- assert(ord);
- h->ords.head = ord->next;
- free(ord);
-}
-
-
-/* ARGSUSED */
-static int
-mdoc_ex_pre(MDOC_ARGS)
-{
- const struct mdoc_node *nn;
- struct tag *t;
- struct htmlpair tag;
-
- PAIR_CLASS_INIT(&tag, "utility");
-
- print_text(h, "The");
- 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 && 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, ")");
-}