/* 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$ */
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);
/* 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);
}
#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 {
} 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;
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 {
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 */