- case (LIST_column):
- break;
- default:
- bufcat_su(h, "min-width", width);
- SCALE_INVERT(width);
- bufcat_su(h, "margin-left", width);
- if (n->next && n->next->child)
- bufcat_style(h, "float", "left");
-
- /* XXX: buffer if we run into body. */
- SCALE_HS_INIT(width, 1);
- bufcat_su(h, "margin-right", width);
- PAIR_STYLE_INIT(&tag, h);
- print_otag(h, TAG_DIV, 1, &tag);
- break;
- }
-
- switch (type) {
- case (LIST_diag):
- PAIR_CLASS_INIT(&tag, "diag");
- print_otag(h, TAG_SPAN, 1, &tag);
- break;
- case (LIST_enum):
- ord = h->ords.head;
- assert(ord);
- nbuf[BUFSIZ - 1] = 0;
- (void)snprintf(nbuf, BUFSIZ - 1, "%d.", ord->pos++);
- print_text(h, nbuf);
- return(0);
- case (LIST_dash):
- print_text(h, "\\(en");
- return(0);
- case (LIST_hyphen):
- print_text(h, "\\(hy");
- return(0);
- case (LIST_bullet):
- print_text(h, "\\(bu");
- return(0);
- default:
- break;
- }
-
- return(1);
-}
-
-
-static int
-mdoc_it_pre(MDOC_ARGS)
-{
- int i, comp;
- const struct mdoc_node *bl, *nn;
- struct roffsu width, offs;
- enum mdoc_list type;
-
- /*
- * XXX: be very careful in changing anything, here. Lists in
- * mandoc have many peculiarities; furthermore, they don't
- * translate well into HTML and require a bit of mangling.
- */
-
- bl = n->parent->parent;
- if (MDOC_BLOCK != n->type)
- bl = bl->parent;
-
- SCALE_HS_INIT(&offs, 0);
-
- assert(bl->data.Bl);
- type = bl->data.Bl->type;
- comp = bl->data.Bl->comp;
-
- if (bl->data.Bl->offs)
- a2offs(bl->data.Bl->offs, &offs);
-
- switch (type) {
- case (LIST_enum):
- /* FALLTHROUGH */
- case (LIST_dash):
- /* FALLTHROUGH */
- case (LIST_hyphen):
- /* FALLTHROUGH */
- case (LIST_bullet):
- SCALE_HS_INIT(&width, 2);
- break;
- default:
- SCALE_HS_INIT(&width, INDENT);
- break;
- }
-
- if (bl->data.Bl->width)
- a2width(bl->data.Bl->width, &width);
-
- /* Override width in some cases. */
-
- switch (type) {
- case (LIST_ohang):
- /* FALLTHROUGH */
- case (LIST_item):
- /* FALLTHROUGH */
- case (LIST_inset):
- /* FALLTHROUGH */
- case (LIST_diag):
- SCALE_HS_INIT(&width, 0);
- break;
- default:
- if (0 == width.scale)
- SCALE_HS_INIT(&width, INDENT);
- break;