summaryrefslogtreecommitdiff
path: root/lib/libz
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libz')
-rw-r--r--lib/libz/gzio.c13
-rw-r--r--lib/libz/zlib.h5
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/libz/gzio.c b/lib/libz/gzio.c
index 7af63495ce5..8a2b770252d 100644
--- a/lib/libz/gzio.c
+++ b/lib/libz/gzio.c
@@ -3,7 +3,7 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* $Id: gzio.c,v 1.1 1996/07/27 02:39:45 tholo Exp $ */
+/* $Id: gzio.c,v 1.2 1996/10/27 00:29:33 millert Exp $ */
#include <stdio.h>
@@ -521,3 +521,14 @@ char* gzerror (file, errnum)
strcat(s->msg, m);
return s->msg;
}
+
+/* ===========================================================================
+ Returns true (1) if file is zipped, else returns false (0).
+*/
+int gz_iszipped (file)
+ gzFile file;
+{
+ gz_stream *s = (gz_stream*)file;
+
+ return(!(s->transparent));
+}
diff --git a/lib/libz/zlib.h b/lib/libz/zlib.h
index 6a9e5d57475..32109747f82 100644
--- a/lib/libz/zlib.h
+++ b/lib/libz/zlib.h
@@ -701,6 +701,11 @@ extern char EXPORT *gzerror OF((gzFile file, int *errnum));
to get the exact error code.
*/
+/* ===========================================================================
+ Returns true (1) if file is zipped, else returns false (0).
+*/
+extern int gz_iszipped OF((gzFile file));
+
/* checksum functions */
/*