+ switch (n->type) {
+ case MDOC_HEAD:
+ outflags |= MMAN_PP | MMAN_nl;
+ bln = n->parent->parent;
+ if (0 == bln->norm->Bl.comp ||
+ (NULL == n->parent->prev &&
+ NULL == bln->parent->prev))
+ outflags |= MMAN_sp;
+ outflags &= ~MMAN_br;
+ switch (bln->norm->Bl.type) {
+ case LIST_item:
+ return(0);
+ case LIST_inset:
+ /* FALLTHROUGH */
+ case LIST_diag:
+ /* FALLTHROUGH */
+ case LIST_ohang:
+ if (bln->norm->Bl.type == LIST_diag)
+ print_line(".B \"", 0);
+ else
+ print_line(".R \"", 0);
+ outflags &= ~MMAN_spc;
+ return(1);
+ case LIST_bullet:
+ /* FALLTHROUGH */
+ case LIST_dash:
+ /* FALLTHROUGH */
+ case LIST_hyphen:
+ print_width(bln->norm->Bl.width, NULL, 0);
+ TPremain = 0;
+ outflags |= MMAN_nl;
+ font_push('B');
+ if (LIST_bullet == bln->norm->Bl.type)
+ print_word("\\(bu");
+ else
+ print_word("-");
+ font_pop();
+ outflags |= MMAN_nl;
+ return(0);
+ case LIST_enum:
+ print_width(bln->norm->Bl.width, NULL, 0);
+ TPremain = 0;
+ outflags |= MMAN_nl;
+ print_count(&bln->norm->Bl.count);
+ outflags |= MMAN_nl;
+ return(0);
+ case LIST_hang:
+ print_width(bln->norm->Bl.width, n->child, 6);
+ TPremain = 0;
+ outflags |= MMAN_nl;
+ return(1);
+ case LIST_tag:
+ print_width(bln->norm->Bl.width, n->child, 0);
+ putchar('\n');
+ outflags &= ~MMAN_spc;
+ return(1);
+ default:
+ return(1);
+ }
+ default:
+ break;
+ }
+ return(1);
+}
+
+/*
+ * This function is called after closing out an indented block.
+ * If we are inside an enclosing list, restore its indentation.
+ */
+static void
+mid_it(void)
+{
+ char buf[24];
+
+ /* Nothing to do outside a list. */
+ if (0 == Bl_stack_len || 0 == Bl_stack[Bl_stack_len - 1])
+ return;
+
+ /* The indentation has already been set up. */
+ if (Bl_stack_post[Bl_stack_len - 1])
+ return;
+
+ /* Restore the indentation of the enclosing list. */
+ print_line(".RS", MMAN_Bk_susp);
+ (void)snprintf(buf, sizeof(buf), "%zun",
+ Bl_stack[Bl_stack_len - 1]);
+ print_word(buf);
+
+ /* Remeber to close out this .RS block later. */
+ Bl_stack_post[Bl_stack_len - 1] = 1;
+}
+
+static void
+post_it(DECL_ARGS)
+{
+ const struct mdoc_node *bln;
+
+ bln = n->parent->parent;
+
+ switch (n->type) {
+ case MDOC_HEAD:
+ switch (bln->norm->Bl.type) {
+ case LIST_diag:
+ outflags &= ~MMAN_spc;
+ print_word("\\ ");
+ break;
+ case LIST_ohang:
+ outflags |= MMAN_br;
+ break;
+ default:
+ break;
+ }
+ break;
+ case MDOC_BODY: