annotate libmpcodecs/native/lzoconf.h @ 10774:3a6ed2ad244d

FFASV2
author michael
date Mon, 01 Sep 2003 08:29:54 +0000
parents 628c85c15c7b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3803
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
1 /* lzoconf.h -- configuration for the LZO real-time data compression library
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
2
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
3 This file is part of the LZO real-time data compression library.
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
4
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
5 Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
6 Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
7 Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
8 Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
9 Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
10
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
11 The LZO library is free software; you can redistribute it and/or
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
12 modify it under the terms of the GNU General Public License as
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
13 published by the Free Software Foundation; either version 2 of
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
14 the License, or (at your option) any later version.
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
15
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
16 The LZO library is distributed in the hope that it will be useful,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
19 GNU General Public License for more details.
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
20
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
21 You should have received a copy of the GNU General Public License
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
22 along with the LZO library; see the file COPYING.
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
23 If not, write to the Free Software Foundation, Inc.,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
24 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
25
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
26 Markus F.X.J. Oberhumer
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
27 <markus.oberhumer@jk.uni-linz.ac.at>
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
28 http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
29 */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
30
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
31
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
32 #ifndef __LZOCONF_H
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
33 #define __LZOCONF_H
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
34
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
35 #define LZO_VERSION 0x1070
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
36 #define LZO_VERSION_STRING "1.07"
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
37 #define LZO_VERSION_DATE "Oct 18 2000"
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
38
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
39 /* internal Autoconf configuration file - only used when building LZO */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
40 #if defined(LZO_HAVE_CONFIG_H)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
41 # include <config.h>
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
42 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
43 #include <limits.h>
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
44
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
45 #ifdef __cplusplus
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
46 extern "C" {
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
47 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
48
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
49
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
50 /***********************************************************************
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
51 // LZO requires a conforming <limits.h>
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
52 ************************************************************************/
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
53
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
54 #if !defined(CHAR_BIT) || (CHAR_BIT != 8)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
55 # error "invalid CHAR_BIT"
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
56 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
57 #if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
58 # error "check your compiler installation"
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
59 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
60 #if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
61 # error "your limits.h macros are broken"
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
62 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
63
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
64 /* workaround a cpp bug under hpux 10.20 */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
65 #define LZO_0xffffffffL 4294967295ul
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
66
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
67
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
68 /***********************************************************************
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
69 // architecture defines
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
70 ************************************************************************/
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
71
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
72 #if !defined(__LZO_WIN) && !defined(__LZO_DOS) && !defined(__LZO_OS2)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
73 # if defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
74 # define __LZO_WIN
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
75 # elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
76 # define __LZO_WIN
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
77 # elif defined(__NT__) || defined(__NT_DLL__) || defined(__WINDOWS_386__)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
78 # define __LZO_WIN
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
79 # elif defined(__DOS__) || defined(__MSDOS__) || defined(MSDOS)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
80 # define __LZO_DOS
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
81 # elif defined(__OS2__) || defined(__OS2V2__) || defined(OS2)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
82 # define __LZO_OS2
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
83 # elif defined(__palmos__)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
84 # define __LZO_PALMOS
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
85 # elif defined(__TOS__) || defined(__atarist__)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
86 # define __LZO_TOS
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
87 # endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
88 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
89
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
90 #if (UINT_MAX < LZO_0xffffffffL)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
91 # if defined(__LZO_WIN)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
92 # define __LZO_WIN16
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
93 # elif defined(__LZO_DOS)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
94 # define __LZO_DOS16
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
95 # elif defined(__LZO_PALMOS)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
96 # define __LZO_PALMOS16
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
97 # elif defined(__LZO_TOS)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
98 # define __LZO_TOS16
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
99 # elif defined(__C166__)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
100 # else
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
101 # error "16-bit target not supported - contact me for porting hints"
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
102 # endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
103 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
104
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
105 #if !defined(__LZO_i386)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
106 # if defined(__LZO_DOS) || defined(__LZO_WIN16)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
107 # define __LZO_i386
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
108 # elif defined(__i386__) || defined(__386__) || defined(_M_IX86)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
109 # define __LZO_i386
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
110 # endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
111 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
112
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
113 #if defined(__LZO_STRICT_16BIT)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
114 # if (UINT_MAX < LZO_0xffffffffL)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
115 # include <lzo16bit.h>
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
116 # endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
117 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
118
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
119 /* memory checkers */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
120 #if !defined(__LZO_CHECKER)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
121 # if defined(__BOUNDS_CHECKING_ON)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
122 # define __LZO_CHECKER
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
123 # elif defined(__CHECKER__)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
124 # define __LZO_CHECKER
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
125 # elif defined(__INSURE__)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
126 # define __LZO_CHECKER
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
127 # elif defined(__PURIFY__)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
128 # define __LZO_CHECKER
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
129 # endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
130 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
131
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
132
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
133 /***********************************************************************
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
134 // integral and pointer types
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
135 ************************************************************************/
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
136
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
137 /* Integral types with 32 bits or more */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
138 #if !defined(LZO_UINT32_MAX)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
139 # if (UINT_MAX >= LZO_0xffffffffL)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
140 typedef unsigned int lzo_uint32;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
141 typedef int lzo_int32;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
142 # define LZO_UINT32_MAX UINT_MAX
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
143 # define LZO_INT32_MAX INT_MAX
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
144 # define LZO_INT32_MIN INT_MIN
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
145 # elif (ULONG_MAX >= LZO_0xffffffffL)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
146 typedef unsigned long lzo_uint32;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
147 typedef long lzo_int32;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
148 # define LZO_UINT32_MAX ULONG_MAX
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
149 # define LZO_INT32_MAX LONG_MAX
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
150 # define LZO_INT32_MIN LONG_MIN
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
151 # else
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
152 # error "lzo_uint32"
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
153 # endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
154 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
155
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
156 /* lzo_uint is used like size_t */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
157 #if !defined(LZO_UINT_MAX)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
158 # if (UINT_MAX >= LZO_0xffffffffL)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
159 typedef unsigned int lzo_uint;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
160 typedef int lzo_int;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
161 # define LZO_UINT_MAX UINT_MAX
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
162 # define LZO_INT_MAX INT_MAX
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
163 # define LZO_INT_MIN INT_MIN
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
164 # elif (ULONG_MAX >= LZO_0xffffffffL)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
165 typedef unsigned long lzo_uint;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
166 typedef long lzo_int;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
167 # define LZO_UINT_MAX ULONG_MAX
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
168 # define LZO_INT_MAX LONG_MAX
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
169 # define LZO_INT_MIN LONG_MIN
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
170 # else
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
171 # error "lzo_uint"
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
172 # endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
173 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
174
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
175
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
176 /* Memory model that allows to access memory at offsets of lzo_uint. */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
177 #if !defined(__LZO_MMODEL)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
178 # if (LZO_UINT_MAX <= UINT_MAX)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
179 # define __LZO_MMODEL
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
180 # elif defined(__LZO_DOS16) || defined(__LZO_WIN16)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
181 # define __LZO_MMODEL __huge
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
182 # define LZO_999_UNSUPPORTED
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
183 # elif defined(__LZO_PALMOS16) || defined(__LZO_TOS16)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
184 # define __LZO_MMODEL
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
185 # else
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
186 # error "__LZO_MMODEL"
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
187 # endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
188 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
189
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
190 /* no typedef here because of const-pointer issues */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
191 #define lzo_byte unsigned char __LZO_MMODEL
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
192 #define lzo_bytep unsigned char __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
193 #define lzo_charp char __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
194 #define lzo_voidp void __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
195 #define lzo_shortp short __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
196 #define lzo_ushortp unsigned short __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
197 #define lzo_uint32p lzo_uint32 __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
198 #define lzo_int32p lzo_int32 __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
199 #define lzo_uintp lzo_uint __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
200 #define lzo_intp lzo_int __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
201 #define lzo_voidpp lzo_voidp __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
202 #define lzo_bytepp lzo_bytep __LZO_MMODEL *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
203
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
204 typedef int lzo_bool;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
205
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
206 #ifndef lzo_sizeof_dict_t
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
207 # define lzo_sizeof_dict_t sizeof(lzo_bytep)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
208 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
209
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
210
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
211 /***********************************************************************
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
212 // function types
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
213 ************************************************************************/
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
214
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
215 /* linkage */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
216 #if !defined(__LZO_EXTERN_C)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
217 # ifdef __cplusplus
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
218 # define __LZO_EXTERN_C extern "C"
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
219 # else
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
220 # define __LZO_EXTERN_C extern
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
221 # endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
222 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
223
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
224 /* calling conventions */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
225 #if !defined(__LZO_CDECL)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
226 # if defined(__LZO_DOS16) || defined(__LZO_WIN16)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
227 # define __LZO_CDECL __far __cdecl
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
228 # elif defined(__LZO_i386) && defined(_MSC_VER)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
229 # define __LZO_CDECL __cdecl
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
230 # elif defined(__LZO_i386) && defined(__WATCOMC__)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
231 # define __LZO_CDECL __near __cdecl
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
232 # else
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
233 # define __LZO_CDECL
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
234 # endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
235 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
236 #if !defined(__LZO_ENTRY)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
237 # define __LZO_ENTRY __LZO_CDECL
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
238 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
239
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
240 /* DLL export information */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
241 #if !defined(__LZO_EXPORT1)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
242 # define __LZO_EXPORT1
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
243 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
244 #if !defined(__LZO_EXPORT2)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
245 # define __LZO_EXPORT2
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
246 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
247
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
248 /* calling convention for C functions */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
249 #if !defined(LZO_PUBLIC)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
250 # define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_ENTRY
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
251 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
252 #if !defined(LZO_EXTERN)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
253 # define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
254 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
255 #if !defined(LZO_PRIVATE)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
256 # define LZO_PRIVATE(_rettype) static _rettype __LZO_ENTRY
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
257 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
258
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
259 /* cdecl calling convention for assembler functions */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
260 #if !defined(LZO_PUBLIC_CDECL)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
261 # define LZO_PUBLIC_CDECL(_rettype) \
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
262 __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
263 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
264 #if !defined(LZO_EXTERN_CDECL)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
265 # define LZO_EXTERN_CDECL(_rettype) __LZO_EXTERN_C LZO_PUBLIC_CDECL(_rettype)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
266 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
267
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
268
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
269 typedef int
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
270 (__LZO_ENTRY *lzo_compress_t) ( const lzo_byte *src, lzo_uint src_len,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
271 lzo_byte *dst, lzo_uint *dst_len,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
272 lzo_voidp wrkmem );
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
273
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
274 typedef int
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
275 (__LZO_ENTRY *lzo_decompress_t) ( const lzo_byte *src, lzo_uint src_len,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
276 lzo_byte *dst, lzo_uint *dst_len,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
277 lzo_voidp wrkmem );
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
278
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
279 typedef int
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
280 (__LZO_ENTRY *lzo_optimize_t) ( lzo_byte *src, lzo_uint src_len,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
281 lzo_byte *dst, lzo_uint *dst_len,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
282 lzo_voidp wrkmem );
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
283
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
284 typedef int
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
285 (__LZO_ENTRY *lzo_compress_dict_t)(const lzo_byte *src, lzo_uint src_len,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
286 lzo_byte *dst, lzo_uint *dst_len,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
287 lzo_voidp wrkmem,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
288 const lzo_byte *dict, lzo_uint dict_len );
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
289
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
290 typedef int
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
291 (__LZO_ENTRY *lzo_decompress_dict_t)(const lzo_byte *src, lzo_uint src_len,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
292 lzo_byte *dst, lzo_uint *dst_len,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
293 lzo_voidp wrkmem,
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
294 const lzo_byte *dict, lzo_uint dict_len );
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
295
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
296
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
297 /* a progress indicator callback function */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
298 typedef void (__LZO_ENTRY *lzo_progress_callback_t) (lzo_uint, lzo_uint);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
299
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
300
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
301 /***********************************************************************
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
302 // error codes and prototypes
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
303 ************************************************************************/
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
304
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
305 /* Error codes for the compression/decompression functions. Negative
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
306 * values are errors, positive values will be used for special but
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
307 * normal events.
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
308 */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
309 #define LZO_E_OK 0
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
310 #define LZO_E_ERROR (-1)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
311 #define LZO_E_OUT_OF_MEMORY (-2) /* not used right now */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
312 #define LZO_E_NOT_COMPRESSIBLE (-3) /* not used right now */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
313 #define LZO_E_INPUT_OVERRUN (-4)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
314 #define LZO_E_OUTPUT_OVERRUN (-5)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
315 #define LZO_E_LOOKBEHIND_OVERRUN (-6)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
316 #define LZO_E_EOF_NOT_FOUND (-7)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
317 #define LZO_E_INPUT_NOT_CONSUMED (-8)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
318
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
319
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
320 /* lzo_init() should be the first function you call.
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
321 * Check the return code !
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
322 *
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
323 * lzo_init() is a macro to allow checking that the library and the
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
324 * compiler's view of various types are consistent.
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
325 */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
326 #define lzo_init() __lzo_init2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
327 (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
328 (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
329 (int)sizeof(lzo_compress_t))
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
330 LZO_EXTERN(int) __lzo_init2(unsigned,int,int,int,int,int,int,int,int,int);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
331
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
332 /* version functions (useful for shared libraries) */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
333 LZO_EXTERN(unsigned) lzo_version(void);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
334 LZO_EXTERN(const char *) lzo_version_string(void);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
335 LZO_EXTERN(const char *) lzo_version_date(void);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
336 LZO_EXTERN(const lzo_charp) _lzo_version_string(void);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
337 LZO_EXTERN(const lzo_charp) _lzo_version_date(void);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
338
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
339 /* string functions */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
340 LZO_EXTERN(int)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
341 lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
342 LZO_EXTERN(lzo_voidp)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
343 lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
344 LZO_EXTERN(lzo_voidp)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
345 lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
346 LZO_EXTERN(lzo_voidp)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
347 lzo_memset(lzo_voidp _s, int _c, lzo_uint _len);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
348
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
349 /* checksum functions */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
350 LZO_EXTERN(lzo_uint32)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
351 lzo_adler32(lzo_uint32 _adler, const lzo_byte *_buf, lzo_uint _len);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
352 LZO_EXTERN(lzo_uint32)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
353 lzo_crc32(lzo_uint32 _c, const lzo_byte *_buf, lzo_uint _len);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
354
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
355 /* memory allocation functions */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
356 LZO_EXTERN(lzo_bytep) lzo_alloc(lzo_uint _nelems, lzo_uint _size);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
357 LZO_EXTERN(lzo_bytep) lzo_malloc(lzo_uint _size);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
358 LZO_EXTERN(void) lzo_free(lzo_voidp _ptr);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
359
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
360 typedef lzo_bytep (__LZO_ENTRY *lzo_alloc_hook_t) (lzo_uint, lzo_uint);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
361 typedef void (__LZO_ENTRY *lzo_free_hook_t) (lzo_voidp);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
362
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
363 extern lzo_alloc_hook_t lzo_alloc_hook;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
364 extern lzo_free_hook_t lzo_free_hook;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
365
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
366 /* misc. */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
367 LZO_EXTERN(lzo_bool) lzo_assert(int _expr);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
368 LZO_EXTERN(int) _lzo_config_check(void);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
369 typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
370 typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u;
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
371
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
372 /* align a char pointer on a boundary that is a multiple of `size' */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
373 LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
374 #define LZO_PTR_ALIGN_UP(_ptr,_size) \
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
375 ((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size)))
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
376
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
377 /* deprecated - only for backward compatibility */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
378 #define LZO_ALIGN(_ptr,_size) LZO_PTR_ALIGN_UP(_ptr,_size)
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
379
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
380
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
381 #ifdef __cplusplus
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
382 } /* extern "C" */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
383 #endif
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
384
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
385 #endif /* already included */
b081763865d4 used by NuppelVideo
alex
parents:
diff changeset
386