summaryrefslogtreecommitdiff
path: root/source4/lib/zlib/inflate.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-08-07 16:20:11 +0000
committerStefan Metzmacher <metze@samba.org>2008-08-07 19:16:00 +0200
commited3bdf38d721d1f20aef9017b32e14acc0e56192 (patch)
treefd264c62c0c41508051cbf5df76686408ccaee82 /source4/lib/zlib/inflate.c
parent05235802f7ae8fb1df952d28629dea26af5f1436 (diff)
downloadsamba-ed3bdf38d721d1f20aef9017b32e14acc0e56192.tar.gz
samba-ed3bdf38d721d1f20aef9017b32e14acc0e56192.tar.bz2
samba-ed3bdf38d721d1f20aef9017b32e14acc0e56192.zip
zlib: add inflateReset2()...
metze (This used to be commit 2a4fb661d7e3d601a5eb9ccecb4d4f2b07073097)
Diffstat (limited to 'source4/lib/zlib/inflate.c')
-rw-r--r--source4/lib/zlib/inflate.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source4/lib/zlib/inflate.c b/source4/lib/zlib/inflate.c
index 792fdee8e9..0c1ff17951 100644
--- a/source4/lib/zlib/inflate.c
+++ b/source4/lib/zlib/inflate.c
@@ -100,8 +100,9 @@ local int updatewindow OF((z_streamp strm, unsigned out));
local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
unsigned len));
-int ZEXPORT inflateReset(strm)
+int ZEXPORT inflateReset2(strm, flags)
z_streamp strm;
+unsigned flags;
{
struct inflate_state FAR *state;
@@ -115,8 +116,10 @@ z_streamp strm;
state->havedict = 0;
state->dmax = 32768U;
state->head = Z_NULL;
- state->wsize = 0;
- state->whave = 0;
+ if (!(flags & Z_RESET_KEEP_WINDOW)) {
+ state->wsize = 0;
+ state->whave = 0;
+ }
state->write = 0;
state->hold = 0;
state->bits = 0;
@@ -125,6 +128,12 @@ z_streamp strm;
return Z_OK;
}
+int ZEXPORT inflateReset(strm)
+z_streamp strm;
+{
+ return inflateReset2(strm, 0);
+}
+
int ZEXPORT inflatePrime(strm, bits, value)
z_streamp strm;
int bits;