Lines Matching refs:state

21     struct inflate_state FAR *state;
34 state = (struct inflate_state FAR *)ZALLOC(strm, 1,
36 if (state == Z_NULL) return Z_MEM_ERROR;
38 strm->state = (voidpf)state;
39 state->window = window;
54 struct inflate_state state;
59 while (sym < 144) state.lens[sym++] = 8;
60 while (sym < 256) state.lens[sym++] = 9;
61 while (sym < 280) state.lens[sym++] = 7;
62 while (sym < 288) state.lens[sym++] = 8;
66 inflate_table9(LENS, state.lens, 288, &(next), &(bits), state.work);
70 while (sym < 32) state.lens[sym++] = 5;
73 inflate_table9(DISTS, state.lens, 32, &(next), &(bits), state.work);
209 error, or Z_MEM_ERROR if it could not allocate memory for the state.
211 are not correct, i.e. strm is Z_NULL or the state was not initialized.
215 struct inflate_state FAR *state;
243 /* Check that the strm exists and that the state was initialized */
244 if (strm == Z_NULL || strm->state == Z_NULL)
246 state = (struct inflate_state FAR *)strm->state;
248 /* Reset the state */
253 window = state->window;
338 state->nlen = BITS(5) + 257;
340 state->ndist = BITS(5) + 1;
342 state->ncode = BITS(4) + 4;
344 if (state->nlen > 286) {
352 state->have = 0;
353 while (state->have < state->ncode) {
355 state->lens[order[state->have++]] = (unsigned short)BITS(3);
358 while (state->have < 19)
359 state->lens[order[state->have++]] = 0;
360 state->next = state->codes;
361 lencode = (code const FAR *)(state->next);
363 ret = inflate_table9(CODES, state->lens, 19, &(state->next),
364 &(lenbits), state->work);
373 state->have = 0;
374 while (state->have < state->nlen + state->ndist) {
383 state->lens[state->have++] = here.val;
389 if (state->have == 0) {
394 len = (unsigned)(state->lens[state->have - 1]);
412 if (state->have + copy > state->nlen + state->ndist) {
418 state->lens[state->have++] = (unsigned short)len;
426 if (state->lens[256] == 0) {
435 state->next = state->codes;
436 lencode = (code const FAR *)(state->next);
438 ret = inflate_table9(LENS, state->lens, state->nlen,
439 &(state->next), &(lenbits), state->work);
445 distcode = (code const FAR *)(state->next);
447 ret = inflate_table9(DISTS, state->lens + state->nlen,
448 state->ndist, &(state->next), &(distbits),
449 state->work);
598 if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
600 ZFREE(strm, strm->state);
601 strm->state = Z_NULL;