diff options
author | Werner Koch <[email protected]> | 1999-01-13 13:12:50 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1999-01-13 13:12:50 +0000 |
commit | e99e43cd531c4ba26bb1b2fbc0e356f95126ae24 (patch) | |
tree | f591efcd4d250d73c4b265e29a1e1fa44b889017 /zlib/zutil.c | |
parent | See ChangeLog: Wed Jan 13 12:49:36 CET 1999 Werner Koch (diff) | |
download | gnupg-e99e43cd531c4ba26bb1b2fbc0e356f95126ae24.tar.gz gnupg-e99e43cd531c4ba26bb1b2fbc0e356f95126ae24.zip |
See ChangeLog: Wed Jan 13 14:10:15 CET 1999 Werner Koch
Diffstat (limited to 'zlib/zutil.c')
-rw-r--r-- | zlib/zutil.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/zlib/zutil.c b/zlib/zutil.c index ee9c447e3..b3de4e883 100644 --- a/zlib/zutil.c +++ b/zlib/zutil.c @@ -1,11 +1,9 @@ /* 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 */ -/* $Id$ */ - -#include <stdio.h> +/* @(#) $Id$ */ #include "zutil.h" @@ -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,11 +46,21 @@ 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) Bytef* dest; - Bytef* source; + const Bytef* source; uInt len; { if (len == 0) return; @@ -56,8 +70,8 @@ void zmemcpy(dest, source, len) } int zmemcmp(s1, s2, len) - Bytef* s1; - Bytef* s2; + const Bytef* s1; + const Bytef* s2; uInt len; { uInt j; @@ -164,7 +178,7 @@ void zcfree (voidpf opaque, voidpf ptr) # define MY_ZCALLOC -#if (!defined(_MSC_VER) || (_MSC_VER < 600)) +#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) # define _halloc halloc # define _hfree hfree #endif |