From 8a2acbffc86012de3523ecf91db2c4ea1b1c4ea2 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:13:27 -0700 Subject: zlib 1.0-pre --- zutil.h | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'zutil.h') diff --git a/zutil.h b/zutil.h index 063c0e9..bc2d772 100644 --- a/zutil.h +++ b/zutil.h @@ -1,5 +1,5 @@ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-1996 Jean-loup Gailly. + * Copyright (C) 1995 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -15,7 +15,7 @@ #include "zlib.h" -#if defined(MSDOS) || defined(VMS) || defined(CRAY) || defined(WIN32) +#if defined(MSDOS) || defined(VMS) || defined(CRAY) # include # include #else @@ -37,13 +37,9 @@ typedef unsigned short ush; typedef ush FAR ushf; typedef unsigned long ulg; -extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ -/* (size given to avoid silly warnings with Visual C++) */ +extern char *z_errmsg[]; /* indexed by 1-zlib_error */ -#define ERR_MSG(err) (char*)z_errmsg[Z_NEED_DICT-(err)] - -#define ERR_RETURN(strm,err) \ - return (strm->msg = ERR_MSG(err), (err)) +#define ERR_RETURN(strm,err) return (strm->msg = z_errmsg[1-(err)], (err)) /* To be used only when the state is known to be valid */ /* common constants */ @@ -69,8 +65,6 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ #define MAX_MATCH 258 /* The minimum and maximum match lengths */ -#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ - /* target dependencies */ #ifdef MSDOS @@ -148,13 +142,11 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ # define HAVE_MEMCPY #endif #ifdef HAVE_MEMCPY -# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ +# if defined(M_I86SM) || defined(M_I86MM) /* MSC small or medium model */ # define zmemcpy _fmemcpy -# define zmemcmp _fmemcmp # define zmemzero(dest, len) _fmemset(dest, 0, len) # else # define zmemcpy memcpy -# define zmemcmp memcmp # define zmemzero(dest, len) memset(dest, 0, len) # endif #else @@ -184,7 +176,7 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ #endif -typedef uLong (*check_func) OF((uLong check, const Bytef *buf, uInt len)); +typedef uLong (*check_func) OF((uLong check, Bytef *buf, uInt len)); extern void z_error OF((char *m)); -- cgit v1.2.3-55-g6feb