aboutsummaryrefslogtreecommitdiff
path: root/inflate.c
diff options
context:
space:
mode:
Diffstat (limited to 'inflate.c')
-rw-r--r--inflate.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/inflate.c b/inflate.c
index cf10b01..e14b361 100644
--- a/inflate.c
+++ b/inflate.c
@@ -100,7 +100,7 @@ local int updatewindow OF((z_streamp strm, unsigned out));
100local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf, 100local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
101 unsigned len)); 101 unsigned len));
102 102
103int ZEXPORT inflateReset(strm) 103int ZEXPORT inflateResetKeep(strm)
104z_streamp strm; 104z_streamp strm;
105{ 105{
106 struct inflate_state FAR *state; 106 struct inflate_state FAR *state;
@@ -115,9 +115,6 @@ z_streamp strm;
115 state->havedict = 0; 115 state->havedict = 0;
116 state->dmax = 32768U; 116 state->dmax = 32768U;
117 state->head = Z_NULL; 117 state->head = Z_NULL;
118 state->wsize = 0;
119 state->whave = 0;
120 state->wnext = 0;
121 state->hold = 0; 118 state->hold = 0;
122 state->bits = 0; 119 state->bits = 0;
123 state->lencode = state->distcode = state->next = state->codes; 120 state->lencode = state->distcode = state->next = state->codes;
@@ -127,6 +124,19 @@ z_streamp strm;
127 return Z_OK; 124 return Z_OK;
128} 125}
129 126
127int ZEXPORT inflateReset(strm)
128z_streamp strm;
129{
130 struct inflate_state FAR *state;
131
132 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
133 state = (struct inflate_state FAR *)strm->state;
134 state->wsize = 0;
135 state->whave = 0;
136 state->wnext = 0;
137 return inflateResetKeep(strm);
138}
139
130int ZEXPORT inflateReset2(strm, windowBits) 140int ZEXPORT inflateReset2(strm, windowBits)
131z_streamp strm; 141z_streamp strm;
132int windowBits; 142int windowBits;