1#ifndef MYISAMPACK_INCLUDED
2#define MYISAMPACK_INCLUDED
52 return (
int32)((A[0] & 128) ? ((255U << 24) | ((
uint32)(A[0]) << 16) |
54 : (((
uint32)(A[0]) << 16) |
109#define mi_int1store(T, A) *((uchar *)(T)) = (uchar)(A)
111#define mi_int2store(T, A) \
113 uint def_temp = (uint)(A); \
114 ((uchar *)(T))[1] = (uchar)(def_temp); \
115 ((uchar *)(T))[0] = (uchar)(def_temp >> 8); \
117#define mi_int3store(T, A) \
119 ulong def_temp = (ulong)(A); \
120 ((uchar *)(T))[2] = (uchar)(def_temp); \
121 ((uchar *)(T))[1] = (uchar)(def_temp >> 8); \
122 ((uchar *)(T))[0] = (uchar)(def_temp >> 16); \
124#define mi_int4store(T, A) \
126 ulong def_temp = (ulong)(A); \
127 ((uchar *)(T))[3] = (uchar)(def_temp); \
128 ((uchar *)(T))[2] = (uchar)(def_temp >> 8); \
129 ((uchar *)(T))[1] = (uchar)(def_temp >> 16); \
130 ((uchar *)(T))[0] = (uchar)(def_temp >> 24); \
132#define mi_int5store(T, A) \
134 ulong def_temp = (ulong)(A), def_temp2 = (ulong)((A) >> 32); \
135 ((uchar *)(T))[4] = (uchar)(def_temp); \
136 ((uchar *)(T))[3] = (uchar)(def_temp >> 8); \
137 ((uchar *)(T))[2] = (uchar)(def_temp >> 16); \
138 ((uchar *)(T))[1] = (uchar)(def_temp >> 24); \
139 ((uchar *)(T))[0] = (uchar)(def_temp2); \
141#define mi_int6store(T, A) \
143 ulong def_temp = (ulong)(A), def_temp2 = (ulong)((A) >> 32); \
144 ((uchar *)(T))[5] = (uchar)(def_temp); \
145 ((uchar *)(T))[4] = (uchar)(def_temp >> 8); \
146 ((uchar *)(T))[3] = (uchar)(def_temp >> 16); \
147 ((uchar *)(T))[2] = (uchar)(def_temp >> 24); \
148 ((uchar *)(T))[1] = (uchar)(def_temp2); \
149 ((uchar *)(T))[0] = (uchar)(def_temp2 >> 8); \
151#define mi_int7store(T, A) \
153 ulong def_temp = (ulong)(A), def_temp2 = (ulong)((A) >> 32); \
154 ((uchar *)(T))[6] = (uchar)(def_temp); \
155 ((uchar *)(T))[5] = (uchar)(def_temp >> 8); \
156 ((uchar *)(T))[4] = (uchar)(def_temp >> 16); \
157 ((uchar *)(T))[3] = (uchar)(def_temp >> 24); \
158 ((uchar *)(T))[2] = (uchar)(def_temp2); \
159 ((uchar *)(T))[1] = (uchar)(def_temp2 >> 8); \
160 ((uchar *)(T))[0] = (uchar)(def_temp2 >> 16); \
162#define mi_int8store(T, A) \
164 ulong def_temp3 = (ulong)(A), def_temp4 = (ulong)((A) >> 32); \
165 mi_int4store((uchar *)(T) + 0, def_temp4); \
166 mi_int4store((uchar *)(T) + 4, def_temp3); \
169#ifdef WORDS_BIGENDIAN
171#define mi_float4store(T, A) \
173 ((uchar *)(T))[0] = ((uchar *)&A)[0]; \
174 ((uchar *)(T))[1] = ((uchar *)&A)[1]; \
175 ((uchar *)(T))[2] = ((uchar *)&A)[2]; \
176 ((uchar *)(T))[3] = ((uchar *)&A)[3]; \
181 ((
uchar *)&def_temp)[0] =
M[0];
182 ((
uchar *)&def_temp)[1] =
M[1];
183 ((
uchar *)&def_temp)[2] =
M[2];
184 ((
uchar *)&def_temp)[3] =
M[3];
188#define mi_float8store(T, V) \
190 ((uchar *)(T))[0] = ((uchar *)&V)[0]; \
191 ((uchar *)(T))[1] = ((uchar *)&V)[1]; \
192 ((uchar *)(T))[2] = ((uchar *)&V)[2]; \
193 ((uchar *)(T))[3] = ((uchar *)&V)[3]; \
194 ((uchar *)(T))[4] = ((uchar *)&V)[4]; \
195 ((uchar *)(T))[5] = ((uchar *)&V)[5]; \
196 ((uchar *)(T))[6] = ((uchar *)&V)[6]; \
197 ((uchar *)(T))[7] = ((uchar *)&V)[7]; \
202 ((
uchar *)&def_temp)[0] =
M[0];
203 ((
uchar *)&def_temp)[1] =
M[1];
204 ((
uchar *)&def_temp)[2] =
M[2];
205 ((
uchar *)&def_temp)[3] =
M[3];
206 ((
uchar *)&def_temp)[4] =
M[4];
207 ((
uchar *)&def_temp)[5] =
M[5];
208 ((
uchar *)&def_temp)[6] =
M[6];
209 ((
uchar *)&def_temp)[7] =
M[7];
214#define mi_float4store(T, A) \
216 ((uchar *)(T))[0] = ((uchar *)&A)[3]; \
217 ((uchar *)(T))[1] = ((uchar *)&A)[2]; \
218 ((uchar *)(T))[2] = ((uchar *)&A)[1]; \
219 ((uchar *)(T))[3] = ((uchar *)&A)[0]; \
224 ((
uchar *)&def_temp)[0] =
M[3];
225 ((
uchar *)&def_temp)[1] =
M[2];
226 ((
uchar *)&def_temp)[2] =
M[1];
227 ((
uchar *)&def_temp)[3] =
M[0];
231#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
232#define mi_float8store(T, V) \
234 ((uchar *)(T))[0] = ((uchar *)&V)[3]; \
235 ((uchar *)(T))[1] = ((uchar *)&V)[2]; \
236 ((uchar *)(T))[2] = ((uchar *)&V)[1]; \
237 ((uchar *)(T))[3] = ((uchar *)&V)[0]; \
238 ((uchar *)(T))[4] = ((uchar *)&V)[7]; \
239 ((uchar *)(T))[5] = ((uchar *)&V)[6]; \
240 ((uchar *)(T))[6] = ((uchar *)&V)[5]; \
241 ((uchar *)(T))[7] = ((uchar *)&V)[4]; \
246 ((
uchar *)&def_temp)[0] =
M[3];
247 ((
uchar *)&def_temp)[1] =
M[2];
248 ((
uchar *)&def_temp)[2] =
M[1];
249 ((
uchar *)&def_temp)[3] =
M[0];
250 ((
uchar *)&def_temp)[4] =
M[7];
251 ((
uchar *)&def_temp)[5] =
M[6];
252 ((
uchar *)&def_temp)[6] =
M[5];
253 ((
uchar *)&def_temp)[7] =
M[4];
258#define mi_float8store(T, V) \
260 ((uchar *)(T))[0] = ((uchar *)&V)[7]; \
261 ((uchar *)(T))[1] = ((uchar *)&V)[6]; \
262 ((uchar *)(T))[2] = ((uchar *)&V)[5]; \
263 ((uchar *)(T))[3] = ((uchar *)&V)[4]; \
264 ((uchar *)(T))[4] = ((uchar *)&V)[3]; \
265 ((uchar *)(T))[5] = ((uchar *)&V)[2]; \
266 ((uchar *)(T))[6] = ((uchar *)&V)[1]; \
267 ((uchar *)(T))[7] = ((uchar *)&V)[0]; \
272 ((
uchar *)&def_temp)[0] =
M[7];
273 ((
uchar *)&def_temp)[1] =
M[6];
274 ((
uchar *)&def_temp)[2] =
M[5];
275 ((
uchar *)&def_temp)[3] =
M[4];
276 ((
uchar *)&def_temp)[4] =
M[3];
277 ((
uchar *)&def_temp)[5] =
M[2];
278 ((
uchar *)&def_temp)[6] =
M[1];
279 ((
uchar *)&def_temp)[7] =
M[0];
286#define mi_rowstore(T, A) mi_int8store(T, A)
287#define mi_rowkorr(T) mi_uint8korr(T)
289#define mi_sizestore(T, A) mi_int8store(T, A)
290#define mi_sizekorr(T) mi_uint8korr(T)
#define M
Definition: ctype-tis620.cc:74
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
uint8_t uint8
Definition: my_inttypes.h:63
unsigned char uchar
Definition: my_inttypes.h:52
long long int longlong
Definition: my_inttypes.h:55
int16_t int16
Definition: my_inttypes.h:64
int8_t int8
Definition: my_inttypes.h:62
int32_t int32
Definition: my_inttypes.h:66
uint16_t uint16
Definition: my_inttypes.h:65
uint32_t uint32
Definition: my_inttypes.h:67
static int8 mi_sint1korr(const uchar *A)
Definition: myisampack.h:43
static uint32 mi_uint4korr(const uchar *A)
Definition: myisampack.h:71
static ulonglong mi_uint6korr(const uchar *A)
Definition: myisampack.h:82
static int16 mi_sint2korr(const uchar *A)
Definition: myisampack.h:47
static ulonglong mi_uint5korr(const uchar *A)
Definition: myisampack.h:76
static longlong mi_sint8korr(const uchar *A)
Definition: myisampack.h:104
static uint16 mi_uint2korr(const uchar *A)
Definition: myisampack.h:63
static ulonglong mi_uint8korr(const uchar *A)
Definition: myisampack.h:96
static int32 mi_sint3korr(const uchar *A)
Definition: myisampack.h:51
static uint8 mi_uint1korr(const uchar *A)
Definition: myisampack.h:45
static float mi_float4get(const uchar *M)
Definition: myisampack.h:222
static double mi_float8get(const uchar *M)
Definition: myisampack.h:270
static int32 mi_sint4korr(const uchar *A)
Definition: myisampack.h:58
static uint32 mi_uint3korr(const uchar *A)
Definition: myisampack.h:67
static ulonglong mi_uint7korr(const uchar *A)
Definition: myisampack.h:88