From af1a16ee46c535e7e97fe26fc4c6c05844de41e2 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 12 Jun 2010 11:21:44 +0000 Subject: 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). --- mdoc_action.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mdoc_action.c') 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 * @@ -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); -- cgit v1.2.3