Changeset View
Changeset View
Standalone View
Standalone View
head/sys/contrib/zlib/deflate.c
Show First 20 Lines • Show All 260 Lines • ▼ Show 20 Lines | int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, | ||||
if (version == Z_NULL || version[0] != my_version[0] || | if (version == Z_NULL || version[0] != my_version[0] || | ||||
stream_size != sizeof(z_stream)) { | stream_size != sizeof(z_stream)) { | ||||
return Z_VERSION_ERROR; | return Z_VERSION_ERROR; | ||||
} | } | ||||
if (strm == Z_NULL) return Z_STREAM_ERROR; | if (strm == Z_NULL) return Z_STREAM_ERROR; | ||||
strm->msg = Z_NULL; | strm->msg = Z_NULL; | ||||
if (strm->zalloc == (alloc_func)0) { | if (strm->zalloc == (alloc_func)0) { | ||||
#ifdef Z_SOLO | #if defined(Z_SOLO) && !defined(_KERNEL) | ||||
return Z_STREAM_ERROR; | return Z_STREAM_ERROR; | ||||
#else | #else | ||||
strm->zalloc = zcalloc; | strm->zalloc = zcalloc; | ||||
strm->opaque = (voidpf)0; | strm->opaque = (voidpf)0; | ||||
#endif | #endif | ||||
} | } | ||||
if (strm->zfree == (free_func)0) | if (strm->zfree == (free_func)0) | ||||
#ifdef Z_SOLO | #if defined(Z_SOLO) && !defined(_KERNEL) | ||||
return Z_STREAM_ERROR; | return Z_STREAM_ERROR; | ||||
#else | #else | ||||
strm->zfree = zcfree; | strm->zfree = zcfree; | ||||
#endif | #endif | ||||
#ifdef FASTEST | #ifdef FASTEST | ||||
if (level != 0) level = 1; | if (level != 0) level = 1; | ||||
#else | #else | ||||
▲ Show 20 Lines • Show All 1,881 Lines • Show Last 20 Lines |