📄 zutil.cpp
字号:
/* zutil.c -- target dependent utility functions for the compression library
* Copyright (C) 1995-1998 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#include "stdafx.h"
#include "zutil.h"
struct internal_state {int dummy;}; /* for buggy compilers */
const char *z_errmsg[10] = {
"need dictionary", /* Z_NEED_DICT 2 */
"stream end", /* Z_STREAM_END 1 */
"", /* Z_OK 0 */
"file error", /* Z_ERRNO (-1) */
"stream error", /* Z_STREAM_ERROR (-2) */
"data error", /* Z_DATA_ERROR (-3) */
"insufficient memory", /* Z_MEM_ERROR (-4) */
"buffer error", /* Z_BUF_ERROR (-5) */
"incompatible version",/* Z_VERSION_ERROR (-6) */
""};
/* exported to allow conversion of error code to string for compress() and
* unzipcompress()
*/
const char * zError(int err)
{
return ERR_MSG(err);
}
void *zcalloc (void *opaque, unsigned items, unsigned size)
{
if (opaque) items += size - size; /* make compiler happy */
return (void *)calloc(items, size);
}
void zcfree (void *opaque, void *ptr)
{
free(ptr);
if (opaque) return; /* make compiler happy */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -