diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:17:02 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:17:02 -0700 |
commit | ff11b0a61f7345572ff2e413173d3179486162f2 (patch) | |
tree | f3c9e2563c4f0ac6684a0012ad48423d4c6aa798 /zutil.h | |
parent | e26a448e9673d67dc2866e11a48d24fc352e5f80 (diff) | |
download | zlib-ff11b0a61f7345572ff2e413173d3179486162f2.tar.gz zlib-ff11b0a61f7345572ff2e413173d3179486162f2.tar.bz2 zlib-ff11b0a61f7345572ff2e413173d3179486162f2.zip |
zlib 1.0.4v1.0.4
Diffstat (limited to 'zutil.h')
-rw-r--r-- | zutil.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -8,14 +8,14 @@ | |||
8 | subject to change. Applications should only use zlib.h. | 8 | subject to change. Applications should only use zlib.h. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | /* $Id: zutil.h,v 1.14 1996/05/22 11:52:40 me Exp $ */ | 11 | /* $Id: zutil.h,v 1.16 1996/07/24 13:41:13 me Exp $ */ |
12 | 12 | ||
13 | #ifndef _Z_UTIL_H | 13 | #ifndef _Z_UTIL_H |
14 | #define _Z_UTIL_H | 14 | #define _Z_UTIL_H |
15 | 15 | ||
16 | #include "zlib.h" | 16 | #include "zlib.h" |
17 | 17 | ||
18 | #if defined(MSDOS) || defined(VMS) || defined(CRAY) || defined(WIN32) | 18 | #if defined(MSDOS)||defined(VMS)||defined(CRAY)||defined(WIN32)||defined(RISCOS) |
19 | # include <stddef.h> | 19 | # include <stddef.h> |
20 | # include <errno.h> | 20 | # include <errno.h> |
21 | #else | 21 | #else |
@@ -40,10 +40,10 @@ typedef unsigned long ulg; | |||
40 | extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ | 40 | extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ |
41 | /* (size given to avoid silly warnings with Visual C++) */ | 41 | /* (size given to avoid silly warnings with Visual C++) */ |
42 | 42 | ||
43 | #define ERR_MSG(err) (char*)z_errmsg[Z_NEED_DICT-(err)] | 43 | #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] |
44 | 44 | ||
45 | #define ERR_RETURN(strm,err) \ | 45 | #define ERR_RETURN(strm,err) \ |
46 | return (strm->msg = ERR_MSG(err), (err)) | 46 | return (strm->msg = (char*)ERR_MSG(err), (err)) |
47 | /* To be used only when the state is known to be valid */ | 47 | /* To be used only when the state is known to be valid */ |
48 | 48 | ||
49 | /* common constants */ | 49 | /* common constants */ |
@@ -116,7 +116,7 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
116 | # define OS_CODE 0x0a | 116 | # define OS_CODE 0x0a |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | #ifdef _BEOS_ | 119 | #if defined(_BEOS_) || defined(RISCOS) |
120 | # define fdopen(fd,mode) NULL /* No fdopen() */ | 120 | # define fdopen(fd,mode) NULL /* No fdopen() */ |
121 | #endif | 121 | #endif |
122 | 122 | ||
@@ -163,6 +163,7 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
163 | # endif | 163 | # endif |
164 | #else | 164 | #else |
165 | extern void zmemcpy OF((Bytef* dest, Bytef* source, uInt len)); | 165 | extern void zmemcpy OF((Bytef* dest, Bytef* source, uInt len)); |
166 | extern int zmemcmp OF((Bytef* s1, Bytef* s2, uInt len)); | ||
166 | extern void zmemzero OF((Bytef* dest, uInt len)); | 167 | extern void zmemzero OF((Bytef* dest, uInt len)); |
167 | #endif | 168 | #endif |
168 | 169 | ||
@@ -172,6 +173,7 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
172 | # ifndef verbose | 173 | # ifndef verbose |
173 | # define verbose 0 | 174 | # define verbose 0 |
174 | # endif | 175 | # endif |
176 | extern void z_error OF((char *m)); | ||
175 | # define Assert(cond,msg) {if(!(cond)) z_error(msg);} | 177 | # define Assert(cond,msg) {if(!(cond)) z_error(msg);} |
176 | # define Trace(x) fprintf x | 178 | # define Trace(x) fprintf x |
177 | # define Tracev(x) {if (verbose) fprintf x ;} | 179 | # define Tracev(x) {if (verbose) fprintf x ;} |
@@ -190,8 +192,6 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
190 | 192 | ||
191 | typedef uLong (*check_func) OF((uLong check, const Bytef *buf, uInt len)); | 193 | typedef uLong (*check_func) OF((uLong check, const Bytef *buf, uInt len)); |
192 | 194 | ||
193 | extern void z_error OF((char *m)); | ||
194 | |||
195 | voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); | 195 | voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); |
196 | void zcfree OF((voidpf opaque, voidpf ptr)); | 196 | void zcfree OF((voidpf opaque, voidpf ptr)); |
197 | 197 | ||