diff options
Diffstat (limited to 'lib/libz/zutil.c')
-rw-r--r-- | lib/libz/zutil.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/libz/zutil.c b/lib/libz/zutil.c index 5858792..0d12b55 100644 --- a/lib/libz/zutil.c +++ b/lib/libz/zutil.c @@ -1,12 +1,10 @@ /* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-1996 Jean-loup Gailly. + * Copyright (C) 1995-1998 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ /* $FreeBSD$ */ -#include <stdio.h> - #include "zutil.h" struct internal_state {int dummy;}; /* for buggy compilers */ @@ -28,12 +26,18 @@ const char *z_errmsg[10] = { ""}; -const char *zlibVersion() +const char * ZEXPORT zlibVersion() { return ZLIB_VERSION; } #ifdef DEBUG + +# ifndef verbose +# define verbose 0 +# endif +int z_verbose = verbose; + void z_error (m) char *m; { @@ -42,6 +46,16 @@ void z_error (m) } #endif +/* exported to allow conversion of error code to string for compress() and + * uncompress() + */ +const char * ZEXPORT zError(err) + int err; +{ + return ERR_MSG(err); +} + + #ifndef HAVE_MEMCPY void zmemcpy(dest, source, len) |