diff options
Diffstat (limited to 'zutil.c')
-rw-r--r-- | zutil.c | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -1,9 +1,9 @@ | |||
1 | /* zutil.c -- target dependent utility functions for the compression library | 1 | /* zutil.c -- target dependent utility functions for the compression library |
2 | * Copyright (C) 1995-1996 Jean-loup Gailly. | 2 | * Copyright (C) 1995-1998 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /* $Id: zutil.c,v 1.17 1996/07/24 13:41:12 me Exp $ */ | 6 | /* @(#) $Id$ */ |
7 | 7 | ||
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | 9 | ||
@@ -28,12 +28,18 @@ const char *z_errmsg[10] = { | |||
28 | ""}; | 28 | ""}; |
29 | 29 | ||
30 | 30 | ||
31 | const char *zlibVersion() | 31 | const char * EXPORT zlibVersion() |
32 | { | 32 | { |
33 | return ZLIB_VERSION; | 33 | return ZLIB_VERSION; |
34 | } | 34 | } |
35 | 35 | ||
36 | #ifdef DEBUG | 36 | #ifdef DEBUG |
37 | |||
38 | # ifndef verbose | ||
39 | # define verbose 0 | ||
40 | # endif | ||
41 | int z_verbose = verbose; | ||
42 | |||
37 | void z_error (m) | 43 | void z_error (m) |
38 | char *m; | 44 | char *m; |
39 | { | 45 | { |
@@ -42,6 +48,16 @@ void z_error (m) | |||
42 | } | 48 | } |
43 | #endif | 49 | #endif |
44 | 50 | ||
51 | /* exported to allow conversion of error code to string for compress() and | ||
52 | * uncompress() | ||
53 | */ | ||
54 | const char * EXPORT zError(err) | ||
55 | int err; | ||
56 | { | ||
57 | return ERR_MSG(err); | ||
58 | } | ||
59 | |||
60 | |||
45 | #ifndef HAVE_MEMCPY | 61 | #ifndef HAVE_MEMCPY |
46 | 62 | ||
47 | void zmemcpy(dest, source, len) | 63 | void zmemcpy(dest, source, len) |