diff options
Diffstat (limited to 'lptypes.h')
-rw-r--r-- | lptypes.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |