=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.115 retrieving revision 1.117 diff -u -p -r1.115 -r1.117 --- mandoc/mdoc_html.c 2010/12/15 14:52:16 1.115 +++ mandoc/mdoc_html.c 2010/12/15 15:59:23 1.117 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.115 2010/12/15 14:52:16 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.117 2010/12/15 15:59:23 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -246,13 +246,13 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = { static const char * const lists[LIST_MAX] = { NULL, - "list-bullet", - "list-column", + "list-bul", + "list-col", "list-dash", "list-diag", "list-enum", "list-hang", - "list-hyphen", + "list-hyph", "list-inset", "list-item", "list-ohang", @@ -369,7 +369,6 @@ static void print_mdoc(MDOC_ARGS) { struct tag *t; - struct htmlpair tag; t = print_otag(h, TAG_HEAD, 0, NULL); print_mdoc_head(m, n, h); @@ -377,10 +376,6 @@ print_mdoc(MDOC_ARGS) t = print_otag(h, TAG_BODY, 0, NULL); - tag.key = ATTR_CLASS; - tag.val = "body"; - print_otag(h, TAG_DIV, 1, &tag); - print_mdoc_nodelist(m, n, h); print_tagq(h, t); } @@ -903,7 +898,7 @@ mdoc_it_pre(MDOC_ARGS) { struct roffsu su; enum mdoc_list type; - struct htmlpair tag; + struct htmlpair tag[2]; const struct mdoc_node *bl; bl = n->parent; @@ -914,11 +909,12 @@ mdoc_it_pre(MDOC_ARGS) type = bl->data.Bl->type; - /* Whether we're top-padded (not "compact"). */ + assert(lists[type]); + PAIR_CLASS_INIT(&tag[0], lists[type]); SCALE_VS_INIT(&su, ! bl->data.Bl->comp); bufcat_su(h, "margin-top", &su); - PAIR_STYLE_INIT(&tag, h); + PAIR_STYLE_INIT(&tag[1], h); if (MDOC_HEAD == n->type) { switch (type) { @@ -941,7 +937,7 @@ mdoc_it_pre(MDOC_ARGS) case(LIST_ohang): /* FALLTHROUGH */ case(LIST_tag): - print_otag(h, TAG_DT, 1, &tag); + print_otag(h, TAG_DT, 2, tag); break; case(LIST_column): break; @@ -960,7 +956,7 @@ mdoc_it_pre(MDOC_ARGS) /* FALLTHROUGH */ case(LIST_item): /* FALLTHROUGH */ - print_otag(h, TAG_LI, 1, &tag); + print_otag(h, TAG_LI, 2, tag); break; case(LIST_diag): /* FALLTHROUGH */ @@ -971,10 +967,10 @@ mdoc_it_pre(MDOC_ARGS) case(LIST_ohang): /* FALLTHROUGH */ case(LIST_tag): - print_otag(h, TAG_DD, 0, NULL); + print_otag(h, TAG_DD, 1, tag); break; case(LIST_column): - print_otag(h, TAG_TD, 1, &tag); + print_otag(h, TAG_TD, 2, tag); break; default: break; @@ -982,7 +978,7 @@ mdoc_it_pre(MDOC_ARGS) } else { switch (type) { case (LIST_column): - print_otag(h, TAG_TR, 0, NULL); + print_otag(h, TAG_TR, 1, tag); break; default: break; @@ -1042,7 +1038,6 @@ mdoc_bl_pre(MDOC_ARGS) bufcat_su(h, "margin-left", &su); PAIR_STYLE_INIT(&tag[1], h); i = 2; - } switch (n->data.Bl->type) {