30 "insufficient memory",
32 "incompatible version",
46 switch ((
int)(
sizeof(
uInt))) {
48 case 4: flags += 1;
break;
49 case 8: flags += 2;
break;
52 switch ((
int)(
sizeof(
uLong))) {
54 case 4: flags += 1 << 2;
break;
55 case 8: flags += 2 << 2;
break;
56 default: flags += 3 << 2;
58 switch ((
int)(
sizeof(
voidpf))) {
60 case 4: flags += 1 << 4;
break;
61 case 8: flags += 2 << 4;
break;
62 default: flags += 3 << 4;
64 switch ((
int)(
sizeof(
z_off_t))) {
66 case 4: flags += 1 << 6;
break;
67 case 8: flags += 2 << 6;
break;
68 default: flags += 3 << 6;
73 #if defined(ASMV) || defined(ASMINF)
82 #ifdef DYNAMIC_CRC_TABLE
91 #ifdef PKZIP_BUG_WORKAROUND
100 # ifdef HAS_vsprintf_void
104 # ifdef HAS_vsnprintf_void
112 # ifdef HAS_sprintf_void
116 # ifdef HAS_snprintf_void
134 fprintf(stderr,
"%s\n", m);
147 #if defined(_WIN32_WCE)
159 if (len == 0)
return;
162 }
while (--len != 0);
169 for (j = 0; j < len; j++) {
170 if (s1[j] != s2[j])
return 2*(s1[j] > s2[j])-1;
177 if (len == 0)
return;
180 }
while (--len != 0);
201 local int next_ptr = 0;
203 typedef struct ptr_table_s {
208 local ptr_table table[MAX_PTR];
219 ulg bsize = (
ulg)items*size;
224 if (bsize < 65520L) {
225 buf = farmalloc(bsize);
226 if (*(
ush*)&buf != 0)
return buf;
228 buf = farmalloc(bsize + 16L);
230 if (buf == NULL || next_ptr >= MAX_PTR)
return NULL;
231 table[next_ptr].org_ptr = buf;
234 *((
ush*)&buf+1) += ((
ush)((
uch*)buf-0) + 15) >> 4;
236 table[next_ptr++].new_ptr = buf;
243 if (*(
ush*)&ptr != 0) {
248 for (n = 0; n < next_ptr; n++) {
249 if (ptr != table[n].new_ptr)
continue;
251 farfree(table[n].org_ptr);
252 while (++n < next_ptr) {
253 table[n-1] = table[n];
259 Assert(0,
"zcfree: ptr not found");
270 #if (!defined(_MSC_VER) || (_MSC_VER <= 600))
271 # define _halloc halloc
272 # define _hfree hfree
277 if (opaque) opaque = 0;
278 return _halloc((
long)items, size);
283 if (opaque) opaque = 0;
302 if (opaque) items += size -
size;
#define Assert(cond, msg)
const char *const z_errmsg[10]
voidp malloc OF((uInt size))
const char *ZEXPORT zlibVersion()
uLong ZEXPORT zlibCompileFlags()
#define ABC_NAMESPACE_IMPL_END
void ZLIB_INTERNAL zmemzero(Bytef *dest, uInt len)
static char s1[largest_string]
void ZLIB_INTERNAL zmemcpy(Bytef *dest, const Bytef *source, uInt len)
int ZLIB_INTERNAL zmemcmp(const Bytef *s1, const Bytef *s2, uInt len)
#define ABC_NAMESPACE_IMPL_START
const char *ZEXPORT zError(int err)
voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size)
void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr)