51 typedef unsigned char uch;
53 typedef unsigned short ush;
55 typedef unsigned long ulg;
57 extern const char*
const z_errmsg[10];
60 #define ERR_MSG(err) z_errmsg[Z_NEED_DICT - (err)]
62 #define ERR_RETURN(strm, err) return (strm->msg = (char*)ERR_MSG(err), (err))
68 #define DEF_WBITS MAX_WBITS
72 #if MAX_MEM_LEVEL >= 8
73 #define DEF_MEM_LEVEL 8
75 #define DEF_MEM_LEVEL MAX_MEM_LEVEL
79 #define STORED_BLOCK 0
80 #define STATIC_TREES 1
88 #define PRESET_DICT 0x20
92 #if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
94 #if defined(__TURBOC__)
95 #if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
97 void _Cdecl farfree(
void* block);
98 void* _Cdecl farmalloc(
unsigned long nbytes);
111 #if defined(VAXC) || defined(VMS)
113 #define F_OPEN(name, mode) \
114 fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
117 #if defined(ATARI) || defined(atarist)
128 #if defined(MACOS) || defined(TARGET_OS_MAC)
130 #if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
134 #define fdopen(fd, mode) nullptr
153 #if defined(_BEOS_) || defined(RISCOS)
154 #define fdopen(fd, mode) nullptr
157 #if (defined(_MSC_VER) && (_MSC_VER > 600))
158 #if defined(_WIN32_WCE)
159 #define fdopen(fd, mode) nullptr
160 #ifndef _PTRDIFF_T_DEFINED
162 #define _PTRDIFF_T_DEFINED
165 #define fdopen(fd, type) _fdopen(fd, type)
176 #define F_OPEN(name, mode) fopen((name), (mode))
181 #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
182 #ifndef HAVE_VSNPRINTF
183 #define HAVE_VSNPRINTF
186 #if defined(__CYGWIN__)
187 #ifndef HAVE_VSNPRINTF
188 #define HAVE_VSNPRINTF
191 #ifndef HAVE_VSNPRINTF
202 #if !defined(vsnprintf) && !defined(NO_vsnprintf)
203 #define vsnprintf _vsnprintf
217 #if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
224 #if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
229 #define zmemcpy _fmemcpy
230 #define zmemcmp _fmemcmp
231 #define zmemzero(dest, len) _fmemset(dest, 0, len)
233 #define zmemcpy memcpy
234 #define zmemcmp memcmp
235 #define zmemzero(dest, len) memset(dest, 0, len)
246 extern int z_verbose;
247 extern void z_error
OF((
char* m));
248 #define Assert(cond, msg) \
250 if (!(cond)) z_error(msg); \
254 if (z_verbose >= 0) fprintf x; \
258 if (z_verbose > 0) fprintf x; \
262 if (z_verbose > 1) fprintf x; \
264 #define Tracec(c, x) \
266 if (z_verbose > 0 && (c)) fprintf x; \
268 #define Tracecv(c, x) \
270 if (z_verbose > 1 && (c)) fprintf x; \
273 #define Assert(cond, msg)
278 #define Tracecv(c, x)
284 #define ZALLOC(strm, items, size) \
285 (*((strm)->zalloc))((strm)->opaque, (items), (size))
286 #define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
287 #define TRY_FREE(s, p) \
289 if (p) ZFREE(s, p); \
GLsizei GLsizei GLchar * source
#define zmemzero(dest, len)
voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size))
const char *const z_errmsg[10]