aboutsummaryrefslogtreecommitdiff
path: root/minigzip.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 22:52:17 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 22:52:17 -0700
commit913afb9174bb474104049906c1382dec81826424 (patch)
tree46bb8ca746088f81382b4f33970b9d43c33d9ba3 /minigzip.c
parentbcf78a20978d76f64b7cd46d1a4d7a79a578c77b (diff)
downloadzlib-e097bd52e9ac16fa6dc6e51c0746ba3e240af71f.tar.gz
zlib-e097bd52e9ac16fa6dc6e51c0746ba3e240af71f.tar.bz2
zlib-e097bd52e9ac16fa6dc6e51c0746ba3e240af71f.zip
zlib 0.79v0.79
Diffstat (limited to 'minigzip.c')
-rw-r--r--minigzip.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/minigzip.c b/minigzip.c
index 688b3a1..4936d64 100644
--- a/minigzip.c
+++ b/minigzip.c
@@ -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
21extern 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