summaryrefslogtreecommitdiffstats
path: root/mdoc.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-17 23:57:06 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-17 23:57:06 +0000
commit26062711bedfc2a29550c2d705beb1d77d7ee0b3 (patch)
tree191667292c6c27bf1989ad6bb8654d7f6f94a4a9 /mdoc.h
parent67ec6f950232a27295516acb54b9a80b5ddd08f0 (diff)
downloadmandoc-26062711bedfc2a29550c2d705beb1d77d7ee0b3.tar.gz
Increase performance by stashing the list type in struct mdoc_node.
This will eventually be used so that mdoc_macro can known whether to dump list line arguments into the body (`Bl -column' overflowing). Remove a2list() and arg_listtype() because of this.
Diffstat (limited to 'mdoc.h')
-rw-r--r--mdoc.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/mdoc.h b/mdoc.h
index 99857a14..8b2c9a05 100644
--- a/mdoc.h
+++ b/mdoc.h
@@ -247,6 +247,21 @@ struct mdoc_arg {
unsigned int refcnt;
};
+enum mdoc_list {
+ LIST__NONE = 0,
+ LIST_bullet,
+ LIST_column,
+ LIST_dash,
+ LIST_diag,
+ LIST_enum,
+ LIST_hang,
+ LIST_hyphen,
+ LIST_inset,
+ LIST_item,
+ LIST_ohang,
+ LIST_tag
+};
+
/* Node in AST. */
struct mdoc_node {
struct mdoc_node *parent; /* parent AST node */
@@ -272,6 +287,10 @@ struct mdoc_node {
struct mdoc_node *body; /* BLOCK */
struct mdoc_node *tail; /* BLOCK */
char *string; /* TEXT */
+
+ union {
+ enum mdoc_list list; /* for `Bl' nodes */
+ } data;
};
#define MDOC_IGN_SCOPE (1 << 0) /* Ignore scope violations. */