]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Cleanup: Replace 'z_streamp' with 'z_stream *'
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Sun, 26 Apr 2015 19:31:49 +0000 (21:31 +0200)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Sun, 26 Apr 2015 19:31:49 +0000 (21:31 +0200)
12 files changed:
arch/x86/deflate_quick.c
arch/x86/fill_window_sse.c
crc32.c
deflate.c
deflate.h
gzread.c
gzwrite.c
infback.c
inffast.c
inffast.h
inflate.c
zlib.h

index adb15dec16c0aa31c2a929127aacd4123cbd0a3f..a9f2dfe6088b89801cd678cd1ecf90548cd4bd4d 100644 (file)
@@ -17,7 +17,7 @@
 #include <immintrin.h>
 
 extern void fill_window_sse(deflate_state *s);
-extern void flush_pending  (z_streamstrm);
+extern void flush_pending  (z_stream *strm);
 
 local inline long compare258(z_const unsigned char *z_const src0,
         z_const unsigned char *z_const src1)
index 8378d4eb2063640ec75b0937862d424c459b351f..9b1781cd414d4a318c9bd619f65e388c715b059d 100644 (file)
@@ -13,7 +13,7 @@
 #include <immintrin.h>
 #include "deflate.h"
 
-extern int read_buf        (z_streamstrm, Byte *buf, unsigned size);
+extern int read_buf        (z_stream *strm, Byte *buf, unsigned size);
 
 ZLIB_INTERNAL void fill_window_sse(deflate_state *s)
 {
diff --git a/crc32.c b/crc32.c
index 8e22c69e879a4408852c0bf6756918cd8f9d88cf..595a4a69ce589439e4695f7adf1c79643e8f60ec 100644 (file)
--- a/crc32.c
+++ b/crc32.c
@@ -453,7 +453,7 @@ ZLIB_INTERNAL void crc_finalize(deflate_state *const s)
 #endif
 }
 
-ZLIB_INTERNAL void copy_with_crc(z_streamstrm, Byte *dst, long size)
+ZLIB_INTERNAL void copy_with_crc(z_stream *strm, Byte *dst, long size)
 {
 #ifdef X86_PCLMULQDQ_CRC
     if (x86_cpu_has_pclmulqdq) {
index 74e81007a16d0ef6b094900ccbc3ad34398b9e25..da42bb30790099bdb79b788933398b9e3d4803a9 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -82,8 +82,8 @@ local block_state deflate_rle    (deflate_state *s, int flush);
 local block_state deflate_huff   (deflate_state *s, int flush);
 local void lm_init        (deflate_state *s);
 local void putShortMSB    (deflate_state *s, uInt b);
-ZLIB_INTERNAL void flush_pending  (z_streamstrm);
-ZLIB_INTERNAL int read_buf        (z_streamstrm, Byte *buf, unsigned size);
+ZLIB_INTERNAL void flush_pending  (z_stream *strm);
+ZLIB_INTERNAL int read_buf        (z_stream *strm, Byte *buf, unsigned size);
 
 #ifdef DEBUG
 local  void check_match (deflate_state *s, IPos start, IPos match, int length);
@@ -91,7 +91,7 @@ local  void check_match (deflate_state *s, IPos start, IPos match, int length);
 
 extern void crc_reset(deflate_state *const s);
 extern void crc_finalize(deflate_state *const s);
-extern void copy_with_crc(z_streamstrm, Byte *dst, long size);
+extern void copy_with_crc(z_stream *strm, Byte *dst, long size);
 
 /* ===========================================================================
  * Local data
@@ -232,7 +232,7 @@ bulk_insert_str(deflate_state *s, Pos startpos, uInt count) {
 
 /* ========================================================================= */
 int ZEXPORT deflateInit_(strm, level, version, stream_size)
-    z_streamstrm;
+    z_stream *strm;
     int level;
     const char *version;
     int stream_size;
@@ -245,7 +245,7 @@ int ZEXPORT deflateInit_(strm, level, version, stream_size)
 /* ========================================================================= */
 int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
                   version, stream_size)
-    z_streamstrm;
+    z_stream *strm;
     int  level;
     int  method;
     int  windowBits;
@@ -371,7 +371,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
 
 /* ========================================================================= */
 int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
-    z_streamstrm;
+    z_stream *strm;
     const Byte *dictionary;
     uInt  dictLength;
 {
@@ -438,7 +438,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
 
 /* ========================================================================= */
 int ZEXPORT deflateResetKeep (strm)
-    z_streamstrm;
+    z_stream *strm;
 {
     deflate_state *s;
 
@@ -473,7 +473,7 @@ int ZEXPORT deflateResetKeep (strm)
 
 /* ========================================================================= */
 int ZEXPORT deflateReset (strm)
-    z_streamstrm;
+    z_stream *strm;
 {
     int ret;
 
@@ -485,7 +485,7 @@ int ZEXPORT deflateReset (strm)
 
 /* ========================================================================= */
 int ZEXPORT deflateSetHeader (strm, head)
-    z_streamstrm;
+    z_stream *strm;
     gz_headerp head;
 {
     if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
@@ -498,7 +498,7 @@ int ZEXPORT deflateSetHeader (strm, head)
 int ZEXPORT deflatePending (strm, pending, bits)
     unsigned *pending;
     int *bits;
-    z_streamstrm;
+    z_stream *strm;
 {
     if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
     if (pending != Z_NULL)
@@ -510,7 +510,7 @@ int ZEXPORT deflatePending (strm, pending, bits)
 
 /* ========================================================================= */
 int ZEXPORT deflatePrime (strm, bits, value)
-    z_streamstrm;
+    z_stream *strm;
     int bits;
     int value;
 {
@@ -536,7 +536,7 @@ int ZEXPORT deflatePrime (strm, bits, value)
 
 /* ========================================================================= */
 int ZEXPORT deflateParams(strm, level, strategy)
-    z_streamstrm;
+    z_stream *strm;
     int level;
     int strategy;
 {
@@ -573,7 +573,7 @@ int ZEXPORT deflateParams(strm, level, strategy)
 
 /* ========================================================================= */
 int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
-    z_streamstrm;
+    z_stream *strm;
     int good_length;
     int max_lazy;
     int nice_length;
@@ -608,7 +608,7 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
  * allocation.
  */
 uLong ZEXPORT deflateBound(strm, sourceLen)
-    z_streamstrm;
+    z_stream *strm;
     uLong sourceLen;
 {
     deflate_state *s;
@@ -682,7 +682,7 @@ local void putShortMSB (deflate_state *s, uInt b)
  * (See also read_buf()).
  */
 ZLIB_INTERNAL void flush_pending(strm)
-    z_streamstrm;
+    z_stream *strm;
 {
     unsigned len;
     deflate_state *s = strm->state;
@@ -705,7 +705,7 @@ ZLIB_INTERNAL void flush_pending(strm)
 
 /* ========================================================================= */
 int ZEXPORT deflate (strm, flush)
-    z_streamstrm;
+    z_stream *strm;
     int flush;
 {
     int old_flush; /* value of flush param for previous deflate call */
@@ -1027,7 +1027,7 @@ int ZEXPORT deflate (strm, flush)
 
 /* ========================================================================= */
 int ZEXPORT deflateEnd (strm)
-    z_streamstrm;
+    z_stream *strm;
 {
     int status;
 
@@ -1060,8 +1060,8 @@ int ZEXPORT deflateEnd (strm)
  * Copy the source state to the destination state.
  */
 int ZEXPORT deflateCopy (dest, source)
-    z_streamdest;
-    z_streamsource;
+    z_stream *dest;
+    z_stream *source;
 {
     deflate_state *ds;
     deflate_state *ss;
@@ -1117,7 +1117,7 @@ int ZEXPORT deflateCopy (dest, source)
  * allocating a large strm->next_in buffer and copying from it.
  * (See also flush_pending()).
  */
-ZLIB_INTERNAL int read_buf(z_streamstrm, Byte *buf, unsigned size)
+ZLIB_INTERNAL int read_buf(z_stream *strm, Byte *buf, unsigned size)
 {
     unsigned len = strm->avail_in;
 
index 68dc71146de868847f6c44134f638b1a57949ab1..a76a94dfa8310dff232704bfe29a8ade79d29092 100644 (file)
--- a/deflate.h
+++ b/deflate.h
@@ -101,7 +101,7 @@ typedef unsigned IPos;
  */
 
 typedef struct internal_state {
-    z_streamstrm;      /* pointer back to this zlib stream */
+    z_stream *strm;      /* pointer back to this zlib stream */
     int   status;        /* as the name implies */
     Byte *pending_buf;  /* output still pending */
     ulg   pending_buf_size; /* size of pending_buf */
index 1f7a2e7e8b5ed17f511d8a97cb7a71257d92e83d..7448b84e920056bbdda02df4ca1ca57cd4683b7c 100644 (file)
--- a/gzread.c
+++ b/gzread.c
@@ -47,7 +47,7 @@ local int gz_load(gz_statep state, unsigned char *buf, unsigned len, unsigned *h
 local int gz_avail(gz_statep state)
 {
     unsigned got;
-    z_streamstrm = &(state->strm);
+    z_stream *strm = &(state->strm);
 
     if (state->err != Z_OK && state->err != Z_BUF_ERROR)
         return -1;
@@ -80,7 +80,7 @@ local int gz_avail(gz_statep state)
    gz_look() will return 0 on success or -1 on failure. */
 local int gz_look(gz_statep state)
 {
-    z_streamstrm = &(state->strm);
+    z_stream *strm = &(state->strm);
 
     /* allocate read buffers and inflate memory */
     if (state->size == 0) {
@@ -167,7 +167,7 @@ local int gz_decomp(gz_statep state)
 {
     int ret = Z_OK;
     unsigned had;
-    z_streamstrm = &(state->strm);
+    z_stream *strm = &(state->strm);
 
     /* fill output buffer up to end of deflate stream */
     had = strm->avail_out;
@@ -218,7 +218,7 @@ local int gz_decomp(gz_statep state)
    end of the input file has been reached and all data has been processed.  */
 local int gz_fetch(gz_statep state)
 {
-    z_streamstrm = &(state->strm);
+    z_stream *strm = &(state->strm);
 
     do {
         switch(state->how) {
@@ -282,7 +282,7 @@ int ZEXPORT gzread(file, buf, len)
 {
     unsigned got, n;
     gz_statep state;
-    z_streamstrm;
+    z_stream *strm;
 
     /* get internal structure */
     if (file == NULL)
index a52aef360135789b959a43a4eae21603c769b045..955d5a50f0373a7b73781c5d5635f7542bd524e4 100644 (file)
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -15,7 +15,7 @@ local int gz_zero (gz_statep, z_off64_t);
 local int gz_init(gz_statep state)
 {
     int ret;
-    z_streamstrm = &(state->strm);
+    z_stream *strm = &(state->strm);
 
     /* allocate input buffer */
     state->in = (unsigned char *)malloc(state->want);
@@ -70,7 +70,7 @@ local int gz_comp(gz_statep state, int flush)
 {
     int ret, got;
     unsigned have;
-    z_streamstrm = &(state->strm);
+    z_stream *strm = &(state->strm);
 
     /* allocate memory if this is the first time through */
     if (state->size == 0 && gz_init(state) == -1)
@@ -131,7 +131,7 @@ local int gz_zero(gz_statep state, z_off64_t len)
 {
     int first;
     unsigned n;
-    z_streamstrm = &(state->strm);
+    z_stream *strm = &(state->strm);
 
     /* consume whatever's left in the input buffer */
     if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
@@ -164,7 +164,7 @@ int ZEXPORT gzwrite(file, buf, len)
 {
     unsigned put = len;
     gz_statep state;
-    z_streamstrm;
+    z_stream *strm;
 
     /* get internal structure */
     if (file == NULL)
@@ -244,7 +244,7 @@ int ZEXPORT gzputc(file, c)
     unsigned have;
     unsigned char buf[1];
     gz_statep state;
-    z_streamstrm;
+    z_stream *strm;
 
     /* get internal structure */
     if (file == NULL)
@@ -305,7 +305,7 @@ int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va)
 {
     int size, len;
     gz_statep state;
-    z_streamstrm;
+    z_stream *strm;
 
     /* get internal structure */
     if (file == NULL)
@@ -398,7 +398,7 @@ int ZEXPORT gzsetparams(file, level, strategy)
     int strategy;
 {
     gz_statep state;
-    z_streamstrm;
+    z_stream *strm;
 
     /* get internal structure */
     if (file == NULL)
index 5df2221241783de8086d89a4a3fdd28284bd38e1..922eeeb38af571b95e5cae07f7ec5a2386bc0268 100644 (file)
--- a/infback.c
+++ b/infback.c
@@ -26,7 +26,7 @@ local void fixedtables (struct inflate_state *state);
    window and output buffer that is 2**windowBits bytes.
  */
 int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
-z_streamstrm;
+z_stream *strm;
 int windowBits;
 unsigned char *window;
 const char *version;
@@ -247,7 +247,7 @@ local void fixedtables(struct inflate_state *state)
    are not correct, i.e. strm is Z_NULL or the state was not initialized.
  */
 int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
-z_streamstrm;
+z_stream *strm;
 in_func in;
 void *in_desc;
 out_func out;
@@ -628,7 +628,7 @@ void *out_desc;
 }
 
 int ZEXPORT inflateBackEnd(strm)
-z_streamstrm;
+z_stream *strm;
 {
     if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
         return Z_STREAM_ERROR;
index 6ab7c558822c8eec7f602a793f1ff114fe9dd4c6..3e36746e43fb236ab3203a2cfb2550a53dfc8807 100644 (file)
--- a/inffast.c
+++ b/inffast.c
@@ -73,7 +73,7 @@
       requires strm->avail_out >= 258 for each loop to avoid checking for
       output space.
  */
-void ZLIB_INTERNAL inflate_fast(z_streamstrm, unsigned start)
+void ZLIB_INTERNAL inflate_fast(z_stream *strm, unsigned start)
 {
     /* start: inflate()'s starting value for strm->avail_out */
     struct inflate_state *state;
index 96bd8abb8ac2e7c9ddb19e8a1acf99a88e0bf4c5..5b8a1f6643de6d9e6a2d61a9a5af7212d4b41f4f 100644 (file)
--- a/inffast.h
+++ b/inffast.h
@@ -8,4 +8,4 @@
    subject to change. Applications should only use zlib.h.
  */
 
-void ZLIB_INTERNAL inflate_fast (z_streamstrm, unsigned start);
+void ZLIB_INTERNAL inflate_fast (z_stream *strm, unsigned start);
index 4e3b9e743b1b4a90b01dda42907db5701eeaf88d..a03c7cd6be56535df16254cb9383c50bf56d15c8 100644 (file)
--- a/inflate.c
+++ b/inflate.c
 
 /* function prototypes */
 local void fixedtables (struct inflate_state *state);
-local int updatewindow (z_streamstrm, const unsigned char *end, unsigned copy);
+local int updatewindow (z_stream *strm, const unsigned char *end, unsigned copy);
 #ifdef BUILDFIXED
    void makefixed (void);
 #endif
 local unsigned syncsearch (unsigned *have, const unsigned char *buf, unsigned len);
 
 int ZEXPORT inflateResetKeep(strm)
-z_streamstrm;
+z_stream *strm;
 {
     struct inflate_state *state;
 
@@ -125,7 +125,7 @@ z_streamp strm;
 }
 
 int ZEXPORT inflateReset(strm)
-z_streamstrm;
+z_stream *strm;
 {
     struct inflate_state *state;
 
@@ -138,7 +138,7 @@ z_streamp strm;
 }
 
 int ZEXPORT inflateReset2(strm, windowBits)
-z_streamstrm;
+z_stream *strm;
 int windowBits;
 {
     int wrap;
@@ -176,7 +176,7 @@ int windowBits;
 }
 
 int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
-z_streamstrm;
+z_stream *strm;
 int windowBits;
 const char *version;
 int stream_size;
@@ -218,7 +218,7 @@ int stream_size;
 }
 
 int ZEXPORT inflateInit_(strm, version, stream_size)
-z_streamstrm;
+z_stream *strm;
 const char *version;
 int stream_size;
 {
@@ -226,7 +226,7 @@ int stream_size;
 }
 
 int ZEXPORT inflatePrime(strm, bits, value)
-z_streamstrm;
+z_stream *strm;
 int bits;
 int value;
 {
@@ -373,7 +373,7 @@ void makefixed()
    output will fall in the output data, making match copies simpler and faster.
    The advantage may be dependent on the size of the processor's data caches.
  */
-local int updatewindow(z_streamstrm, const Byte *end, unsigned copy)
+local int updatewindow(z_stream *strm, const Byte *end, unsigned copy)
 {
     struct inflate_state *state;
     unsigned dist;
@@ -597,7 +597,7 @@ local int updatewindow(z_streamp strm, const Byte *end, unsigned copy)
  */
 
 int ZEXPORT inflate(strm, flush)
-z_streamstrm;
+z_stream *strm;
 int flush;
 {
     struct inflate_state *state;
@@ -1246,7 +1246,7 @@ int flush;
 }
 
 int ZEXPORT inflateEnd(strm)
-z_streamstrm;
+z_stream *strm;
 {
     struct inflate_state *state;
     if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
@@ -1260,7 +1260,7 @@ z_streamp strm;
 }
 
 int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength)
-z_streamstrm;
+z_stream *strm;
 Byte *dictionary;
 uInt *dictLength;
 {
@@ -1283,7 +1283,7 @@ uInt *dictLength;
 }
 
 int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
-z_streamstrm;
+z_stream *strm;
 const Byte *dictionary;
 uInt dictLength;
 {
@@ -1318,7 +1318,7 @@ uInt dictLength;
 }
 
 int ZEXPORT inflateGetHeader(strm, head)
-z_streamstrm;
+z_stream *strm;
 gz_headerp head;
 {
     struct inflate_state *state;
@@ -1366,7 +1366,7 @@ local unsigned syncsearch(unsigned *have, const unsigned char *buf, unsigned len
 }
 
 int ZEXPORT inflateSync(strm)
-z_streamstrm;
+z_stream *strm;
 {
     unsigned len;               /* number of bytes to look at or looked at */
     unsigned long in, out;      /* temporary to save total_in and total_out */
@@ -1417,7 +1417,7 @@ z_streamp strm;
    inflate is waiting for these length bytes.
  */
 int ZEXPORT inflateSyncPoint(strm)
-z_streamstrm;
+z_stream *strm;
 {
     struct inflate_state *state;
 
@@ -1427,8 +1427,8 @@ z_streamp strm;
 }
 
 int ZEXPORT inflateCopy(dest, source)
-z_streamdest;
-z_streamsource;
+z_stream *dest;
+z_stream *source;
 {
     struct inflate_state *state;
     struct inflate_state *copy;
@@ -1474,7 +1474,7 @@ z_streamp source;
 }
 
 int ZEXPORT inflateUndermine(strm, subvert)
-z_streamstrm;
+z_stream *strm;
 int subvert;
 {
     struct inflate_state *state;
@@ -1491,7 +1491,7 @@ int subvert;
 }
 
 long ZEXPORT inflateMark(strm)
-z_streamstrm;
+z_stream *strm;
 {
     struct inflate_state *state;
 
diff --git a/zlib.h b/zlib.h
index 2a240f9a5aa0dde87fc9b71792831a08e6af511e..5488524ff1e09a98f81d4818d62bc0e9afa5e8ec 100644 (file)
--- a/zlib.h
+++ b/zlib.h
@@ -110,7 +110,7 @@ typedef struct z_stream_s {
     uLong   reserved;   /* reserved for future use */
 } z_stream;
 
-typedef z_stream *z_streamp;
+typedef z_stream *z_streamp; // Obsolete type, retained for compatability only
 
 /*
      gzip header information passed to and from zlib routines.  See RFC 1952
@@ -219,7 +219,7 @@ ZEXTERN const char * ZEXPORT zlibVersion (void);
  */
 
 /*
-ZEXTERN int ZEXPORT deflateInit (z_streamstrm, int level);
+ZEXTERN int ZEXPORT deflateInit (z_stream *strm, int level);
 
      Initializes the internal stream state for compression.  The fields
    zalloc, zfree and opaque must be initialized before by the caller.  If
@@ -241,7 +241,7 @@ ZEXTERN int ZEXPORT deflateInit (z_streamp strm, int level);
 */
 
 
-ZEXTERN int ZEXPORT deflate (z_streamstrm, int flush);
+ZEXTERN int ZEXPORT deflate (z_stream *strm, int flush);
 /*
     deflate compresses as much data as possible, and stops when the input
   buffer becomes empty or the output buffer becomes full.  It may introduce
@@ -348,7 +348,7 @@ ZEXTERN int ZEXPORT deflate (z_streamp strm, int flush);
 */
 
 
-ZEXTERN int ZEXPORT deflateEnd (z_streamstrm);
+ZEXTERN int ZEXPORT deflateEnd (z_stream *strm);
 /*
      All dynamically allocated data structures for this stream are freed.
    This function discards any unprocessed input and does not flush any pending
@@ -363,7 +363,7 @@ ZEXTERN int ZEXPORT deflateEnd (z_streamp strm);
 
 
 /*
-ZEXTERN int ZEXPORT inflateInit (z_streamstrm);
+ZEXTERN int ZEXPORT inflateInit (z_stream *strm);
 
      Initializes the internal stream state for decompression.  The fields
    next_in, avail_in, zalloc, zfree and opaque must be initialized before by
@@ -387,7 +387,7 @@ ZEXTERN int ZEXPORT inflateInit (z_streamp strm);
 */
 
 
-ZEXTERN int ZEXPORT inflate (z_streamstrm, int flush);
+ZEXTERN int ZEXPORT inflate (z_stream *strm, int flush);
 /*
     inflate decompresses as much data as possible, and stops when the input
   buffer becomes empty or the output buffer becomes full.  It may introduce
@@ -503,7 +503,7 @@ ZEXTERN int ZEXPORT inflate (z_streamp strm, int flush);
 */
 
 
-ZEXTERN int ZEXPORT inflateEnd (z_streamstrm);
+ZEXTERN int ZEXPORT inflateEnd (z_stream *strm);
 /*
      All dynamically allocated data structures for this stream are freed.
    This function discards any unprocessed input and does not flush any pending
@@ -522,7 +522,7 @@ ZEXTERN int ZEXPORT inflateEnd (z_streamp strm);
 */
 
 /*
-ZEXTERN int ZEXPORT deflateInit2 (z_streamstrm,
+ZEXTERN int ZEXPORT deflateInit2 (z_stream *strm,
                                      int  level,
                                      int  method,
                                      int  windowBits,
@@ -582,7 +582,7 @@ ZEXTERN int ZEXPORT deflateInit2 (z_streamp strm,
    compression: this will be done by deflate().
 */
 
-ZEXTERN int ZEXPORT deflateSetDictionary (z_streamstrm,
+ZEXTERN int ZEXPORT deflateSetDictionary (z_stream *strm,
                                              const Byte *dictionary,
                                              uInt  dictLength);
 /*
@@ -626,8 +626,8 @@ ZEXTERN int ZEXPORT deflateSetDictionary (z_streamp strm,
    not perform any compression: this will be done by deflate().
 */
 
-ZEXTERN int ZEXPORT deflateCopy (z_streamdest,
-                                    z_streamsource);
+ZEXTERN int ZEXPORT deflateCopy (z_stream *dest,
+                                    z_stream *source);
 /*
      Sets the destination stream as a complete copy of the source stream.
 
@@ -644,7 +644,7 @@ ZEXTERN int ZEXPORT deflateCopy (z_streamp dest,
    destination.
 */
 
-ZEXTERN int ZEXPORT deflateReset (z_streamstrm);
+ZEXTERN int ZEXPORT deflateReset (z_stream *strm);
 /*
      This function is equivalent to deflateEnd followed by deflateInit,
    but does not free and reallocate all the internal compression state.  The
@@ -655,7 +655,7 @@ ZEXTERN int ZEXPORT deflateReset (z_streamp strm);
    stream state was inconsistent (such as zalloc or state being Z_NULL).
 */
 
-ZEXTERN int ZEXPORT deflateParams (z_streamstrm,
+ZEXTERN int ZEXPORT deflateParams (z_stream *strm,
                                       int level,
                                       int strategy);
 /*
@@ -676,7 +676,7 @@ ZEXTERN int ZEXPORT deflateParams (z_streamp strm,
    strm->avail_out was zero.
 */
 
-ZEXTERN int ZEXPORT deflateTune (z_streamstrm,
+ZEXTERN int ZEXPORT deflateTune (z_stream *strm,
                                     int good_length,
                                     int max_lazy,
                                     int nice_length,
@@ -693,7 +693,7 @@ ZEXTERN int ZEXPORT deflateTune (z_streamp strm,
    returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
  */
 
-ZEXTERN uLong ZEXPORT deflateBound (z_streamstrm,
+ZEXTERN uLong ZEXPORT deflateBound (z_stream *strm,
                                        uLong sourceLen);
 /*
      deflateBound() returns an upper bound on the compressed size after
@@ -708,7 +708,7 @@ ZEXTERN uLong ZEXPORT deflateBound (z_streamp strm,
    than Z_FINISH or Z_NO_FLUSH are used.
 */
 
-ZEXTERN int ZEXPORT deflatePending (z_streamstrm,
+ZEXTERN int ZEXPORT deflatePending (z_stream *strm,
                                        unsigned *pending,
                                        int *bits);
 /*
@@ -723,7 +723,7 @@ ZEXTERN int ZEXPORT deflatePending (z_streamp strm,
    stream state was inconsistent.
  */
 
-ZEXTERN int ZEXPORT deflatePrime (z_streamstrm,
+ZEXTERN int ZEXPORT deflatePrime (z_stream *strm,
                                      int bits,
                                      int value);
 /*
@@ -740,7 +740,7 @@ ZEXTERN int ZEXPORT deflatePrime (z_streamp strm,
    source stream state was inconsistent.
 */
 
-ZEXTERN int ZEXPORT deflateSetHeader (z_streamstrm,
+ZEXTERN int ZEXPORT deflateSetHeader (z_stream *strm,
                                          gz_headerp head);
 /*
      deflateSetHeader() provides gzip header information for when a gzip
@@ -765,7 +765,7 @@ ZEXTERN int ZEXPORT deflateSetHeader (z_streamp strm,
 */
 
 /*
-ZEXTERN int ZEXPORT inflateInit2 (z_streamstrm,
+ZEXTERN int ZEXPORT inflateInit2 (z_stream *strm,
                                      int  windowBits);
 
      This is another version of inflateInit with an extra parameter.  The
@@ -814,7 +814,7 @@ ZEXTERN int ZEXPORT inflateInit2 (z_streamp strm,
    deferred until inflate() is called.
 */
 
-ZEXTERN int ZEXPORT inflateSetDictionary (z_streamstrm,
+ZEXTERN int ZEXPORT inflateSetDictionary (z_stream *strm,
                                              const Byte *dictionary,
                                              uInt  dictLength);
 /*
@@ -837,7 +837,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary (z_streamp strm,
    inflate().
 */
 
-ZEXTERN int ZEXPORT inflateGetDictionary (z_streamstrm,
+ZEXTERN int ZEXPORT inflateGetDictionary (z_stream *strm,
                                              Byte *dictionary,
                                              uInt  *dictLength);
 /*
@@ -852,7 +852,7 @@ ZEXTERN int ZEXPORT inflateGetDictionary (z_streamp strm,
    stream state is inconsistent.
 */
 
-ZEXTERN int ZEXPORT inflateSync (z_streamstrm);
+ZEXTERN int ZEXPORT inflateSync (z_stream *strm);
 /*
      Skips invalid compressed data until a possible full flush point (see above
    for the description of deflate with Z_FULL_FLUSH) can be found, or until all
@@ -871,8 +871,8 @@ ZEXTERN int ZEXPORT inflateSync (z_streamp strm);
    input each time, until success or end of the input data.
 */
 
-ZEXTERN int ZEXPORT inflateCopy (z_streamdest,
-                                    z_streamsource);
+ZEXTERN int ZEXPORT inflateCopy (z_stream *dest,
+                                    z_stream *source);
 /*
      Sets the destination stream as a complete copy of the source stream.
 
@@ -887,7 +887,7 @@ ZEXTERN int ZEXPORT inflateCopy (z_streamp dest,
    destination.
 */
 
-ZEXTERN int ZEXPORT inflateReset (z_streamstrm);
+ZEXTERN int ZEXPORT inflateReset (z_stream *strm);
 /*
      This function is equivalent to inflateEnd followed by inflateInit,
    but does not free and reallocate all the internal decompression state.  The
@@ -897,7 +897,7 @@ ZEXTERN int ZEXPORT inflateReset (z_streamp strm);
    stream state was inconsistent (such as zalloc or state being Z_NULL).
 */
 
-ZEXTERN int ZEXPORT inflateReset2 (z_streamstrm,
+ZEXTERN int ZEXPORT inflateReset2 (z_stream *strm,
                                       int windowBits);
 /*
      This function is the same as inflateReset, but it also permits changing
@@ -909,7 +909,7 @@ ZEXTERN int ZEXPORT inflateReset2 (z_streamp strm,
    the windowBits parameter is invalid.
 */
 
-ZEXTERN int ZEXPORT inflatePrime (z_streamstrm,
+ZEXTERN int ZEXPORT inflatePrime (z_stream *strm,
                                      int bits,
                                      int value);
 /*
@@ -930,7 +930,7 @@ ZEXTERN int ZEXPORT inflatePrime (z_streamp strm,
    stream state was inconsistent.
 */
 
-ZEXTERN long ZEXPORT inflateMark (z_streamstrm);
+ZEXTERN long ZEXPORT inflateMark (z_stream *strm);
 /*
      This function returns two values, one in the lower 16 bits of the return
    value, and the other in the remaining upper bits, obtained by shifting the
@@ -958,7 +958,7 @@ ZEXTERN long ZEXPORT inflateMark (z_streamp strm);
    source stream state was inconsistent.
 */
 
-ZEXTERN int ZEXPORT inflateGetHeader (z_streamstrm,
+ZEXTERN int ZEXPORT inflateGetHeader (z_stream *strm,
                                          gz_headerp head);
 /*
      inflateGetHeader() requests that gzip header information be stored in the
@@ -999,7 +999,7 @@ ZEXTERN int ZEXPORT inflateGetHeader (z_streamp strm,
 */
 
 /*
-ZEXTERN int ZEXPORT inflateBackInit (z_streamstrm, int windowBits,
+ZEXTERN int ZEXPORT inflateBackInit (z_stream *strm, int windowBits,
                                         unsigned char *window);
 
      Initialize the internal stream state for decompression using inflateBack()
@@ -1024,7 +1024,7 @@ typedef unsigned (*in_func) (void *,
                                 z_const unsigned char * *);
 typedef int (*out_func) (void *, unsigned char *, unsigned);
 
-ZEXTERN int ZEXPORT inflateBack (z_streamstrm,
+ZEXTERN int ZEXPORT inflateBack (z_stream *strm,
                                     in_func in, void *in_desc,
                                     out_func out, void *out_desc);
 /*
@@ -1094,7 +1094,7 @@ ZEXTERN int ZEXPORT inflateBack (z_streamp strm,
    cannot return Z_OK.
 */
 
-ZEXTERN int ZEXPORT inflateBackEnd (z_streamstrm);
+ZEXTERN int ZEXPORT inflateBackEnd (z_stream *strm);
 /*
      All memory allocated by inflateBackInit() is freed.
 
@@ -1627,12 +1627,12 @@ ZEXTERN uLong ZEXPORT crc32_combine (uLong crc1, uLong crc2, z_off_t len2);
 /* deflateInit and inflateInit are macros to allow checking the zlib version
  * and the compiler's view of z_stream:
  */
-ZEXTERN int ZEXPORT deflateInit_ (z_streamstrm, int level, const char *version, int stream_size);
-ZEXTERN int ZEXPORT inflateInit_ (z_streamstrm, const char *version, int stream_size);
-ZEXTERN int ZEXPORT deflateInit2_ (z_streamstrm, int  level, int  method, int windowBits, int memLevel,
+ZEXTERN int ZEXPORT deflateInit_ (z_stream *strm, int level, const char *version, int stream_size);
+ZEXTERN int ZEXPORT inflateInit_ (z_stream *strm, const char *version, int stream_size);
+ZEXTERN int ZEXPORT deflateInit2_ (z_stream *strm, int  level, int  method, int windowBits, int memLevel,
                                    int strategy, const char *version, int stream_size);
-ZEXTERN int ZEXPORT inflateInit2_ (z_streamstrm, int  windowBits, const char *version, int stream_size);
-ZEXTERN int ZEXPORT inflateBackInit_ (z_streamstrm, int windowBits, unsigned char *window,
+ZEXTERN int ZEXPORT inflateInit2_ (z_stream *strm, int  windowBits, const char *version, int stream_size);
+ZEXTERN int ZEXPORT inflateBackInit_ (z_stream *strm, int windowBits, unsigned char *window,
                                       const char *version, int stream_size);
 #define deflateInit(strm, level) \
         deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
@@ -1729,11 +1729,11 @@ ZEXTERN int ZEXPORT gzgetc_ (gzFile file);  /* backward compatibility */
 
 /* undocumented functions */
 ZEXTERN const char   * ZEXPORT zError           (int);
-ZEXTERN int            ZEXPORT inflateSyncPoint (z_streamp);
+ZEXTERN int            ZEXPORT inflateSyncPoint (z_stream *);
 ZEXTERN const z_crc_t * ZEXPORT get_crc_table   (void);
-ZEXTERN int            ZEXPORT inflateUndermine (z_streamp, int);
-ZEXTERN int            ZEXPORT inflateResetKeep (z_streamp);
-ZEXTERN int            ZEXPORT deflateResetKeep (z_streamp);
+ZEXTERN int            ZEXPORT inflateUndermine (z_stream *, int);
+ZEXTERN int            ZEXPORT inflateResetKeep (z_stream *);
+ZEXTERN int            ZEXPORT deflateResetKeep (z_stream *);
 #if defined(_WIN32) && !defined(Z_SOLO)
 ZEXTERN gzFile         ZEXPORT gzopen_w (const wchar_t *path, const char *mode);
 #endif