aboutsummaryrefslogtreecommitdiff
path: root/inflate.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:17:02 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:17:02 -0700
commitff11b0a61f7345572ff2e413173d3179486162f2 (patch)
treef3c9e2563c4f0ac6684a0012ad48423d4c6aa798 /inflate.c
parente26a448e9673d67dc2866e11a48d24fc352e5f80 (diff)
downloadzlib-ff11b0a61f7345572ff2e413173d3179486162f2.tar.gz
zlib-ff11b0a61f7345572ff2e413173d3179486162f2.tar.bz2
zlib-ff11b0a61f7345572ff2e413173d3179486162f2.zip
zlib 1.0.4v1.0.4
Diffstat (limited to 'inflate.c')
-rw-r--r--inflate.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/inflate.c b/inflate.c
index 4eed100..74cc69c 100644
--- a/inflate.c
+++ b/inflate.c
@@ -49,7 +49,7 @@ struct internal_state {
49 49
50 50
51int inflateReset(z) 51int inflateReset(z)
52z_stream *z; 52z_streamp z;
53{ 53{
54 uLong c; 54 uLong c;
55 55
@@ -65,7 +65,7 @@ z_stream *z;
65 65
66 66
67int inflateEnd(z) 67int inflateEnd(z)
68z_stream *z; 68z_streamp z;
69{ 69{
70 uLong c; 70 uLong c;
71 71
@@ -81,7 +81,7 @@ z_stream *z;
81 81
82 82
83int inflateInit2_(z, w, version, stream_size) 83int inflateInit2_(z, w, version, stream_size)
84z_stream *z; 84z_streamp z;
85int w; 85int w;
86const char *version; 86const char *version;
87int stream_size; 87int stream_size;
@@ -138,7 +138,7 @@ int stream_size;
138 138
139 139
140int inflateInit_(z, version, stream_size) 140int inflateInit_(z, version, stream_size)
141z_stream *z; 141z_streamp z;
142const char *version; 142const char *version;
143int stream_size; 143int stream_size;
144{ 144{
@@ -150,7 +150,7 @@ int stream_size;
150#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) 150#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)
151 151
152int inflate(z, f) 152int inflate(z, f)
153z_stream *z; 153z_streamp z;
154int f; 154int f;
155{ 155{
156 int r; 156 int r;
@@ -272,7 +272,7 @@ int f;
272 272
273 273
274int inflateSetDictionary(z, dictionary, dictLength) 274int inflateSetDictionary(z, dictionary, dictLength)
275z_stream *z; 275z_streamp z;
276const Bytef *dictionary; 276const Bytef *dictionary;
277uInt dictLength; 277uInt dictLength;
278{ 278{
@@ -280,6 +280,7 @@ uInt dictLength;
280 280
281 if (z == Z_NULL || z->state == Z_NULL || z->state->mode != DICT0) 281 if (z == Z_NULL || z->state == Z_NULL || z->state->mode != DICT0)
282 return Z_STREAM_ERROR; 282 return Z_STREAM_ERROR;
283
283 if (adler32(1L, dictionary, dictLength) != z->adler) return Z_DATA_ERROR; 284 if (adler32(1L, dictionary, dictLength) != z->adler) return Z_DATA_ERROR;
284 z->adler = 1L; 285 z->adler = 1L;
285 286
@@ -295,7 +296,7 @@ uInt dictLength;
295 296
296 297
297int inflateSync(z) 298int inflateSync(z)
298z_stream *z; 299z_streamp z;
299{ 300{
300 uInt n; /* number of bytes to look at */ 301 uInt n; /* number of bytes to look at */
301 Bytef *p; /* pointer to bytes */ 302 Bytef *p; /* pointer to bytes */