aboutsummaryrefslogtreecommitdiff
path: root/lptypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'lptypes.h')
-rw-r--r--lptypes.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lptypes.h b/lptypes.h
index 81aa61e..d1cd5be 100644
--- a/lptypes.h
+++ b/lptypes.h
@@ -127,19 +127,19 @@ typedef struct Charset {
127#define MAXPATTSIZE (SHRT_MAX - 10) 127#define MAXPATTSIZE (SHRT_MAX - 10)
128 128
129 129
130/* size (in elements) for an instruction plus extra l bytes */ 130/* size (in instructions) for l bytes (l > 0) */
131#define instsize(l) (((l) + sizeof(Instruction) - 1)/sizeof(Instruction) + 1) 131#define instsize(l) (((l) - 1)/sizeof(Instruction) + 1)
132 132
133 133
134/* size (in elements) for a ISet instruction */ 134/* size (in elements) for a ISet instruction */
135#define CHARSETINSTSIZE instsize(CHARSETSIZE) 135#define CHARSETINSTSIZE (1 + instsize(CHARSETSIZE))
136 136
137/* size (in elements) for a IFunc instruction */ 137/* size (in elements) for a IFunc instruction */
138#define funcinstsize(p) ((p)->i.aux + 2) 138#define funcinstsize(p) ((p)->i.aux + 2)
139 139
140 140
141 141
142#define testchar(st,c) (((int)(st)[((c) >> 3)] & (1 << ((c) & 7)))) 142#define testchar(st,c) ((((unsigned int)(st)[((c) >> 3)]) >> ((c) & 7)) & 1)
143 143
144 144
145#endif 145#endif