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 | 0b20ee1ae342d058c3e78b46ba69335c80addfda (patch) | |
tree | 2c6c3b2b5b2b24cce540a79d6cafcda7e6bce9b3 /mdoc_action.c | |
parent | 078ee5b9efa7e35cf66a131178415a512c4a33fe (diff) | |
download | mandoc-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_action.c')
-rw-r--r-- | mdoc_action.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/mdoc_action.c b/mdoc_action.c index f27ef13b..f1c3b236 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.65 2010/06/03 13:44:36 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.66 2010/06/12 10:09:19 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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); } |