infback.c (muscle7.61) | : | infback.c (muscle7.62) | ||
---|---|---|---|---|
/* infback.c -- inflate using a call-back interface | /* infback.c -- inflate using a call-back interface | |||
* Copyright (C) 1995-2011 Mark Adler | * Copyright (C) 1995-2016 Mark Adler | |||
* For conditions of distribution and use, see copyright notice in zlib.h | * For conditions of distribution and use, see copyright notice in zlib.h | |||
*/ | */ | |||
/* | /* | |||
This code is largely copied from inflate.c. Normally either infback.o or | This code is largely copied from inflate.c. Normally either infback.o or | |||
inflate.o would be linked into an application--not both. The interface | inflate.o would be linked into an application--not both. The interface | |||
with inffast.c is retained so that optimized assembler-coded versions of | with inffast.c is retained so that optimized assembler-coded versions of | |||
inflate_fast() can be used with either inflate.c or infback.c. | inflate_fast() can be used with either inflate.c or infback.c. | |||
*/ | */ | |||
skipping to change at line 64 | skipping to change at line 64 | |||
return Z_STREAM_ERROR; | return Z_STREAM_ERROR; | |||
#else | #else | |||
strm->zfree = zcfree; | strm->zfree = zcfree; | |||
#endif | #endif | |||
state = (struct inflate_state FAR *)ZALLOC(strm, 1, | state = (struct inflate_state FAR *)ZALLOC(strm, 1, | |||
sizeof(struct inflate_state)); | sizeof(struct inflate_state)); | |||
if (state == Z_NULL) return Z_MEM_ERROR; | if (state == Z_NULL) return Z_MEM_ERROR; | |||
Tracev((stderr, "inflate: allocated\n")); | Tracev((stderr, "inflate: allocated\n")); | |||
strm->state = (struct internal_state FAR *)state; | strm->state = (struct internal_state FAR *)state; | |||
state->dmax = 32768U; | state->dmax = 32768U; | |||
state->wbits = windowBits; | state->wbits = (uInt)windowBits; | |||
state->wsize = 1U << windowBits; | state->wsize = 1U << windowBits; | |||
state->window = window; | state->window = window; | |||
state->wnext = 0; | state->wnext = 0; | |||
state->whave = 0; | state->whave = 0; | |||
return Z_OK; | return Z_OK; | |||
} | } | |||
/* | /* | |||
Return state with length and distance decoding tables and index sizes set to | Return state with length and distance decoding tables and index sizes set to | |||
fixed code decoding. Normally this returns fixed tables from inffixed.h. | fixed code decoding. Normally this returns fixed tables from inffixed.h. | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |