summaryrefslogtreecommitdiff
path: root/example.c
diff options
context:
space:
mode:
Diffstat (limited to 'example.c')
-rw-r--r--example.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/example.c b/example.c
index 073ce76..8307c84 100644
--- a/example.c
+++ b/example.c
@@ -15,6 +15,12 @@
15 extern void exit OF((int)); 15 extern void exit OF((int));
16#endif 16#endif
17 17
18#if defined(VMS) || defined(RISCOS)
19# define TESTFILE "foo-gz"
20#else
21# define TESTFILE "foo.gz"
22#endif
23
18#define CHECK_ERR(err, msg) { \ 24#define CHECK_ERR(err, msg) { \
19 if (err != Z_OK) { \ 25 if (err != Z_OK) { \
20 fprintf(stderr, "%s error: %d\n", msg, err); \ 26 fprintf(stderr, "%s error: %d\n", msg, err); \
@@ -79,8 +85,8 @@ void test_compress(compr, comprLen, uncompr, uncomprLen)
79 * Test read/write of .gz files 85 * Test read/write of .gz files
80 */ 86 */
81void test_gzio(out, in, uncompr, uncomprLen) 87void test_gzio(out, in, uncompr, uncomprLen)
82 const char *out; /* output file */ 88 const char *out; /* compressed output file */
83 const char *in; /* input file */ 89 const char *in; /* compressed input file */
84 Byte *uncompr; 90 Byte *uncompr;
85 int uncomprLen; 91 int uncomprLen;
86{ 92{
@@ -528,8 +534,8 @@ int main(argc, argv)
528 } 534 }
529 test_compress(compr, comprLen, uncompr, uncomprLen); 535 test_compress(compr, comprLen, uncompr, uncomprLen);
530 536
531 test_gzio((argc > 1 ? argv[1] : "foo.gz"), 537 test_gzio((argc > 1 ? argv[1] : TESTFILE),
532 (argc > 2 ? argv[2] : "foo.gz"), 538 (argc > 2 ? argv[2] : TESTFILE),
533 uncompr, (int)uncomprLen); 539 uncompr, (int)uncomprLen);
534 540
535 test_deflate(compr, comprLen); 541 test_deflate(compr, comprLen);