summaryrefslogtreecommitdiffstats
path: root/lib/libz/zutil.c
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1998-02-28 06:04:26 +0000
committersteve <steve@FreeBSD.org>1998-02-28 06:04:26 +0000
commit9f86c0bf8cf1224d46bbefe1d308f2cc8186a79b (patch)
treef03de58d136ec48f008735e374079754bdfee40f /lib/libz/zutil.c
parent5372e3085661ee9071da924c16a5cfdc12f7590d (diff)
downloadFreeBSD-src-9f86c0bf8cf1224d46bbefe1d308f2cc8186a79b.zip
FreeBSD-src-9f86c0bf8cf1224d46bbefe1d308f2cc8186a79b.tar.gz
Initial import of zlib-1.1.1
PR: 5869 Reviewed by: jdp
Diffstat (limited to 'lib/libz/zutil.c')
-rw-r--r--lib/libz/zutil.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/lib/libz/zutil.c b/lib/libz/zutil.c
index 734e275..5a3fe6e 100644
--- a/lib/libz/zutil.c
+++ b/lib/libz/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: zutil.c,v 1.17 1996/07/24 13:41:12 me Exp $ */
-
-#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,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)
OpenPOWER on IntegriCloud