summaryrefslogtreecommitdiffstats
path: root/term.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-25 12:09:20 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-25 12:09:20 +0000
commit17758e0da9b52fb54e22c38cf77b36a01e52eb66 (patch)
tree5a2eb54f72021599f2ad8d629f0cc82c8ac55b92 /term.h
parentaaa7fb04d08ab8d819cd5e3fa11c66b02fe536e8 (diff)
downloadmandoc-17758e0da9b52fb54e22c38cf77b36a01e52eb66.tar.gz
Added "termpair" for symmetric flag-setting.
Diffstat (limited to 'term.h')
-rw-r--r--term.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/term.h b/term.h
index 622c355a..59eef170 100644
--- a/term.h
+++ b/term.h
@@ -40,11 +40,27 @@ struct termp {
char *buf;
};
+struct termpair {
+ int type;
+#define TERMPAIR_FLAG (1 << 0)
+ union {
+ int flag;
+ } data;
+};
+
+#define TERMPAIR_SETFLAG(p, fl) \
+ do { \
+ (p)->data.flag = (fl); \
+ (p)->type = TERMPAIR_FLAG; \
+ } while (0)
+
struct termact {
int (*pre)(struct termp *,
+ struct termpair *,
const struct mdoc_meta *,
const struct mdoc_node *);
void (*post)(struct termp *,
+ struct termpair *,
const struct mdoc_meta *,
const struct mdoc_node *);
};