X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..abad53678b86a84d34079d02d8d738a25df27c3f:/src/zlib/zutil.c diff --git a/src/zlib/zutil.c b/src/zlib/zutil.c index 5a3fe6e0a5..52f0bfb55f 100644 --- a/src/zlib/zutil.c +++ b/src/zlib/zutil.c @@ -1,6 +1,6 @@ /* zutil.c -- target dependent utility functions for the compression library * Copyright (C) 1995-1998 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h + * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ @@ -31,15 +31,19 @@ const char * ZEXPORT zlibVersion() return ZLIB_VERSION; } -#ifdef DEBUG +#ifdef __WXDEBUG__ # ifndef verbose # define verbose 0 # endif int z_verbose = verbose; +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ +void z_error (char* m) +#else void z_error (m) char *m; +#endif { fprintf(stderr, "%s\n", m); exit(1); @@ -49,8 +53,12 @@ void z_error (m) /* exported to allow conversion of error code to string for compress() and * uncompress() */ +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ +const char* ZEXPORT zError(int err) +#else const char * ZEXPORT zError(err) int err; +#endif { return ERR_MSG(err); } @@ -58,10 +66,14 @@ const char * ZEXPORT zError(err) #ifndef HAVE_MEMCPY +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ +void zmemcpy(Bytef* dest, Bytef* source, Uint len) +#else void zmemcpy(dest, source, len) Bytef* dest; Bytef* source; uInt len; +#endif { if (len == 0) return; do { @@ -69,10 +81,14 @@ void zmemcpy(dest, source, len) } while (--len != 0); } +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ +int zmemcmp(Bytef* s1, Bytef* s2, int len) +#else int zmemcmp(s1, s2, len) Bytef* s1; Bytef* s2; uInt len; +#endif { uInt j; @@ -82,9 +98,13 @@ int zmemcmp(s1, s2, len) return 0; } +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ +void zmemzero(Bytef* dest, uInt len) +#else void zmemzero(dest, len) Bytef* dest; uInt len; +#endif { if (len == 0) return; do { @@ -205,18 +225,26 @@ extern voidp calloc OF((uInt items, uInt size)); extern void free OF((voidpf ptr)); #endif +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ +voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +#else voidpf zcalloc (opaque, items, size) voidpf opaque; unsigned items; unsigned size; +#endif { if (opaque) items += size - size; /* make compiler happy */ return (voidpf)calloc(items, size); } +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ +void zcfree(voidpf opaque, voidpf ptr) +#else void zcfree (opaque, ptr) voidpf opaque; voidpf ptr; +#endif { free(ptr); if (opaque) return; /* make compiler happy */