summaryrefslogtreecommitdiff
path: root/example.c
diff options
context:
space:
mode:
Diffstat (limited to 'example.c')
-rw-r--r--example.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/example.c b/example.c
index a2213e0..d362c7a 100644
--- a/example.c
+++ b/example.c
@@ -13,7 +13,7 @@
13#endif 13#endif
14 14
15#ifndef __GO32__ 15#ifndef __GO32__
16extern void exit __P((int)); 16extern void exit OF((int));
17#endif 17#endif
18 18
19#define BUFLEN 4096 19#define BUFLEN 4096
@@ -31,13 +31,18 @@ extern void exit __P((int));
31 } \ 31 } \
32} 32}
33 33
34char *hello = "hello world"; 34char *hello = "hello, hello!";
35/* "hello world" would be more standard, but the repeated "hello"
36 * stresses the compression code better, sorry...
37 */
35 38
36void test_compress __P((void)); 39void test_compress OF((void));
37void test_gzio __P((char *out, char *in)); 40void test_gzio OF((char *out, char *in));
38void test_deflate __P((Byte compr[])); 41void test_deflate OF((Byte compr[]));
39void test_inflate __P((Byte compr[])); 42void test_inflate OF((Byte compr[]));
40void main __P((int argc, char *argv[])); 43void test_flush OF((Byte compr[]));
44void test_sync OF((Byte compr[]));
45int main OF((int argc, char *argv[]));
41 46
42/* =========================================================================== 47/* ===========================================================================
43 * Test compress() and uncompress() 48 * Test compress() and uncompress()
@@ -262,7 +267,7 @@ void test_sync(compr)
262 * Usage: example [output.gz [input.gz]] 267 * Usage: example [output.gz [input.gz]]
263 */ 268 */
264 269
265void main(argc, argv) 270int main(argc, argv)
266 int argc; 271 int argc;
267 char *argv[]; 272 char *argv[];
268{ 273{
@@ -272,7 +277,7 @@ void main(argc, argv)
272 fprintf(stderr, "incompatible zlib version\n"); 277 fprintf(stderr, "incompatible zlib version\n");
273 exit(1); 278 exit(1);
274 279
275 } else if (strcmp(zlib_version, ZLIB_VERSION) != 0) { 280 } else if (zstrcmp(zlib_version, ZLIB_VERSION) != 0) {
276 fprintf(stderr, "warning: different zlib version\n"); 281 fprintf(stderr, "warning: different zlib version\n");
277 } 282 }
278 test_compress(); 283 test_compress();
@@ -287,4 +292,5 @@ void main(argc, argv)
287 test_sync(compr); 292 test_sync(compr);
288 293
289 exit(0); 294 exit(0);
295 return 0; /* to avoid warning */
290} 296}