14 (
z_const char *)
"need dictionary",
20 (
z_const char *)
"insufficient memory",
22 (
z_const char *)
"incompatible version",
35 switch ((
int)(
sizeof(
uInt))) {
37 case 4: flags += 1;
break;
38 case 8: flags += 2;
break;
41 switch ((
int)(
sizeof(
uLong))) {
43 case 4: flags += 1 << 2;
break;
44 case 8: flags += 2 << 2;
break;
45 default: flags += 3 << 2;
47 switch ((
int)(
sizeof(
voidpf))) {
49 case 4: flags += 1 << 4;
break;
50 case 8: flags += 2 << 4;
break;
51 default: flags += 3 << 4;
53 switch ((
int)(
sizeof(
z_off_t))) {
55 case 4: flags += 1 << 6;
break;
56 case 8: flags += 2 << 6;
break;
57 default: flags += 3 << 6;
73 #ifdef DYNAMIC_CRC_TABLE
82 #ifdef PKZIP_BUG_WORKAROUND
88 #if defined(STDC) || defined(Z_HAVE_STDARG_H)
91 # ifdef HAS_vsprintf_void
95 # ifdef HAS_vsnprintf_void
103 # ifdef HAS_sprintf_void
107 # ifdef HAS_snprintf_void
123 fprintf(stderr,
"%s\n", m);
135 #if defined(_WIN32_WCE) && _WIN32_WCE < 0x800
146 if (len == 0)
return;
149 }
while (--len != 0);
155 for (j = 0; j < len; j++) {
156 if (s1[j] != s2[j])
return 2*(s1[j] > s2[j])-1;
162 if (len == 0)
return;
165 }
while (--len != 0);
187 local int next_ptr = 0;
189 typedef struct ptr_table_s {
194 local ptr_table table[MAX_PTR];
204 ulg bsize = (
ulg)items*size;
211 if (bsize < 65520L) {
212 buf = farmalloc(bsize);
213 if (*(
ush*)&buf != 0)
return buf;
215 buf = farmalloc(bsize + 16L);
217 if (buf == NULL || next_ptr >= MAX_PTR)
return NULL;
218 table[next_ptr].org_ptr =
buf;
221 *((
ush*)&buf+1) += ((
ush)((
uch*)buf-0) + 15) >> 4;
223 table[next_ptr++].new_ptr =
buf;
232 if (*(
ush*)&ptr != 0) {
237 for (n = 0; n < next_ptr; n++) {
238 if (ptr != table[n].new_ptr)
continue;
240 farfree(table[n].org_ptr);
241 while (++n < next_ptr) {
242 table[n-1] = table[n];
247 Assert(0,
"zcfree: ptr not found");
258 #if (!defined(_MSC_VER) || (_MSC_VER <= 600))
259 # define _halloc halloc
260 # define _hfree hfree
265 return _halloc((
long)items, size);
#define Assert(cond, msg)
uLong ZEXPORT zlibCompileFlags(void)
z_const char *const z_errmsg[10]
void ZLIB_INTERNAL zmemzero(Bytef *dest, uInt len)
void ZLIB_INTERNAL zmemcpy(Bytef *dest, const Bytef *source, uInt len)
int ZLIB_INTERNAL zmemcmp(const Bytef *s1, const Bytef *s2, uInt len)
voidp calloc(uInt items, uInt size)
const char *ZEXPORT zError(int err)
const char *ZEXPORT zlibVersion(void)
voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size)
void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr)