lzoruby 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. data/LICENSE.txt +339 -0
  2. data/README.txt +57 -0
  3. data/ext/compr1b.h +81 -0
  4. data/ext/compr1c.h +81 -0
  5. data/ext/config1.h +61 -0
  6. data/ext/config1a.h +196 -0
  7. data/ext/config1b.h +140 -0
  8. data/ext/config1c.h +145 -0
  9. data/ext/config1f.h +97 -0
  10. data/ext/config1x.h +118 -0
  11. data/ext/config1y.h +66 -0
  12. data/ext/config1z.h +65 -0
  13. data/ext/config2a.h +155 -0
  14. data/ext/extconf.rb +2 -0
  15. data/ext/lzo/lzo1.h +96 -0
  16. data/ext/lzo/lzo1a.h +96 -0
  17. data/ext/lzo/lzo1b.h +160 -0
  18. data/ext/lzo/lzo1c.h +160 -0
  19. data/ext/lzo/lzo1f.h +108 -0
  20. data/ext/lzo/lzo1x.h +177 -0
  21. data/ext/lzo/lzo1y.h +145 -0
  22. data/ext/lzo/lzo1z.h +150 -0
  23. data/ext/lzo/lzo2a.h +92 -0
  24. data/ext/lzo/lzo_asm.h +139 -0
  25. data/ext/lzo/lzoconf.h +417 -0
  26. data/ext/lzo/lzodefs.h +1807 -0
  27. data/ext/lzo/lzoutil.h +73 -0
  28. data/ext/lzo1.c +635 -0
  29. data/ext/lzo1_99.c +130 -0
  30. data/ext/lzo1_cm.ch +52 -0
  31. data/ext/lzo1_d.ch +155 -0
  32. data/ext/lzo1a.c +657 -0
  33. data/ext/lzo1a_99.c +130 -0
  34. data/ext/lzo1a_cm.ch +242 -0
  35. data/ext/lzo1a_cr.ch +128 -0
  36. data/ext/lzo1a_de.h +158 -0
  37. data/ext/lzo1b_1.c +46 -0
  38. data/ext/lzo1b_2.c +46 -0
  39. data/ext/lzo1b_3.c +46 -0
  40. data/ext/lzo1b_4.c +46 -0
  41. data/ext/lzo1b_5.c +46 -0
  42. data/ext/lzo1b_6.c +46 -0
  43. data/ext/lzo1b_7.c +46 -0
  44. data/ext/lzo1b_8.c +46 -0
  45. data/ext/lzo1b_9.c +46 -0
  46. data/ext/lzo1b_99.c +49 -0
  47. data/ext/lzo1b_9x.c +365 -0
  48. data/ext/lzo1b_c.ch +270 -0
  49. data/ext/lzo1b_cc.c +167 -0
  50. data/ext/lzo1b_cc.h +93 -0
  51. data/ext/lzo1b_cm.ch +294 -0
  52. data/ext/lzo1b_cr.ch +126 -0
  53. data/ext/lzo1b_d.ch +282 -0
  54. data/ext/lzo1b_d1.c +46 -0
  55. data/ext/lzo1b_d2.c +46 -0
  56. data/ext/lzo1b_de.h +344 -0
  57. data/ext/lzo1b_r.ch +117 -0
  58. data/ext/lzo1b_rr.c +43 -0
  59. data/ext/lzo1b_sm.ch +210 -0
  60. data/ext/lzo1b_tm.ch +99 -0
  61. data/ext/lzo1b_xx.c +98 -0
  62. data/ext/lzo1c_1.c +46 -0
  63. data/ext/lzo1c_2.c +46 -0
  64. data/ext/lzo1c_3.c +46 -0
  65. data/ext/lzo1c_4.c +46 -0
  66. data/ext/lzo1c_5.c +46 -0
  67. data/ext/lzo1c_6.c +46 -0
  68. data/ext/lzo1c_7.c +46 -0
  69. data/ext/lzo1c_8.c +46 -0
  70. data/ext/lzo1c_9.c +46 -0
  71. data/ext/lzo1c_99.c +49 -0
  72. data/ext/lzo1c_9x.c +379 -0
  73. data/ext/lzo1c_cc.c +167 -0
  74. data/ext/lzo1c_cc.h +93 -0
  75. data/ext/lzo1c_d1.c +46 -0
  76. data/ext/lzo1c_d2.c +46 -0
  77. data/ext/lzo1c_rr.c +43 -0
  78. data/ext/lzo1c_xx.c +98 -0
  79. data/ext/lzo1f_1.c +312 -0
  80. data/ext/lzo1f_9x.c +345 -0
  81. data/ext/lzo1f_d.ch +223 -0
  82. data/ext/lzo1f_d1.c +46 -0
  83. data/ext/lzo1f_d2.c +46 -0
  84. data/ext/lzo1x_1.c +50 -0
  85. data/ext/lzo1x_1k.c +50 -0
  86. data/ext/lzo1x_1l.c +50 -0
  87. data/ext/lzo1x_1o.c +50 -0
  88. data/ext/lzo1x_9x.c +881 -0
  89. data/ext/lzo1x_c.ch +351 -0
  90. data/ext/lzo1x_d.ch +466 -0
  91. data/ext/lzo1x_d1.c +46 -0
  92. data/ext/lzo1x_d2.c +46 -0
  93. data/ext/lzo1x_d3.c +108 -0
  94. data/ext/lzo1x_o.c +45 -0
  95. data/ext/lzo1x_oo.ch +366 -0
  96. data/ext/lzo1y_1.c +50 -0
  97. data/ext/lzo1y_9x.c +42 -0
  98. data/ext/lzo1y_d1.c +46 -0
  99. data/ext/lzo1y_d2.c +46 -0
  100. data/ext/lzo1y_d3.c +45 -0
  101. data/ext/lzo1y_o.c +45 -0
  102. data/ext/lzo1z_9x.c +42 -0
  103. data/ext/lzo1z_d1.c +46 -0
  104. data/ext/lzo1z_d2.c +46 -0
  105. data/ext/lzo1z_d3.c +45 -0
  106. data/ext/lzo2a_9x.c +357 -0
  107. data/ext/lzo2a_d.ch +188 -0
  108. data/ext/lzo2a_d1.c +46 -0
  109. data/ext/lzo2a_d2.c +46 -0
  110. data/ext/lzo_conf.h +323 -0
  111. data/ext/lzo_crc.c +167 -0
  112. data/ext/lzo_dict.h +316 -0
  113. data/ext/lzo_dll.ch +64 -0
  114. data/ext/lzo_init.c +176 -0
  115. data/ext/lzo_mchw.ch +242 -0
  116. data/ext/lzo_ptr.c +92 -0
  117. data/ext/lzo_ptr.h +154 -0
  118. data/ext/lzo_str.c +71 -0
  119. data/ext/lzo_swd.ch +707 -0
  120. data/ext/lzo_util.c +165 -0
  121. data/ext/lzoruby.c +149 -0
  122. data/ext/miniacc.h +6553 -0
  123. data/ext/stats1a.h +137 -0
  124. data/ext/stats1b.h +142 -0
  125. data/ext/stats1c.h +61 -0
  126. metadata +180 -0
data/ext/lzo/lzoconf.h ADDED
@@ -0,0 +1,417 @@
1
+ /* lzoconf.h -- configuration for the LZO real-time data compression library
2
+
3
+ This file is part of the LZO real-time data compression library.
4
+
5
+ Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
6
+ Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
7
+ Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
8
+ Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
9
+ Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
10
+ Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
11
+ Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
12
+ Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
13
+ Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
14
+ Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
15
+ Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
16
+ Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
17
+ Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
18
+ All Rights Reserved.
19
+
20
+ The LZO library is free software; you can redistribute it and/or
21
+ modify it under the terms of the GNU General Public License as
22
+ published by the Free Software Foundation; either version 2 of
23
+ the License, or (at your option) any later version.
24
+
25
+ The LZO library is distributed in the hope that it will be useful,
26
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ GNU General Public License for more details.
29
+
30
+ You should have received a copy of the GNU General Public License
31
+ along with the LZO library; see the file COPYING.
32
+ If not, write to the Free Software Foundation, Inc.,
33
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
34
+
35
+ Markus F.X.J. Oberhumer
36
+ <markus@oberhumer.com>
37
+ http://www.oberhumer.com/opensource/lzo/
38
+ */
39
+
40
+
41
+ #ifndef __LZOCONF_H_INCLUDED
42
+ #define __LZOCONF_H_INCLUDED
43
+
44
+ #define LZO_VERSION 0x2030
45
+ #define LZO_VERSION_STRING "2.03"
46
+ #define LZO_VERSION_DATE "Apr 30 2008"
47
+
48
+ /* internal Autoconf configuration file - only used when building LZO */
49
+ #if defined(LZO_HAVE_CONFIG_H)
50
+ # include <config.h>
51
+ #endif
52
+ #include <limits.h>
53
+ #include <stddef.h>
54
+
55
+
56
+ /***********************************************************************
57
+ // LZO requires a conforming <limits.h>
58
+ ************************************************************************/
59
+
60
+ #if !defined(CHAR_BIT) || (CHAR_BIT != 8)
61
+ # error "invalid CHAR_BIT"
62
+ #endif
63
+ #if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX)
64
+ # error "check your compiler installation"
65
+ #endif
66
+ #if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1)
67
+ # error "your limits.h macros are broken"
68
+ #endif
69
+
70
+ /* get OS and architecture defines */
71
+ #ifndef __LZODEFS_H_INCLUDED
72
+ #include "lzodefs.h"
73
+ #endif
74
+
75
+
76
+ #ifdef __cplusplus
77
+ extern "C" {
78
+ #endif
79
+
80
+
81
+ /***********************************************************************
82
+ // some core defines
83
+ ************************************************************************/
84
+
85
+ #if !defined(LZO_UINT32_C)
86
+ # if (UINT_MAX < LZO_0xffffffffL)
87
+ # define LZO_UINT32_C(c) c ## UL
88
+ # else
89
+ # define LZO_UINT32_C(c) ((c) + 0U)
90
+ # endif
91
+ #endif
92
+
93
+ /* memory checkers */
94
+ #if !defined(__LZO_CHECKER)
95
+ # if defined(__BOUNDS_CHECKING_ON)
96
+ # define __LZO_CHECKER 1
97
+ # elif defined(__CHECKER__)
98
+ # define __LZO_CHECKER 1
99
+ # elif defined(__INSURE__)
100
+ # define __LZO_CHECKER 1
101
+ # elif defined(__PURIFY__)
102
+ # define __LZO_CHECKER 1
103
+ # endif
104
+ #endif
105
+
106
+
107
+ /***********************************************************************
108
+ // integral and pointer types
109
+ ************************************************************************/
110
+
111
+ /* lzo_uint should match size_t */
112
+ #if !defined(LZO_UINT_MAX)
113
+ # if defined(LZO_ABI_LLP64) /* WIN64 */
114
+ # if defined(LZO_OS_WIN64)
115
+ typedef unsigned __int64 lzo_uint;
116
+ typedef __int64 lzo_int;
117
+ # else
118
+ typedef unsigned long long lzo_uint;
119
+ typedef long long lzo_int;
120
+ # endif
121
+ # define LZO_UINT_MAX 0xffffffffffffffffull
122
+ # define LZO_INT_MAX 9223372036854775807LL
123
+ # define LZO_INT_MIN (-1LL - LZO_INT_MAX)
124
+ # elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */
125
+ typedef unsigned int lzo_uint;
126
+ typedef int lzo_int;
127
+ # define LZO_UINT_MAX UINT_MAX
128
+ # define LZO_INT_MAX INT_MAX
129
+ # define LZO_INT_MIN INT_MIN
130
+ # elif (ULONG_MAX >= LZO_0xffffffffL)
131
+ typedef unsigned long lzo_uint;
132
+ typedef long lzo_int;
133
+ # define LZO_UINT_MAX ULONG_MAX
134
+ # define LZO_INT_MAX LONG_MAX
135
+ # define LZO_INT_MIN LONG_MIN
136
+ # else
137
+ # error "lzo_uint"
138
+ # endif
139
+ #endif
140
+
141
+ /* Integral types with 32 bits or more. */
142
+ #if !defined(LZO_UINT32_MAX)
143
+ # if (UINT_MAX >= LZO_0xffffffffL)
144
+ typedef unsigned int lzo_uint32;
145
+ typedef int lzo_int32;
146
+ # define LZO_UINT32_MAX UINT_MAX
147
+ # define LZO_INT32_MAX INT_MAX
148
+ # define LZO_INT32_MIN INT_MIN
149
+ # elif (ULONG_MAX >= LZO_0xffffffffL)
150
+ typedef unsigned long lzo_uint32;
151
+ typedef long lzo_int32;
152
+ # define LZO_UINT32_MAX ULONG_MAX
153
+ # define LZO_INT32_MAX LONG_MAX
154
+ # define LZO_INT32_MIN LONG_MIN
155
+ # else
156
+ # error "lzo_uint32"
157
+ # endif
158
+ #endif
159
+
160
+ /* The larger type of lzo_uint and lzo_uint32. */
161
+ #if (LZO_UINT_MAX >= LZO_UINT32_MAX)
162
+ # define lzo_xint lzo_uint
163
+ #else
164
+ # define lzo_xint lzo_uint32
165
+ #endif
166
+
167
+ /* Memory model that allows to access memory at offsets of lzo_uint. */
168
+ #if !defined(__LZO_MMODEL)
169
+ # if (LZO_UINT_MAX <= UINT_MAX)
170
+ # define __LZO_MMODEL
171
+ # elif defined(LZO_HAVE_MM_HUGE_PTR)
172
+ # define __LZO_MMODEL_HUGE 1
173
+ # define __LZO_MMODEL __huge
174
+ # else
175
+ # define __LZO_MMODEL
176
+ # endif
177
+ #endif
178
+
179
+ /* no typedef here because of const-pointer issues */
180
+ #define lzo_bytep unsigned char __LZO_MMODEL *
181
+ #define lzo_charp char __LZO_MMODEL *
182
+ #define lzo_voidp void __LZO_MMODEL *
183
+ #define lzo_shortp short __LZO_MMODEL *
184
+ #define lzo_ushortp unsigned short __LZO_MMODEL *
185
+ #define lzo_uint32p lzo_uint32 __LZO_MMODEL *
186
+ #define lzo_int32p lzo_int32 __LZO_MMODEL *
187
+ #define lzo_uintp lzo_uint __LZO_MMODEL *
188
+ #define lzo_intp lzo_int __LZO_MMODEL *
189
+ #define lzo_xintp lzo_xint __LZO_MMODEL *
190
+ #define lzo_voidpp lzo_voidp __LZO_MMODEL *
191
+ #define lzo_bytepp lzo_bytep __LZO_MMODEL *
192
+ /* deprecated - use `lzo_bytep' instead of `lzo_byte *' */
193
+ #define lzo_byte unsigned char __LZO_MMODEL
194
+
195
+ typedef int lzo_bool;
196
+
197
+
198
+ /***********************************************************************
199
+ // function types
200
+ ************************************************************************/
201
+
202
+ /* name mangling */
203
+ #if !defined(__LZO_EXTERN_C)
204
+ # ifdef __cplusplus
205
+ # define __LZO_EXTERN_C extern "C"
206
+ # else
207
+ # define __LZO_EXTERN_C extern
208
+ # endif
209
+ #endif
210
+
211
+ /* calling convention */
212
+ #if !defined(__LZO_CDECL)
213
+ # define __LZO_CDECL __lzo_cdecl
214
+ #endif
215
+
216
+ /* DLL export information */
217
+ #if !defined(__LZO_EXPORT1)
218
+ # define __LZO_EXPORT1
219
+ #endif
220
+ #if !defined(__LZO_EXPORT2)
221
+ # define __LZO_EXPORT2
222
+ #endif
223
+
224
+ /* __cdecl calling convention for public C and assembly functions */
225
+ #if !defined(LZO_PUBLIC)
226
+ # define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL
227
+ #endif
228
+ #if !defined(LZO_EXTERN)
229
+ # define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype)
230
+ #endif
231
+ #if !defined(LZO_PRIVATE)
232
+ # define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL
233
+ #endif
234
+
235
+ /* function types */
236
+ typedef int
237
+ (__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len,
238
+ lzo_bytep dst, lzo_uintp dst_len,
239
+ lzo_voidp wrkmem );
240
+
241
+ typedef int
242
+ (__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len,
243
+ lzo_bytep dst, lzo_uintp dst_len,
244
+ lzo_voidp wrkmem );
245
+
246
+ typedef int
247
+ (__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len,
248
+ lzo_bytep dst, lzo_uintp dst_len,
249
+ lzo_voidp wrkmem );
250
+
251
+ typedef int
252
+ (__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len,
253
+ lzo_bytep dst, lzo_uintp dst_len,
254
+ lzo_voidp wrkmem,
255
+ const lzo_bytep dict, lzo_uint dict_len );
256
+
257
+ typedef int
258
+ (__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len,
259
+ lzo_bytep dst, lzo_uintp dst_len,
260
+ lzo_voidp wrkmem,
261
+ const lzo_bytep dict, lzo_uint dict_len );
262
+
263
+
264
+ /* Callback interface. Currently only the progress indicator ("nprogress")
265
+ * is used, but this may change in a future release. */
266
+
267
+ struct lzo_callback_t;
268
+ typedef struct lzo_callback_t lzo_callback_t;
269
+ #define lzo_callback_p lzo_callback_t __LZO_MMODEL *
270
+
271
+ /* malloc & free function types */
272
+ typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t)
273
+ (lzo_callback_p self, lzo_uint items, lzo_uint size);
274
+ typedef void (__LZO_CDECL *lzo_free_func_t)
275
+ (lzo_callback_p self, lzo_voidp ptr);
276
+
277
+ /* a progress indicator callback function */
278
+ typedef void (__LZO_CDECL *lzo_progress_func_t)
279
+ (lzo_callback_p, lzo_uint, lzo_uint, int);
280
+
281
+ struct lzo_callback_t
282
+ {
283
+ /* custom allocators (set to 0 to disable) */
284
+ lzo_alloc_func_t nalloc; /* [not used right now] */
285
+ lzo_free_func_t nfree; /* [not used right now] */
286
+
287
+ /* a progress indicator callback function (set to 0 to disable) */
288
+ lzo_progress_func_t nprogress;
289
+
290
+ /* NOTE: the first parameter "self" of the nalloc/nfree/nprogress
291
+ * callbacks points back to this struct, so you are free to store
292
+ * some extra info in the following variables. */
293
+ lzo_voidp user1;
294
+ lzo_xint user2;
295
+ lzo_xint user3;
296
+ };
297
+
298
+
299
+ /***********************************************************************
300
+ // error codes and prototypes
301
+ ************************************************************************/
302
+
303
+ /* Error codes for the compression/decompression functions. Negative
304
+ * values are errors, positive values will be used for special but
305
+ * normal events.
306
+ */
307
+ #define LZO_E_OK 0
308
+ #define LZO_E_ERROR (-1)
309
+ #define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */
310
+ #define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */
311
+ #define LZO_E_INPUT_OVERRUN (-4)
312
+ #define LZO_E_OUTPUT_OVERRUN (-5)
313
+ #define LZO_E_LOOKBEHIND_OVERRUN (-6)
314
+ #define LZO_E_EOF_NOT_FOUND (-7)
315
+ #define LZO_E_INPUT_NOT_CONSUMED (-8)
316
+ #define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */
317
+
318
+
319
+ #ifndef lzo_sizeof_dict_t
320
+ # define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep))
321
+ #endif
322
+
323
+ /* lzo_init() should be the first function you call.
324
+ * Check the return code !
325
+ *
326
+ * lzo_init() is a macro to allow checking that the library and the
327
+ * compiler's view of various types are consistent.
328
+ */
329
+ #define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\
330
+ (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\
331
+ (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\
332
+ (int)sizeof(lzo_callback_t))
333
+ LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int);
334
+
335
+ /* version functions (useful for shared libraries) */
336
+ LZO_EXTERN(unsigned) lzo_version(void);
337
+ LZO_EXTERN(const char *) lzo_version_string(void);
338
+ LZO_EXTERN(const char *) lzo_version_date(void);
339
+ LZO_EXTERN(const lzo_charp) _lzo_version_string(void);
340
+ LZO_EXTERN(const lzo_charp) _lzo_version_date(void);
341
+
342
+ /* string functions */
343
+ LZO_EXTERN(int)
344
+ lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len);
345
+ LZO_EXTERN(lzo_voidp)
346
+ lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
347
+ LZO_EXTERN(lzo_voidp)
348
+ lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
349
+ LZO_EXTERN(lzo_voidp)
350
+ lzo_memset(lzo_voidp _s, int _c, lzo_uint _len);
351
+
352
+ /* checksum functions */
353
+ LZO_EXTERN(lzo_uint32)
354
+ lzo_adler32(lzo_uint32 _adler, const lzo_bytep _buf, lzo_uint _len);
355
+ LZO_EXTERN(lzo_uint32)
356
+ lzo_crc32(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len);
357
+ LZO_EXTERN(const lzo_uint32p)
358
+ lzo_get_crc32_table(void);
359
+
360
+ /* misc. */
361
+ LZO_EXTERN(int) _lzo_config_check(void);
362
+ typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u;
363
+ typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u;
364
+ typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t;
365
+
366
+ /* align a char pointer on a boundary that is a multiple of `size' */
367
+ LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
368
+ #define LZO_PTR_ALIGN_UP(_ptr,_size) \
369
+ ((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size)))
370
+
371
+
372
+ /***********************************************************************
373
+ // deprecated macros - only for backward compatibility with LZO v1.xx
374
+ ************************************************************************/
375
+
376
+ #if defined(LZO_CFG_COMPAT)
377
+
378
+ #define __LZOCONF_H 1
379
+
380
+ #if defined(LZO_ARCH_I086)
381
+ # define __LZO_i386 1
382
+ #elif defined(LZO_ARCH_I386)
383
+ # define __LZO_i386 1
384
+ #endif
385
+
386
+ #if defined(LZO_OS_DOS16)
387
+ # define __LZO_DOS 1
388
+ # define __LZO_DOS16 1
389
+ #elif defined(LZO_OS_DOS32)
390
+ # define __LZO_DOS 1
391
+ #elif defined(LZO_OS_WIN16)
392
+ # define __LZO_WIN 1
393
+ # define __LZO_WIN16 1
394
+ #elif defined(LZO_OS_WIN32)
395
+ # define __LZO_WIN 1
396
+ #endif
397
+
398
+ #define __LZO_CMODEL
399
+ #define __LZO_DMODEL
400
+ #define __LZO_ENTRY __LZO_CDECL
401
+ #define LZO_EXTERN_CDECL LZO_EXTERN
402
+ #define LZO_ALIGN LZO_PTR_ALIGN_UP
403
+
404
+ #define lzo_compress_asm_t lzo_compress_t
405
+ #define lzo_decompress_asm_t lzo_decompress_t
406
+
407
+ #endif /* LZO_CFG_COMPAT */
408
+
409
+
410
+ #ifdef __cplusplus
411
+ } /* extern "C" */
412
+ #endif
413
+
414
+ #endif /* already included */
415
+
416
+
417
+ /* vim:set ts=4 et: */