From 19a85530e5d01229ad79001edab4bec02b3acda3 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 12 Jun 2010 10:09:19 +0000 Subject: 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'). --- mdoc_action.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'mdoc_action.c') diff --git a/mdoc_action.c b/mdoc_action.c index 43b92d9c..8aa7c92f 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -978,20 +978,16 @@ pre_bl(PRE_ARGS) static int pre_bd(PRE_ARGS) { - int i; if (MDOC_BLOCK == n->type) return(pre_offset(m, n)); if (MDOC_BODY != n->type) return(1); - /* Enter literal context if `Bd -literal' or `-unfilled'. */ - - for (n = n->parent, i = 0; i < (int)n->args->argc; i++) - if (MDOC_Literal == n->args->argv[i].arg) - m->flags |= MDOC_LITERAL; - else if (MDOC_Unfilled == n->args->argv[i].arg) - m->flags |= MDOC_LITERAL; + if (DISP_literal == n->data.disp) + m->flags |= MDOC_LITERAL; + if (DISP_unfilled == n->data.disp) + m->flags |= MDOC_LITERAL; return(1); } -- cgit