imported zlib 1.1.4

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/ZLIB@26947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-04-25 08:03:26 +00:00
parent 7fb4292ab1
commit 1c726f8fd5
34 changed files with 692 additions and 427 deletions

View File

@@ -1,5 +1,5 @@
/* example.c -- usage example of the zlib compression library
* Copyright (C) 1995-1998 Jean-loup Gailly.
* Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -15,6 +15,12 @@
extern void exit OF((int));
#endif
#if defined(VMS) || defined(RISCOS)
# define TESTFILE "foo-gz"
#else
# define TESTFILE "foo.gz"
#endif
#define CHECK_ERR(err, msg) { \
if (err != Z_OK) { \
fprintf(stderr, "%s error: %d\n", msg, err); \
@@ -79,8 +85,8 @@ void test_compress(compr, comprLen, uncompr, uncomprLen)
* Test read/write of .gz files
*/
void test_gzio(out, in, uncompr, uncomprLen)
const char *out; /* output file */
const char *in; /* input file */
const char *out; /* compressed output file */
const char *in; /* compressed input file */
Byte *uncompr;
int uncomprLen;
{
@@ -528,8 +534,8 @@ int main(argc, argv)
}
test_compress(compr, comprLen, uncompr, uncomprLen);
test_gzio((argc > 1 ? argv[1] : "foo.gz"),
(argc > 2 ? argv[2] : "foo.gz"),
test_gzio((argc > 1 ? argv[1] : TESTFILE),
(argc > 2 ? argv[2] : TESTFILE),
uncompr, (int)uncomprLen);
test_deflate(compr, comprLen);