aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_action.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-12 11:21:44 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-12 11:21:44 +0000
commitaf1a16ee46c535e7e97fe26fc4c6c05844de41e2 (patch)
treebdb915b10db4fb4c1abb8e6c595cfc2957cb98e2 /mdoc_action.c
parent0b20ee1ae342d058c3e78b46ba69335c80addfda (diff)
downloadmandoc-af1a16ee46c535e7e97fe26fc4c6c05844de41e2.tar.gz
mandoc-af1a16ee46c535e7e97fe26fc4c6c05844de41e2.tar.zst
mandoc-af1a16ee46c535e7e97fe26fc4c6c05844de41e2.zip
Cache all of `Bd's resolved arguments into mdoc_bd, which is stashed in
the "data" union in mdoc_node. Allows me to remove some ugly loops in the front-end and duplicate tests in mdoc_action.c. Add a regression test to make sure we're not doing anything bad (more to come).
Diffstat (limited to 'mdoc_action.c')
-rw-r--r--mdoc_action.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mdoc_action.c b/mdoc_action.c
index f1c3b236..e103eb98 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_action.c,v 1.66 2010/06/12 10:09:19 kristaps Exp $ */
+/* $Id: mdoc_action.c,v 1.67 2010/06/12 11:21:44 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -979,14 +979,12 @@ static int
pre_bd(PRE_ARGS)
{
- if (MDOC_BLOCK == n->type)
- return(pre_offset(m, n));
if (MDOC_BODY != n->type)
return(1);
- if (DISP_literal == n->data.disp)
+ if (DISP_literal == n->data.Bd.type)
m->flags |= MDOC_LITERAL;
- if (DISP_unfilled == n->data.disp)
+ if (DISP_unfilled == n->data.Bd.type)
m->flags |= MDOC_LITERAL;
return(1);