diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-12 10:09:19 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-12 10:09:19 +0000 |
commit | 19a85530e5d01229ad79001edab4bec02b3acda3 (patch) | |
tree | 063943b7c271fbe724ef7acb4f533412a531696f /mdoc_html.c | |
parent | 7630dc1417861d87d760d9dc3bebb85bf7a762b5 (diff) | |
download | mandoc-19a85530e5d01229ad79001edab4bec02b3acda3.tar.gz |
Added enum mdoc_disp (similar to enum mdoc_list). Display types are now
only calculated once in mdoc_validate.c.
Noted that `Bd -file xxx' is not supported: it now raises a fatal
warning. This is noted in mdoc.7.
Empty `Bd' now defaults to LIST_ragged, which is not quite what groff
does, but close enough (gross just throws away the `Bd' and gets upset
when it encounters an `Ed').
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 1c8bb832..66f005b1 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1353,7 +1353,7 @@ static int mdoc_bd_pre(MDOC_ARGS) { struct htmlpair tag[2]; - int type, comp, i; + int comp, i; const struct mdoc_node *bl, *nn; struct roffsu su; @@ -1366,7 +1366,7 @@ mdoc_bd_pre(MDOC_ARGS) SCALE_VS_INIT(&su, 0); - type = comp = 0; + comp = 0; for (i = 0; bl->args && i < (int)bl->args->argc; i++) switch (bl->args->argv[i].arg) { case (MDOC_Offset): @@ -1375,17 +1375,6 @@ mdoc_bd_pre(MDOC_ARGS) case (MDOC_Compact): comp = 1; break; - case (MDOC_Centred): - /* FALLTHROUGH */ - case (MDOC_Ragged): - /* FALLTHROUGH */ - case (MDOC_Filled): - /* FALLTHROUGH */ - case (MDOC_Unfilled): - /* FALLTHROUGH */ - case (MDOC_Literal): - type = bl->args->argv[i].arg; - break; default: break; } @@ -1415,7 +1404,8 @@ mdoc_bd_pre(MDOC_ARGS) return(1); } - if (MDOC_Unfilled != type && MDOC_Literal != type) + if (DISP_unfilled != n->data.disp && + DISP_literal != n->data.disp) return(1); PAIR_CLASS_INIT(&tag[0], "lit"); |