]> git.cameronkatri.com Git - mandoc.git/blobdiff - term.h
Some offsets built into termpair.
[mandoc.git] / term.h
diff --git a/term.h b/term.h
index c51ee48d6bc574e3f00153fc5c40301da3263e7c..2bc6e9c2dcbae15542c1da8c1c8ff033a1a5b569 100644 (file)
--- 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 {