From 8f3ec82bd3ba7aa8787e16c8c71de3b052b4866a Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 25 Feb 2009 12:27:37 +0000 Subject: Some offsets built into termpair. --- term.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'term.h') diff --git a/term.h b/term.h index 59eef170..9e850495 100644 --- a/term.h +++ b/term.h @@ -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 { -- cgit