16# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
23#if defined(STDC) && !defined(Z_SOLO)
24# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
32 typedef long ptrdiff_t;
42typedef unsigned char uch;
44typedef unsigned short ush;
46typedef unsigned long ulg;
48extern z_const
char *
const z_errmsg[10];
51#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
53#define ERR_RETURN(strm,err) \
54 return (strm->msg = ERR_MSG(err), (err))
60# define DEF_WBITS MAX_WBITS
65# define DEF_MEM_LEVEL 8
67# define DEF_MEM_LEVEL MAX_MEM_LEVEL
80#define PRESET_DICT 0x20
84#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
87# if defined(__TURBOC__) || defined(__BORLANDC__)
88# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
90 void _Cdecl farfree(
void *
block );
91 void *_Cdecl farmalloc(
unsigned long nbytes );
105#if defined(VAXC) || defined(VMS)
107# define F_OPEN(name, mode) \
108 fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
112# if __TARGET_LIB__ < 0x20000000
114# elif __TARGET_LIB__ < 0x40000000
121#if defined(ATARI) || defined(atarist)
127# if defined(M_I86) && !defined(Z_SOLO)
132#if defined(MACOS) || defined(TARGET_OS_MAC)
135# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
139# define fdopen(fd,mode) NULL
149#if defined(WIN32) && !defined(__CYGWIN__)
165#if defined(_BEOS_) || defined(RISCOS)
166# define fdopen(fd,mode) NULL
169#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
170# if defined(_WIN32_WCE)
171# define fdopen(fd,mode) NULL
172# ifndef _PTRDIFF_T_DEFINED
173 typedef int ptrdiff_t;
174# define _PTRDIFF_T_DEFINED
177# define fdopen(fd,type) _fdopen(fd,type)
181#if defined(__BORLANDC__) && !defined(MSDOS)
188#if !defined(_WIN32) && \
189 (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
201# define F_OPEN(name, mode) fopen((name), (mode))
206#if defined(pyr) || defined(Z_SOLO)
209#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
216#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
221# define zmemcpy _fmemcpy
222# define zmemcmp _fmemcmp
223# define zmemzero(dest, len) _fmemset(dest, 0, len)
225# define zmemcpy memcpy
226# define zmemcmp memcmp
227# define zmemzero(dest, len) memset(dest, 0, len)
240# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
241# define Trace(x) {if (z_verbose>=0) fprintf x ;}
242# define Tracev(x) {if (z_verbose>0) fprintf x ;}
243# define Tracevv(x) {if (z_verbose>1) fprintf x ;}
244# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
245# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
247# define Assert(cond,msg)
261#define ZALLOC(strm, items, size) \
262 (*((strm)->zalloc))((strm)->opaque, (items), (size))
263#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
264#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
267#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
268 (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2)
uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2)
voidpf alloc_func OF((voidpf opaque, uInt items, uInt size))
void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr)
voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size)
void ZLIB_INTERNAL zmemzero(Bytef *dest, uInt len)
void ZLIB_INTERNAL zmemcpy(Bytef *dest, const Bytef *source, uInt len)
int ZLIB_INTERNAL zmemcmp(Bytef *s1, const Bytef *s2, uInt len) const
z_const char *const z_errmsg[10]