diff -u old/zlib-1.1.3/deflate.c new/zlib-1.1.3/deflate.c --- old/zlib-1.1.3/deflate.c Thu Jul 9 18:06:12 1998 +++ new/zlib-1.1.3/deflate.c Wed Jul 15 00:00:37 1998 @@ -218,7 +218,7 @@ /* We overlay pending_buf and d_buf+l_buf. This works since the average * output size for (length,distance) codes is <= 24 bits. */ - +#ifndef DEAD if (version == Z_NULL || version[0] != my_version[0] || stream_size != sizeof(z_stream)) { return Z_VERSION_ERROR; @@ -231,7 +231,7 @@ strm->opaque = (voidpf)0; } if (strm->zfree == Z_NULL) strm->zfree = zcfree; - +#endif if (level == Z_DEFAULT_COMPRESSION) level = 6; #ifdef FASTEST level = 1; @@ -288,6 +288,7 @@ } /* ========================================================================= */ +#ifndef DEAD int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) z_streamp strm; const Bytef *dictionary; @@ -327,13 +328,13 @@ if (hash_head) hash_head = 0; /* to make compiler happy */ return Z_OK; } - +#endif /* ========================================================================= */ int ZEXPORT deflateReset (strm) z_streamp strm; { deflate_state *s; - + if (strm == Z_NULL || strm->state == Z_NULL || strm->zalloc == Z_NULL || strm->zfree == Z_NULL) return Z_STREAM_ERROR; @@ -359,6 +360,7 @@ } /* ========================================================================= */ +#ifndef DEAD int ZEXPORT deflateParams(strm, level, strategy) z_streamp strm; int level; @@ -393,7 +395,7 @@ s->strategy = strategy; return err; } - +#endif /* ========================================================================= * Put a short in the pending buffer. The 16-bit value is put in MSB order. * IN assertion: the stream state is correct and there is enough room in @@ -575,6 +577,7 @@ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; status = strm->state->status; + if (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) { return Z_STREAM_ERROR; @@ -597,6 +600,7 @@ * To simplify the source, this is not supported for 16-bit MSDOS (which * doesn't have enough memory anyway to duplicate compression states). */ +#ifndef DEAD int ZEXPORT deflateCopy (dest, source) z_streamp dest; z_streamp source; @@ -651,7 +655,7 @@ return Z_OK; #endif } - +#endif /* =========================================================================== * Read a new buffer from the current input stream, update the adler32 * and total number of bytes read. All deflate() input goes through diff -u old/zlib-1.1.3/infblock.c new/zlib-1.1.3/infblock.c --- old/zlib-1.1.3/infblock.c Mon Jun 8 19:06:16 1998 +++ new/zlib-1.1.3/infblock.c Wed Jul 15 00:00:37 1998 @@ -376,7 +376,7 @@ return Z_OK; } - +#ifndef DEAD void inflate_set_dictionary(s, d, n) inflate_blocks_statef *s; const Bytef *d; @@ -396,3 +396,4 @@ { return s->mode == LENS; } +#endif diff -u old/zlib-1.1.3/inflate.c new/zlib-1.1.3/inflate.c --- old/zlib-1.1.3/inflate.c Tue Feb 24 11:20:11 1998 +++ new/zlib-1.1.3/inflate.c Wed Jul 15 00:00:37 1998 @@ -84,6 +84,7 @@ const char *version; int stream_size; { +#ifndef DEAD if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || stream_size != sizeof(z_stream)) return Z_VERSION_ERROR; @@ -98,6 +99,7 @@ z->opaque = (voidpf)0; } if (z->zfree == Z_NULL) z->zfree = zcfree; +#endif if ((z->state = (struct internal_state FAR *) ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL) return Z_MEM_ERROR; @@ -156,6 +158,7 @@ if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL) return Z_STREAM_ERROR; + f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; r = Z_BUF_ERROR; while (1) switch (z->state->mode) @@ -274,7 +277,7 @@ #endif } - +#ifndef DEAD int ZEXPORT inflateSetDictionary(z, dictionary, dictLength) z_streamp z; const Bytef *dictionary; @@ -364,3 +367,4 @@ return Z_STREAM_ERROR; return inflate_blocks_sync_point(z->state->blocks); } +#endif diff -u old/zlib-1.1.3/zutil.h new/zlib-1.1.3/zutil.h --- old/zlib-1.1.3/zutil.h Wed Jul 8 19:01:48 1998 +++ new/zlib-1.1.3/zutil.h Wed Jul 15 00:00:37 1998 @@ -37,6 +37,8 @@ typedef ush FAR ushf; typedef unsigned long ulg; +#ifndef DEAD + extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ /* (size given to avoid silly warnings with Visual C++) */ @@ -45,6 +47,13 @@ #define ERR_RETURN(strm,err) \ return (strm->msg = (char*)ERR_MSG(err), (err)) /* To be used only when the state is known to be valid */ + +#else + +#define ERR_MSG(err) Z_NULL +#define ERR_RETURN(strm,err) return (err) + +#endif /* common constants */