diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-02-25 12:09:20 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-02-25 12:09:20 +0000 |
commit | 17758e0da9b52fb54e22c38cf77b36a01e52eb66 (patch) | |
tree | 5a2eb54f72021599f2ad8d629f0cc82c8ac55b92 /term.h | |
parent | aaa7fb04d08ab8d819cd5e3fa11c66b02fe536e8 (diff) | |
download | mandoc-17758e0da9b52fb54e22c38cf77b36a01e52eb66.tar.gz |
Added "termpair" for symmetric flag-setting.
Diffstat (limited to 'term.h')
-rw-r--r-- | term.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 *); }; |