diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:09:18 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:09:18 -0700 |
commit | 23c69f10698301ae97709eb0bbfb371d66b99a08 (patch) | |
tree | 1956b671b3df8d12c315a38f33b190677ccd659e /example.c | |
parent | 6b834a58bdef976383cff6e2a83f353e668a9cf1 (diff) |
zlib 0.94
Diffstat (limited to 'example.c')
-rw-r--r-- | example.c | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -13,7 +13,7 @@ #endif #ifndef __GO32__ -extern void exit __P((int)); +extern void exit OF((int)); #endif #define BUFLEN 4096 @@ -31,13 +31,18 @@ extern void exit __P((int)); } \ } -char *hello = "hello world"; +char *hello = "hello, hello!"; +/* "hello world" would be more standard, but the repeated "hello" + * stresses the compression code better, sorry... + */ -void test_compress __P((void)); -void test_gzio __P((char *out, char *in)); -void test_deflate __P((Byte compr[])); -void test_inflate __P((Byte compr[])); -void main __P((int argc, char *argv[])); +void test_compress OF((void)); +void test_gzio OF((char *out, char *in)); +void test_deflate OF((Byte compr[])); +void test_inflate OF((Byte compr[])); +void test_flush OF((Byte compr[])); +void test_sync OF((Byte compr[])); +int main OF((int argc, char *argv[])); /* =========================================================================== * Test compress() and uncompress() @@ -262,7 +267,7 @@ void test_sync(compr) * Usage: example [output.gz [input.gz]] */ -void main(argc, argv) +int main(argc, argv) int argc; char *argv[]; { @@ -272,7 +277,7 @@ void main(argc, argv) fprintf(stderr, "incompatible zlib version\n"); exit(1); - } else if (strcmp(zlib_version, ZLIB_VERSION) != 0) { + } else if (zstrcmp(zlib_version, ZLIB_VERSION) != 0) { fprintf(stderr, "warning: different zlib version\n"); } test_compress(); @@ -287,4 +292,5 @@ void main(argc, argv) test_sync(compr); exit(0); + return 0; /* to avoid warning */ } |