#ifndef ZUTIL_H
#define ZUTIL_H
#ifdef HAVE_HIDDEN
#define ZLIB_INTERNAL …
#else
#define ZLIB_INTERNAL
#endif
#include "zlib.h"
#if defined(STDC) && !defined(Z_SOLO)
# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
# include <stddef.h>
# endif
# include <string.h>
# include <stdlib.h>
#endif
#ifndef local
#define local …
#endif
uch;
uchf;
ush;
ushf;
ulg;
#if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC)
# include <limits.h>
# if (ULONG_MAX == 0xffffffffffffffff)
#define Z_U8 …
# elif (ULLONG_MAX == 0xffffffffffffffff)
#define Z_U8 …
# elif (UINT_MAX == 0xffffffffffffffff)
#define Z_U8 …
# endif
#endif
extern z_const char * const z_errmsg[10];
#define ERR_MSG(err) …
#define ERR_RETURN(strm,err) …
#ifndef DEF_WBITS
#define DEF_WBITS …
#endif
#if MAX_MEM_LEVEL >= 8
#define DEF_MEM_LEVEL …
#else
#define DEF_MEM_LEVEL …
#endif
#define STORED_BLOCK …
#define STATIC_TREES …
#define DYN_TREES …
#define MIN_MATCH …
#define MAX_MATCH …
#define PRESET_DICT …
#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
#define OS_CODE …
# ifndef Z_SOLO
# if defined(__TURBOC__) || defined(__BORLANDC__)
# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
void _Cdecl farfree( void *block );
void *_Cdecl farmalloc( unsigned long nbytes );
# else
# include <alloc.h>
# endif
# else
# include <malloc.h>
# endif
# endif
#endif
#ifdef AMIGA
#define OS_CODE …
#endif
#if defined(VAXC) || defined(VMS)
#define OS_CODE …
#define F_OPEN …
#endif
#ifdef __370__
# if __TARGET_LIB__ < 0x20000000
#define OS_CODE …
# elif __TARGET_LIB__ < 0x40000000
#define OS_CODE …
# else
#define OS_CODE …
# endif
#endif
#if defined(ATARI) || defined(atarist)
#define OS_CODE …
#endif
#ifdef OS2
#define OS_CODE …
# if defined(M_I86) && !defined(Z_SOLO)
# include <malloc.h>
# endif
#endif
#if defined(MACOS)
#define OS_CODE …
#endif
#ifdef __acorn
#define OS_CODE …
#endif
#if defined(WIN32) && !defined(__CYGWIN__)
#define OS_CODE …
#endif
#ifdef _BEOS_
#define OS_CODE …
#endif
#ifdef __TOS_OS400__
#define OS_CODE …
#endif
#ifdef __APPLE__
#define OS_CODE …
#endif
#if defined(__BORLANDC__) && !defined(MSDOS)
#pragma warn -8004
#pragma warn -8008
#pragma warn -8066
#endif
#if !defined(_WIN32) && \
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
#endif
#ifndef OS_CODE
#define OS_CODE …
#endif
#ifndef F_OPEN
#define F_OPEN(name, mode) …
#endif
#if defined(pyr) || defined(Z_SOLO)
#define NO_MEMCPY
#endif
#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
#define NO_MEMCPY
#endif
#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
#define HAVE_MEMCPY
#endif
#ifdef HAVE_MEMCPY
# ifdef SMALL_MEDIUM
#define zmemcpy …
#define zmemcmp …
#define zmemzero …
# else
#define zmemcpy …
#define zmemcmp …
#define zmemzero(dest, len) …
# endif
#else
void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len);
int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len);
void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len);
#endif
#ifdef ZLIB_DEBUG
# include <stdio.h>
extern int ZLIB_INTERNAL z_verbose;
extern void ZLIB_INTERNAL z_error(char *m);
#define Assert …
#define Trace …
#define Tracev …
#define Tracevv …
#define Tracec …
#define Tracecv …
#else
#define Assert(cond,msg) …
#define Trace(x) …
#define Tracev(x) …
#define Tracevv(x) …
#define Tracec(c,x) …
#define Tracecv(c,x) …
#endif
#ifndef Z_SOLO
voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items,
unsigned size);
void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr);
#endif
#define ZALLOC(strm, items, size) …
#define ZFREE(strm, addr) …
#define TRY_FREE(s, p) …
#define ZSWAP32(q) …
#endif