summaryrefslogtreecommitdiffstatshomepage
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
commit3da36abba778bbb6f652585d4c8d476dcee854a4 (patch)
tree2cf242413bd3cb6cf4d827156e8d9c7bddbb73ce /term.h
parentc951a3baf41ca0fd6820e85f468a6d6f4a07a2f9 (diff)
downloadmandoc-3da36abba778bbb6f652585d4c8d476dcee854a4.tar.gz
mandoc-3da36abba778bbb6f652585d4c8d476dcee854a4.tar.zst
mandoc-3da36abba778bbb6f652585d4c8d476dcee854a4.zip
Added "termpair" for symmetric flag-setting.
Diffstat (limited to 'term.h')
-rw-r--r--term.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/term.h b/term.h
index 444423ed..c51ee48d 100644
--- a/term.h
+++ b/term.h
@@ -1,4 +1,4 @@
-/* $Id: term.h,v 1.5 2009/02/24 16:16:45 kristaps Exp $ */
+/* $Id: term.h,v 1.6 2009/02/25 12:09:20 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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 *);
};