diff options
Diffstat (limited to 'inflate.c')
-rw-r--r-- | inflate.c | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -100,7 +100,7 @@ local int updatewindow OF((z_streamp strm, unsigned out)); | |||
100 | local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf, | 100 | local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf, |
101 | unsigned len)); | 101 | unsigned len)); |
102 | 102 | ||
103 | int ZEXPORT inflateReset(strm) | 103 | int ZEXPORT inflateResetKeep(strm) |
104 | z_streamp strm; | 104 | z_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 | ||
127 | int ZEXPORT inflateReset(strm) | ||
128 | z_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 | |||
130 | int ZEXPORT inflateReset2(strm, windowBits) | 140 | int ZEXPORT inflateReset2(strm, windowBits) |
131 | z_streamp strm; | 141 | z_streamp strm; |
132 | int windowBits; | 142 | int windowBits; |