diff options
Diffstat (limited to 'minigzip.c')
-rw-r--r-- | minigzip.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -13,13 +13,15 @@ | |||
13 | * or in pipe mode. | 13 | * or in pipe mode. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | /* $Id: minigzip.c,v 1.1 1995/04/14 13:35:59 jloup Exp $ */ | 16 | /* $Id: minigzip.c,v 1.2 1995/04/14 20:03:12 jloup Exp $ */ |
17 | 17 | ||
18 | #include <stdio.h> | 18 | #include <stdio.h> |
19 | #include "zlib.h" | 19 | #include "zlib.h" |
20 | 20 | ||
21 | extern void exit __P((int)); | ||
22 | |||
21 | #ifdef MSDOS | 23 | #ifdef MSDOS |
22 | # include <fcntl.h> | 24 | # include <fcntl.h> /* ??? find where setmode declared */ |
23 | # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) | 25 | # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) |
24 | #else | 26 | #else |
25 | # define SET_BINARY_MODE(file) | 27 | # define SET_BINARY_MODE(file) |
@@ -87,7 +89,7 @@ void gz_uncompress(in, out) | |||
87 | if (len < 0) error (gzerror(in, &err)); | 89 | if (len < 0) error (gzerror(in, &err)); |
88 | if (len == 0) break; | 90 | if (len == 0) break; |
89 | 91 | ||
90 | if (fwrite(buf, 1, len, out) != len) error("failed fwrite"); | 92 | if (fwrite(buf, 1, len, out) != (uInt)len) error("failed fwrite"); |
91 | } | 93 | } |
92 | if (fclose(out)) error("failed fclose"); | 94 | if (fclose(out)) error("failed fclose"); |
93 | 95 | ||