zlib 0.79

This commit is contained in:
Mark Adler
2011-09-09 22:52:17 -07:00
parent bcf78a2097
commit 913afb9174
23 changed files with 559 additions and 140 deletions

13
zutil.h
View File

@@ -8,7 +8,7 @@
subject to change. Applications should only use zlib.h.
*/
/* $Id: zutil.h,v 1.4 1995/04/14 10:22:17 jloup Exp $ */
/* $Id: zutil.h,v 1.5 1995/04/14 21:22:38 jloup Exp $ */
#ifndef _Z_UTIL_H
#define _Z_UTIL_H
@@ -20,6 +20,10 @@
#else
extern int errno;
#endif
#ifdef __STDC__
# include <string.h>
# include <memory.h>
#endif
#ifndef local
# define local static
@@ -154,13 +158,16 @@ extern char *z_errmsg[]; /* indexed by 1-zlib_error */
#endif
typedef uLong (*check_func) __P((uLong check, Byte *buf, uInt len));
extern void z_error __P((char *m));
voidp zcalloc __P((voidp opaque, unsigned items, unsigned size));
void zcfree __P((voidp opaque, voidp ptr));
#define ZALLOC(strm, items, size) (*strm->zalloc)(strm->opaque, items, size)
#define ZFREE(strm, addr) (*strm->zfree) (strm->opaque, (voidp)addr)
#define ZALLOC(strm, items, size) \
(*((strm)->zalloc))((strm)->opaque, (items), (size))
#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidp)(addr))
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
#endif /* _Z_UTIL_H */