aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-12 10:09:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-12 10:09:19 +0000
commit0b20ee1ae342d058c3e78b46ba69335c80addfda (patch)
tree2c6c3b2b5b2b24cce540a79d6cafcda7e6bce9b3 /mdoc_html.c
parent078ee5b9efa7e35cf66a131178415a512c4a33fe (diff)
downloadmandoc-0b20ee1ae342d058c3e78b46ba69335c80addfda.tar.gz
mandoc-0b20ee1ae342d058c3e78b46ba69335c80addfda.tar.zst
mandoc-0b20ee1ae342d058c3e78b46ba69335c80addfda.zip
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.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 1ac0139e..0df11dc3 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.78 2010/06/07 11:01:15 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.79 2010/06/12 10:09:19 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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");