summaryrefslogtreecommitdiffstatshomepage
path: root/term.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-25 12:27:37 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-25 12:27:37 +0000
commita017287dafe633c9f23e9990989b55dea239344c (patch)
treeb376c10c00c43d91aebb5492af1ae2a91a9baa6a /term.h
parent3da36abba778bbb6f652585d4c8d476dcee854a4 (diff)
downloadmandoc-a017287dafe633c9f23e9990989b55dea239344c.tar.gz
mandoc-a017287dafe633c9f23e9990989b55dea239344c.tar.zst
mandoc-a017287dafe633c9f23e9990989b55dea239344c.zip
Some offsets built into termpair.
Diffstat (limited to 'term.h')
-rw-r--r--term.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/term.h b/term.h
index c51ee48d..2bc6e9c2 100644
--- a/term.h
+++ b/term.h
@@ -1,4 +1,4 @@
-/* $Id: term.h,v 1.6 2009/02/25 12:09:20 kristaps Exp $ */
+/* $Id: term.h,v 1.7 2009/02/25 12:27:37 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -43,15 +43,15 @@ struct termp {
struct termpair {
int type;
#define TERMPAIR_FLAG (1 << 0)
- union {
- int flag;
- } data;
+ int flag;
+ size_t offset;
};
#define TERMPAIR_SETFLAG(p, fl) \
do { \
- (p)->data.flag = (fl); \
- (p)->type = TERMPAIR_FLAG; \
+ assert(! (TERMPAIR_FLAG & (p)->type)); \
+ (p)->flag = (fl); \
+ (p)->type |= TERMPAIR_FLAG; \
} while (0)
struct termact {