aboutsummaryrefslogtreecommitdiff
path: root/gzguts.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-10-12 23:24:31 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-12-11 18:22:04 -0800
commit98f5779f4257682ba9b5fc490557618e3f15f84b (patch)
tree09082da8f556b04ba8aa299cf55eb979a3dfa063 /gzguts.h
parent70e3b1ca56f2ffe8944d3ac0d59b8781127bf94f (diff)
downloadzlib-98f5779f4257682ba9b5fc490557618e3f15f84b.tar.gz
zlib-98f5779f4257682ba9b5fc490557618e3f15f84b.tar.bz2
zlib-98f5779f4257682ba9b5fc490557618e3f15f84b.zip
Fix gzeof() to behave just like feof() when read is not past end of file.
Before, gzeof() would return true (accurately) when the last read request went just up to the end of the uncompressed data. In the analogous case, feof() would return false, only returning true when a read request goes past the end of the file. This patch corrects gzeof() to behave in the same way as feof(), as noted in the zlib.h documentation.
Diffstat (limited to 'gzguts.h')
-rw-r--r--gzguts.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gzguts.h b/gzguts.h
index eefdca0..07c7ac3 100644
--- a/gzguts.h
+++ b/gzguts.h
@@ -155,9 +155,10 @@ typedef struct {
155 unsigned char *out; /* output buffer (double-sized when reading) */ 155 unsigned char *out; /* output buffer (double-sized when reading) */
156 int direct; /* 0 if processing gzip, 1 if transparent */ 156 int direct; /* 0 if processing gzip, 1 if transparent */
157 /* just for reading */ 157 /* just for reading */
158 int eof; /* true if end of input file reached */
159 z_off64_t start; /* where the gzip data started, for rewinding */
160 int how; /* 0: get header, 1: copy, 2: decompress */ 158 int how; /* 0: get header, 1: copy, 2: decompress */
159 z_off64_t start; /* where the gzip data started, for rewinding */
160 int eof; /* true if end of input file reached */
161 int past; /* true if read requested past end */
161 /* just for writing */ 162 /* just for writing */
162 int level; /* compression level */ 163 int level; /* compression level */
163 int strategy; /* compression strategy */ 164 int strategy; /* compression strategy */