summaryrefslogtreecommitdiffstats
path: root/mdoc.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-12 10:09:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-12 10:09:19 +0000
commit19a85530e5d01229ad79001edab4bec02b3acda3 (patch)
tree063943b7c271fbe724ef7acb4f533412a531696f /mdoc.h
parent7630dc1417861d87d760d9dc3bebb85bf7a762b5 (diff)
downloadmandoc-19a85530e5d01229ad79001edab4bec02b3acda3.tar.gz
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.h')
-rw-r--r--mdoc.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/mdoc.h b/mdoc.h
index 9fcc4d5a..07490544 100644
--- a/mdoc.h
+++ b/mdoc.h
@@ -263,6 +263,15 @@ enum mdoc_list {
LIST_tag
};
+enum mdoc_disp {
+ DISP__NONE = 0,
+ DISP_centred,
+ DISP_ragged,
+ DISP_unfilled,
+ DISP_filled,
+ DISP_literal
+};
+
/* Node in AST. */
struct mdoc_node {
struct mdoc_node *parent; /* parent AST node */
@@ -290,7 +299,8 @@ struct mdoc_node {
char *string; /* TEXT */
union {
- enum mdoc_list list; /* for `Bl' nodes */
+ enum mdoc_list list; /* `Bl' nodes */
+ enum mdoc_disp disp; /* `Bd' nodes */
} data;
};