summaryrefslogtreecommitdiff
path: root/example.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:20:29 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:20:29 -0700
commit14763ac7c6c03bca62c39e35c03cf5bfc7728802 (patch)
treef1055d11ef7b282b698ce7c40e1a9c061413cbdf /example.c
parentc34c1fcbb19852ca35216ad66276f4f86af3fc22 (diff)
zlib 1.1.3
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 @@
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);