]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove FAR variants of variables ushf, schf, Posf, Bytef, charf,
authorhansr <hk-git@circlestorm.org>
Thu, 16 Oct 2014 13:32:17 +0000 (15:32 +0200)
committerhansr <hk-git@circlestorm.org>
Thu, 16 Oct 2014 13:32:17 +0000 (15:32 +0200)
intf, uIntf and uLongf

13 files changed:
adler32.c
arch/x86/fill_window_sse.c
compress.c
crc32.c
deflate.c
deflate.h
gzwrite.c
inflate.c
match.c
trees.c
uncompr.c
zlib.h
zutil.h

index 248473d0f908f8fa5c91b17d29341129c3797b56..9b0f42ad21a8a262143198b8c2659fd3c935e916 100644 (file)
--- a/adler32.c
+++ b/adler32.c
@@ -64,7 +64,7 @@ local uLong adler32_combine_ (uLong adler1, uLong adler2, z_off64_t len2);
 /* ========================================================================= */
 uLong ZEXPORT adler32(adler, buf, len)
     uLong adler;
-    const Bytef *buf;
+    const Byte *buf;
     uInt len;
 {
     unsigned long sum2;
index 9f95ad1f7780332afe53375f77bf7a81fbf6ec22..d2cd32c7b0c1757de8bbd53a9adecca161bace26 100644 (file)
 #include <immintrin.h>
 #include "deflate.h"
 
-extern int read_buf        (z_streamp strm, Bytef *buf, unsigned size);
+extern int read_buf        (z_streamp strm, Byte *buf, unsigned size);
 
 ZLIB_INTERNAL void fill_window_sse(deflate_state *s)
 {
     z_const __m128i xmm_wsize = _mm_set1_epi16(s->w_size);
 
     register unsigned n;
-    register Posf *p;
+    register Pos *p;
     unsigned more;    /* Amount of free space at the end of the window. */
     uInt wsize = s->w_size;
 
index 9b93ab486422195af2c7e4cf9ec08f7ca5f30115..236e6ef2ccf23e5cae58446a18ac0565311ee2b8 100644 (file)
    Z_STREAM_ERROR if the level parameter is invalid.
 */
 int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
+    Byte *dest;
+    uLong *destLen;
+    const Byte *source;
     uLong sourceLen;
     int level;
 {
     z_stream stream;
     int err;
 
-    stream.next_in = (z_const Bytef *)source;
+    stream.next_in = (z_const Byte *)source;
     stream.avail_in = (uInt)sourceLen;
     stream.next_out = dest;
     stream.avail_out = (uInt)*destLen;
@@ -56,9 +56,9 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
 /* ===========================================================================
  */
 int ZEXPORT compress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
+    Byte *dest;
+    uLong *destLen;
+    const Byte *source;
     uLong sourceLen;
 {
     return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
diff --git a/crc32.c b/crc32.c
index 4b2a386949cb6393c3bd29a4e8d74493a99e7599..67e3bf76cf46dc3ec50fc93977a7c308900fcea7 100644 (file)
--- a/crc32.c
+++ b/crc32.c
@@ -464,7 +464,7 @@ ZLIB_INTERNAL void crc_finalize(deflate_state *const s)
 #endif
 }
 
-ZLIB_INTERNAL void copy_with_crc(z_streamp strm, Bytef *dst, long size)
+ZLIB_INTERNAL void copy_with_crc(z_streamp strm, Byte *dst, long size)
 {
 #ifdef X86_PCLMULQDQ_CRC
     if (x86_cpu_has_pclmulqdq) {
index c8fea7619b36e5f39adca0e8cfbe79c31a80756f..cf957fc46f4cc76dc65347cc2f15b116deb83f42 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -82,7 +82,7 @@ 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_streamp strm);
-ZLIB_INTERNAL int read_buf        (z_streamp strm, Bytef *buf, unsigned size);
+ZLIB_INTERNAL int read_buf        (z_streamp strm, Byte *buf, unsigned size);
 #ifdef ASMV
       void match_init (void); /* asm code initialization */
       uInt longest_match  (deflate_state *s, IPos cur_match);
@@ -96,7 +96,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_streamp strm, Bytef *dst, long size);
+extern void copy_with_crc(z_streamp strm, Byte *dst, long size);
 
 /* ===========================================================================
  * Local data
@@ -233,7 +233,7 @@ bulk_insert_str(deflate_state *s, Pos startpos, uInt count) {
  */
 #define CLEAR_HASH(s) \
     s->head[s->hash_size-1] = NIL; \
-    zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
+    zmemzero((Byte *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
 
 /* ========================================================================= */
 int ZEXPORT deflateInit_(strm, level, version, stream_size)
@@ -264,7 +264,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
     int wrap = 1;
     static const char my_version[] = ZLIB_VERSION;
 
-    ushf *overlay;
+    ush *overlay;
     /* We overlay pending_buf and d_buf+l_buf. This works since the average
      * output size for (length,distance) codes is <= 24 bits.
      */
@@ -345,16 +345,16 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
     window_padding = 8;
 #endif
 
-    s->window = (Bytef *) ZALLOC(strm, s->w_size + window_padding, 2*sizeof(Byte));
-    s->prev   = (Posf *)  ZALLOC(strm, s->w_size, sizeof(Pos));
-    s->head   = (Posf *)  ZALLOC(strm, s->hash_size, sizeof(Pos));
+    s->window = (Byte *) ZALLOC(strm, s->w_size + window_padding, 2*sizeof(Byte));
+    s->prev   = (Pos *)  ZALLOC(strm, s->w_size, sizeof(Pos));
+    s->head   = (Pos *)  ZALLOC(strm, s->hash_size, sizeof(Pos));
 
     s->high_water = 0;      /* nothing written to s->window yet */
 
     s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
 
-    overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
-    s->pending_buf = (uchf *) overlay;
+    overlay = (ush *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
+    s->pending_buf = (uch *) overlay;
     s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
 
     if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
@@ -377,7 +377,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
 /* ========================================================================= */
 int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
     z_streamp strm;
-    const Bytef *dictionary;
+    const Byte *dictionary;
     uInt  dictLength;
 {
     deflate_state *s;
@@ -414,7 +414,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
     avail = strm->avail_in;
     next = strm->next_in;
     strm->avail_in = dictLength;
-    strm->next_in = (z_const Bytef *)dictionary;
+    strm->next_in = (z_const Byte *)dictionary;
     fill_window(s);
     while (s->lookahead >= MIN_MATCH) {
         str = s->strstart;
@@ -524,7 +524,7 @@ int ZEXPORT deflatePrime (strm, bits, value)
 
     if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
     s = strm->state;
-    if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
+    if ((Byte *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
         return Z_BUF_ERROR;
     do {
         put = Buf_size - s->bi_valid;
@@ -618,7 +618,7 @@ uLong ZEXPORT deflateBound(strm, sourceLen)
 {
     deflate_state *s;
     uLong complen, wraplen;
-    Bytef *str;
+    Byte *str;
 
     /* conservative upper bound for compressed data */
     complen = sourceLen +
@@ -1072,7 +1072,7 @@ int ZEXPORT deflateCopy (dest, source)
 {
     deflate_state *ds;
     deflate_state *ss;
-    ushf *overlay;
+    ush *overlay;
 
 
     if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
@@ -1089,11 +1089,11 @@ int ZEXPORT deflateCopy (dest, source)
     zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state));
     ds->strm = dest;
 
-    ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
-    ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
-    ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
-    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
-    ds->pending_buf = (uchf *) overlay;
+    ds->window = (Byte *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
+    ds->prev   = (Pos *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
+    ds->head   = (Pos *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
+    overlay = (ush *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
+    ds->pending_buf = (uch *) overlay;
 
     if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
         ds->pending_buf == Z_NULL) {
@@ -1126,7 +1126,7 @@ int ZEXPORT deflateCopy (dest, source)
  */
 ZLIB_INTERNAL int read_buf(strm, buf, size)
     z_streamp strm;
-    Bytef *buf;
+    Byte *buf;
     unsigned size;
 {
     unsigned len = strm->avail_in;
@@ -1246,7 +1246,7 @@ local void fill_window_c(s)
     deflate_state *s;
 {
     register unsigned n;
-    register Posf *p;
+    register Pos *p;
     unsigned more;    /* Amount of free space at the end of the window. */
     uInt wsize = s->w_size;
 
@@ -1423,8 +1423,8 @@ local void fill_window_c(s)
  */
 #define FLUSH_BLOCK_ONLY(s, last) { \
    _tr_flush_block(s, (s->block_start >= 0L ? \
-                   (charf *)&s->window[(unsigned)s->block_start] : \
-                   (charf *)Z_NULL), \
+                   (char *)&s->window[(unsigned)s->block_start] : \
+                   (char *)Z_NULL), \
                 (ulg)((long)s->strstart - s->block_start), \
                 (last)); \
    s->block_start = s->strstart; \
@@ -1767,7 +1767,7 @@ local block_state deflate_rle(s, flush)
 {
     int bflush;             /* set if current block must be flushed */
     uInt prev;              /* byte at distance one to match */
-    Bytef *scan, *strend;   /* scan goes up to strend for length of run */
+    Byte *scan, *strend;   /* scan goes up to strend for length of run */
 
     for (;;) {
         /* Make sure that we always have enough lookahead, except
index e1f44b403d0a5ccb72f6918a07f0434ab197fa73..265cf9d61f8cb852d01010d8b2de525093d2d856 100644 (file)
--- a/deflate.h
+++ b/deflate.h
@@ -90,7 +90,6 @@ typedef struct tree_desc_s {
 } tree_desc;
 
 typedef ush Pos;
-typedef Pos Posf;
 typedef unsigned IPos;
 
 /* A Pos is an index in the character window. We use short instead of int to
@@ -100,9 +99,9 @@ typedef unsigned IPos;
 typedef struct internal_state {
     z_streamp strm;      /* pointer back to this zlib stream */
     int   status;        /* as the name implies */
-    Bytef *pending_buf;  /* output still pending */
+    Byte *pending_buf;  /* output still pending */
     ulg   pending_buf_size; /* size of pending_buf */
-    Bytef *pending_out;  /* next pending byte to output to the stream */
+    Byte *pending_out;  /* next pending byte to output to the stream */
     uInt   pending;      /* nb of bytes in the pending buffer */
     int   wrap;          /* bit 0 true for zlib, bit 1 true for gzip */
     gz_headerp  gzhead;  /* gzip header information to write */
@@ -120,7 +119,7 @@ typedef struct internal_state {
     uInt  w_bits;        /* log2(w_size)  (8..16) */
     uInt  w_mask;        /* w_size - 1 */
 
-    Bytef *window;
+    Byte *window;
     /* Sliding window. Input bytes are read into the second half of the window,
      * and move to the first half later to keep a dictionary of at least wSize
      * bytes. With this organization, matches are limited to a distance of
@@ -135,13 +134,13 @@ typedef struct internal_state {
      * is directly used as sliding window.
      */
 
-    Posf *prev;
+    Pos *prev;
     /* Link to older string with same hash index. To limit the size of this
      * array to 64K, this link is maintained only for the last 32K strings.
      * An index in this array is thus a window index modulo 32K.
      */
 
-    Posf *head; /* Heads of the hash chains or NIL. */
+    Pos *head; /* Heads of the hash chains or NIL. */
 
     uInt  ins_h;          /* hash index of string to be inserted */
     uInt  hash_size;      /* number of elements in hash table */
@@ -221,7 +220,7 @@ typedef struct internal_state {
     /* Depth of each subtree used as tie breaker for trees of equal frequency
      */
 
-    uchf *l_buf;          /* buffer for literals or lengths */
+    uch *l_buf;          /* buffer for literals or lengths */
 
     uInt  lit_bufsize;
     /* Size of match buffer for literals/lengths.  There are 4 reasons for
@@ -245,7 +244,7 @@ typedef struct internal_state {
 
     uInt last_lit;      /* running index in l_buf */
 
-    ushf *d_buf;
+    ush *d_buf;
     /* Buffer for distances. To simplify the code, d_buf and l_buf have
      * the same number of elements. To use different lengths, an extra flag
      * array would be necessary.
@@ -333,10 +332,10 @@ typedef enum {
         /* in trees.c */
 void ZLIB_INTERNAL _tr_init (deflate_state *s);
 int ZLIB_INTERNAL _tr_tally (deflate_state *s, unsigned dist, unsigned lc);
-void ZLIB_INTERNAL _tr_flush_block (deflate_state *s, charf *buf, ulg stored_len, int last);
+void ZLIB_INTERNAL _tr_flush_block (deflate_state *s, char *buf, ulg stored_len, int last);
 void ZLIB_INTERNAL _tr_flush_bits (deflate_state *s);
 void ZLIB_INTERNAL _tr_align (deflate_state *s);
-void ZLIB_INTERNAL _tr_stored_block (deflate_state *s, charf *buf, ulg stored_len, int last);
+void ZLIB_INTERNAL _tr_stored_block (deflate_state *s, char *buf, ulg stored_len, int last);
 void ZLIB_INTERNAL bi_windup (deflate_state *s);
 
 #define d_code(dist) \
index 2c75d5946ec975419a7d0da1ff8d6fa1f1f3255a..c592d1a6a490adc9c914261b70b51581982b6646 100644 (file)
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -231,7 +231,7 @@ int ZEXPORT gzwrite(file, buf, len)
 
         /* directly compress user buffer to file */
         strm->avail_in = len;
-        strm->next_in = (z_const Bytef *)buf;
+        strm->next_in = (z_const Byte *)buf;
         state->x.pos += len;
         if (gz_comp(state, Z_NO_FLUSH) == -1)
             return 0;
index 58f806a71b1425575f0f5640ffdcec98b9a36c45..f943d5b359f936a26e7247e477bab943d5579088 100644 (file)
--- a/inflate.c
+++ b/inflate.c
@@ -376,7 +376,7 @@ void makefixed()
  */
 local int updatewindow(strm, end, copy)
 z_streamp strm;
-const Bytef *end;
+const Byte *end;
 unsigned copy;
 {
     struct inflate_state *state;
@@ -1265,7 +1265,7 @@ z_streamp strm;
 
 int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength)
 z_streamp strm;
-Bytef *dictionary;
+Byte *dictionary;
 uInt *dictLength;
 {
     struct inflate_state *state;
@@ -1288,7 +1288,7 @@ uInt *dictLength;
 
 int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
 z_streamp strm;
-const Bytef *dictionary;
+const Byte *dictionary;
 uInt dictLength;
 {
     struct inflate_state *state;
diff --git a/match.c b/match.c
index a8e7c9e8b162c7813ce02c2f477d35118999a531..5ca958fa2002f1ed661733217da6c6117a224ac2 100644 (file)
--- a/match.c
+++ b/match.c
@@ -25,7 +25,7 @@
 local unsigned std1_longest_match(deflate_state *z_const s, IPos cur_match)
 {
        z_const unsigned wmask = s->w_mask;
-    z_const Posf *prev = s->prev;
+       z_const Pos *prev = s->prev;
 
        unsigned chain_length;
        IPos limit;
@@ -50,7 +50,7 @@ local unsigned std1_longest_match(deflate_state *z_const s, IPos cur_match)
         * Do not looks for matches beyond the end of the input. This is
         * necessary to make deflate deterministic
         */
-    nice_match = (uInt)s->nice_match > s->lookahead ? s->lookahead : s->nice_match;
+       nice_match = (uInt)s->nice_match > s->lookahead ? s->lookahead : s->nice_match;
 
        /*
         * Stop when cur_match becomes <= limit. To simplify the code,
@@ -143,7 +143,7 @@ local unsigned std1_longest_match(deflate_state *z_const s, IPos cur_match)
 local unsigned std2_longest_match(deflate_state *z_const s, IPos cur_match)
 {
        z_const unsigned wmask = s->w_mask;
-    z_const Posf *prev = s->prev;
+       z_const Pos *prev = s->prev;
 
        unsigned short scan_start, scan_end;
        unsigned chain_length;
@@ -169,7 +169,7 @@ local unsigned std2_longest_match(deflate_state *z_const s, IPos cur_match)
         * Do not looks for matches beyond the end of the input. This is
         * necessary to make deflate deterministic
         */
-    nice_match = (uInt)s->nice_match > s->lookahead ? s->lookahead : s->nice_match;
+       nice_match = (uInt)s->nice_match > s->lookahead ? s->lookahead : s->nice_match;
 
        /*
         * Stop when cur_match becomes <= limit. To simplify the code,
diff --git a/trees.c b/trees.c
index df6cec913d9207b5e865df4f5be04cb5f0ad2781..a31e4a08ea1ad38f1b6aa9d760609d63b75a329d 100644 (file)
--- a/trees.c
+++ b/trees.c
@@ -113,7 +113,7 @@ local int base_dist[D_CODES];
 
 struct static_tree_desc_s {
     const ct_data *static_tree;  /* static tree or NULL */
-    const intf *extra_bits;      /* extra bits for each code or NULL */
+    const int *extra_bits;      /* extra bits for each code or NULL */
     int     extra_base;          /* base index for extra_bits */
     int     elems;               /* max number of elements in the tree */
     int     max_length;          /* max bit length for the codes */
@@ -136,7 +136,7 @@ local void tr_static_init (void);
 local void init_block     (deflate_state *s);
 local void pqdownheap     (deflate_state *s, ct_data *tree, int k);
 local void gen_bitlen     (deflate_state *s, tree_desc *desc);
-local void gen_codes      (ct_data *tree, int max_code, ushf *bl_count);
+local void gen_codes      (ct_data *tree, int max_code, ush *bl_count);
 local void build_tree     (deflate_state *s, tree_desc *desc);
 local void scan_tree      (deflate_state *s, ct_data *tree, int max_code);
 local void send_tree      (deflate_state *s, ct_data *tree, int max_code);
@@ -146,7 +146,7 @@ local void compress_block (deflate_state *s, const ct_data *ltree, const ct_data
 local int  detect_data_type (deflate_state *s);
 local unsigned bi_reverse (unsigned value, int length);
 local void bi_flush       (deflate_state *s);
-local void copy_block     (deflate_state *s, charf *buf, unsigned len, int header);
+local void copy_block     (deflate_state *s, char *buf, unsigned len, int header);
 
 #ifdef GEN_TREES_H
 local void gen_trees_header (void);
@@ -416,7 +416,7 @@ local void gen_bitlen(s, desc)
     ct_data *tree        = desc->dyn_tree;
     int max_code         = desc->max_code;
     const ct_data *stree = desc->stat_desc->static_tree;
-    const intf *extra    = desc->stat_desc->extra_bits;
+    const int *extra     = desc->stat_desc->extra_bits;
     int base             = desc->stat_desc->extra_base;
     int max_length       = desc->stat_desc->max_length;
     int h;              /* heap index */
@@ -499,7 +499,7 @@ local void gen_bitlen(s, desc)
 local void gen_codes (tree, max_code, bl_count)
     ct_data *tree;             /* the tree to decorate */
     int max_code;              /* largest code with non zero frequency */
-    ushf *bl_count;            /* number of codes at each bit length */
+    ush *bl_count;            /* number of codes at each bit length */
 {
     ush next_code[MAX_BITS+1]; /* next code value for each bit length */
     ush code = 0;              /* running code value */
@@ -788,7 +788,7 @@ local void send_all_trees(s, lcodes, dcodes, blcodes)
  */
 void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
     deflate_state *s;
-    charf *buf;       /* input block */
+    char *buf;       /* input block */
     ulg stored_len;   /* length of input block */
     int last;         /* one if this is the last block for a file */
 {
@@ -830,7 +830,7 @@ void ZLIB_INTERNAL _tr_align(s)
  */
 void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
     deflate_state *s;
-    charf *buf;       /* input block, or NULL if too old */
+    char *buf;       /* input block, or NULL if too old */
     ulg stored_len;   /* length of input block */
     int last;         /* one if this is the last block for a file */
 {
@@ -1128,7 +1128,7 @@ ZLIB_INTERNAL void bi_windup(s)
  */
 local void copy_block(s, buf, len, header)
     deflate_state *s;
-    charf    *buf;    /* the input data */
+    char    *buf;    /* the input data */
     unsigned len;     /* its length */
     int      header;  /* true if block header must be written */
 {
index ed427db395847b9f69d15c625a2e743b1d6deabf..fada0c68d9d00afb206a23e4c8f355d93de47d5c 100644 (file)
--- a/uncompr.c
+++ b/uncompr.c
    buffer, or Z_DATA_ERROR if the input data was corrupted.
 */
 int ZEXPORT uncompress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
+    Byte *dest;
+    uLong *destLen;
+    const Byte *source;
     uLong sourceLen;
 {
     z_stream stream;
     int err;
 
-    stream.next_in = (z_const Bytef *)source;
+    stream.next_in = (z_const Byte *)source;
     stream.avail_in = (uInt)sourceLen;
     stream.next_out = dest;
     stream.avail_out = (uInt)*destLen;
diff --git a/zlib.h b/zlib.h
index fde157367af43ed9cb21a2e1f468505e61a2346c..55d0e399e71fc6b7f82447254024544e17878dd7 100644 (file)
--- a/zlib.h
+++ b/zlib.h
@@ -83,11 +83,11 @@ typedef void   (*free_func)  (voidpf opaque, voidpf address);
 struct internal_state;
 
 typedef struct z_stream_s {
-    z_const Bytef *next_in;     /* next input byte */
+    z_const Byte *next_in;     /* next input byte */
     uInt     avail_in;  /* number of bytes available at next_in */
     uLong    total_in;  /* total number of input bytes read so far */
 
-    Bytef    *next_out; /* next output byte should be put there */
+    Byte    *next_out; /* next output byte should be put there */
     uInt     avail_out; /* remaining free space at next_out */
     uLong    total_out; /* total number of bytes output so far */
 
@@ -114,12 +114,12 @@ typedef struct gz_header_s {
     uLong   time;       /* modification time */
     int     xflags;     /* extra flags (not used when writing a gzip file) */
     int     os;         /* operating system */
-    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
+    Byte   *extra;     /* pointer to extra field or Z_NULL if none */
     uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
     uInt    extra_max;  /* space at extra (only when reading header) */
-    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
+    Byte   *name;      /* pointer to zero-terminated file name or Z_NULL */
     uInt    name_max;   /* space at name (only when reading header) */
-    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
+    Byte   *comment;   /* pointer to zero-terminated comment or Z_NULL */
     uInt    comm_max;   /* space at comment (only when reading header) */
     int     hcrc;       /* true if there was or will be a header crc */
     int     done;       /* true when done reading gzip header (not used
@@ -576,7 +576,7 @@ ZEXTERN int ZEXPORT deflateInit2 (z_streamp strm,
 */
 
 ZEXTERN int ZEXPORT deflateSetDictionary (z_streamp strm,
-                                             const Bytef *dictionary,
+                                             const Byte *dictionary,
                                              uInt  dictLength);
 /*
      Initializes the compression dictionary from the given byte sequence
@@ -808,7 +808,7 @@ ZEXTERN int ZEXPORT inflateInit2 (z_streamp strm,
 */
 
 ZEXTERN int ZEXPORT inflateSetDictionary (z_streamp strm,
-                                             const Bytef *dictionary,
+                                             const Byte *dictionary,
                                              uInt  dictLength);
 /*
      Initializes the decompression dictionary from the given uncompressed byte
@@ -831,7 +831,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary (z_streamp strm,
 */
 
 ZEXTERN int ZEXPORT inflateGetDictionary (z_streamp strm,
-                                             Bytef *dictionary,
+                                             Byte *dictionary,
                                              uInt  *dictLength);
 /*
      Returns the sliding dictionary being maintained by inflate.  dictLength is
@@ -1148,8 +1148,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags (void);
    you need special options.
 */
 
-ZEXTERN int ZEXPORT compress (Bytef *dest,   uLongf *destLen,
-                                 const Bytef *source, uLong sourceLen);
+ZEXTERN int ZEXPORT compress (Byte *dest,   uLong *destLen,
+                                 const Byte *source, uLong sourceLen);
 /*
      Compresses the source buffer into the destination buffer.  sourceLen is
    the byte length of the source buffer.  Upon entry, destLen is the total size
@@ -1162,8 +1162,8 @@ ZEXTERN int ZEXPORT compress (Bytef *dest,   uLongf *destLen,
    buffer.
 */
 
-ZEXTERN int ZEXPORT compress2 (Bytef *dest,   uLongf *destLen,
-                                  const Bytef *source, uLong sourceLen,
+ZEXTERN int ZEXPORT compress2 (Byte *dest,   uLong *destLen,
+                                  const Byte *source, uLong sourceLen,
                                   int level);
 /*
      Compresses the source buffer into the destination buffer.  The level
@@ -1185,8 +1185,8 @@ ZEXTERN uLong ZEXPORT compressBound (uLong sourceLen);
    compress() or compress2() call to allocate the destination buffer.
 */
 
-ZEXTERN int ZEXPORT uncompress (Bytef *dest,   uLongf *destLen,
-                                   const Bytef *source, uLong sourceLen);
+ZEXTERN int ZEXPORT uncompress (Byte *dest,   uLong *destLen,
+                                   const Byte *source, uLong sourceLen);
 /*
      Decompresses the source buffer into the destination buffer.  sourceLen is
    the byte length of the source buffer.  Upon entry, destLen is the total size
@@ -1557,7 +1557,7 @@ ZEXTERN void ZEXPORT gzclearerr (gzFile file);
    library.
 */
 
-ZEXTERN uLong ZEXPORT adler32 (uLong adler, const Bytef *buf, uInt len);
+ZEXTERN uLong ZEXPORT adler32 (uLong adler, const Byte *buf, uInt len);
 /*
      Update a running Adler-32 checksum with the bytes buf[0..len-1] and
    return the updated checksum.  If buf is Z_NULL, this function returns the
@@ -1588,7 +1588,7 @@ ZEXTERN uLong ZEXPORT adler32_combine (uLong adler1, uLong adler2,
    negative, the result has no meaning or utility.
 */
 
-ZEXTERN uLong ZEXPORT crc32   (uLong crc, const Bytef *buf, uInt len);
+ZEXTERN uLong ZEXPORT crc32   (uLong crc, const Byte *buf, uInt len);
 /*
      Update a running CRC-32 with the bytes buf[0..len-1] and return the
    updated CRC-32.  If buf is Z_NULL, this function returns the required
diff --git a/zutil.h b/zutil.h
index 774532664228267f63d9c7cd07e57faef64b3837..470aab77661e720e599e366bb25de0c7eb3a1f8d 100644 (file)
--- a/zutil.h
+++ b/zutil.h
@@ -39,9 +39,7 @@
 /* compile with -Dlocal if your debugger can't find static symbols */
 
 typedef unsigned char  uch;
-typedef uch uchf;
 typedef unsigned short ush;
-typedef ush ushf;
 typedef unsigned long  ulg;
 
 extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */