37 # define errno z_errno 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) \ 63 return (strm->msg = (char*)ERR_MSG(err), (err)) 69 # define DEF_WBITS MAX_WBITS 73 #if MAX_MEM_LEVEL >= 8 74 # define DEF_MEM_LEVEL 8 76 # define DEF_MEM_LEVEL MAX_MEM_LEVEL 80 #define STORED_BLOCK 0 81 #define STATIC_TREES 1 89 #define PRESET_DICT 0x20 93 #if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) 95 # if defined(__TURBOC__) || defined(__BORLANDC__) 96 # if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) 98 void _Cdecl farfree(
void *block );
99 void *_Cdecl farmalloc(
unsigned long nbytes );
109 # define OS_CODE 0x01 112 #if defined(VAXC) || defined(VMS) 113 # define OS_CODE 0x02 114 # define F_OPEN(name, mode) \ 115 fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") 118 #if defined(ATARI) || defined(atarist) 119 # define OS_CODE 0x05 123 # define OS_CODE 0x06 129 #if defined(MACOS) || defined(TARGET_OS_MAC) 130 # define OS_CODE 0x07 131 # if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os 135 # define fdopen(fd,mode) NULL 141 # define OS_CODE 0x0a 146 # define OS_CODE 0x0b 151 # define OS_CODE 0x0f 154 #if defined(_BEOS_) || defined(RISCOS) 155 # define fdopen(fd,mode) NULL 158 #if (defined(_MSC_VER) && (_MSC_VER > 600)) 159 # if defined(_WIN32_WCE) 160 # define fdopen(fd,mode) NULL 161 # ifndef _PTRDIFF_T_DEFINED 163 # define _PTRDIFF_T_DEFINED 166 # define fdopen(fd,type) _fdopen(fd,type) 173 # define OS_CODE 0x03 177 # define F_OPEN(name, mode) fopen((name), (mode)) 182 #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) 183 # ifndef HAVE_VSNPRINTF 184 # define HAVE_VSNPRINTF 187 #if defined(__CYGWIN__) 188 # ifndef HAVE_VSNPRINTF 189 # define HAVE_VSNPRINTF 192 #ifndef HAVE_VSNPRINTF 196 # define NO_vsnprintf 199 # define NO_vsnprintf 203 # if !defined(vsnprintf) && !defined(NO_vsnprintf) 204 # define vsnprintf _vsnprintf 208 # define NO_vsnprintf 212 # define NO_vsnprintf 218 #if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) 225 #if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) 230 # define zmemcpy _fmemcpy 231 # define zmemcmp _fmemcmp 232 # define zmemzero(dest, len) _fmemset(dest, 0, len) 234 # define zmemcpy memcpy 235 # define zmemcmp memcmp 236 # define zmemzero(dest, len) memset(dest, 0, len) 247 extern int z_verbose;
248 extern void z_error
OF((
char *m));
249 # define Assert(cond,msg) {if(!(cond)) z_error(msg);} 250 # define Trace(x) {if (z_verbose>=0) fprintf x ;} 251 # define Tracev(x) {if (z_verbose>0) fprintf x ;} 252 # define Tracevv(x) {if (z_verbose>1) fprintf x ;} 253 # define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} 254 # define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} 256 # define Assert(cond,msg) 261 # define Tracecv(c,x) 268 #define ZALLOC(strm, items, size) \ 269 (*((strm)->zalloc))((strm)->opaque, (items), (size)) 270 #define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) 271 #define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
#define zmemzero(dest, len)
const char *const z_errmsg[10]
voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size))
GLsizei GLsizei GLchar * source