summaryrefslogtreecommitdiffstats
path: root/mdoc.h
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
commitdfe0c6ee455f4a355885a711c81c5ae06ac20160 (patch)
tree315130eeda507d9b21635e011e5e3fd44e81fec9 /mdoc.h
parent19a85530e5d01229ad79001edab4bec02b3acda3 (diff)
downloadmandoc-dfe0c6ee455f4a355885a711c81c5ae06ac20160.tar.gz
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.h')
-rw-r--r--mdoc.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/mdoc.h b/mdoc.h
index 07490544..def26d77 100644
--- a/mdoc.h
+++ b/mdoc.h
@@ -272,6 +272,12 @@ enum mdoc_disp {
DISP_literal
};
+struct mdoc_bd {
+ const char *offs;
+ enum mdoc_disp type;
+ int comp;
+};
+
/* Node in AST. */
struct mdoc_node {
struct mdoc_node *parent; /* parent AST node */
@@ -300,7 +306,7 @@ struct mdoc_node {
union {
enum mdoc_list list; /* `Bl' nodes */
- enum mdoc_disp disp; /* `Bd' nodes */
+ struct mdoc_bd Bd;
} data;
};