Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
6895cca8
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6895cca8
编写于
10月 04, 2003
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unused code, don't use zlib functions that are really macros
and provide missing prototypes.
上级
f82ab534
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
19 addition
and
6 deletion
+19
-6
crypto/comp/c_zlib.c
crypto/comp/c_zlib.c
+19
-6
未找到文件。
crypto/comp/c_zlib.c
浏览文件 @
6895cca8
...
...
@@ -30,6 +30,7 @@ static int zlib_stateful_compress_block(COMP_CTX *ctx, unsigned char *out,
static
int
zlib_stateful_expand_block
(
COMP_CTX
*
ctx
,
unsigned
char
*
out
,
unsigned
int
olen
,
unsigned
char
*
in
,
unsigned
int
ilen
);
#if 0
static int zlib_compress_block(COMP_CTX *ctx, unsigned char *out,
unsigned int olen, unsigned char *in, unsigned int ilen);
static int zlib_expand_block(COMP_CTX *ctx, unsigned char *out,
...
...
@@ -48,6 +49,7 @@ static COMP_METHOD zlib_stateless_method={
NULL,
NULL,
};
#endif
static
COMP_METHOD
zlib_stateful_method
=
{
NID_zlib_compression
,
...
...
@@ -79,12 +81,18 @@ static COMP_METHOD zlib_stateful_method={
#include <openssl/dso.h>
/* Prototypes for built in stubs */
#if 0
static int stub_compress(Bytef *dest,uLongf *destLen,
const Bytef *source, uLong sourceLen);
#endif
static
int
stub_inflateEnd
(
z_streamp
strm
);
static
int
stub_inflate
(
z_streamp
strm
,
int
flush
);
static
int
stub_inflateInit_
(
z_streamp
strm
,
const
char
*
version
,
int
stream_size
);
static
int
stub_deflateEnd
(
z_streamp
strm
);
static
int
stub_deflate
(
z_streamp
strm
,
int
flush
);
static
int
stub_deflateInit_
(
z_streamp
strm
,
int
level
,
const
char
*
version
,
int
stream_size
);
/* Function pointers */
typedef
int
(
Z_CALLCONV
*
compress_ft
)(
Bytef
*
dest
,
uLongf
*
destLen
,
...
...
@@ -111,11 +119,9 @@ static DSO *zlib_dso = NULL;
#define compress stub_compress
#define inflateEnd stub_inflateEnd
#define inflate stub_inflate
#define inflateInit stub_inflateInit
#define inflateInit_ stub_inflateInit_
#define deflateEnd stub_deflateEnd
#define deflate stub_deflate
#define deflateInit stub_deflateInit
#define deflateInit_ stub_deflateInit_
#endif
/* ZLIB_SHARED */
...
...
@@ -152,7 +158,8 @@ static int zlib_stateful_init(COMP_CTX *ctx)
state
->
istream
.
next_out
=
Z_NULL
;
state
->
istream
.
avail_in
=
0
;
state
->
istream
.
avail_out
=
0
;
err
=
inflateInit
(
&
state
->
istream
);
err
=
inflateInit_
(
&
state
->
istream
,
ZLIB_VERSION
,
sizeof
(
z_stream
));
if
(
err
!=
Z_OK
)
goto
err
;
...
...
@@ -163,7 +170,8 @@ static int zlib_stateful_init(COMP_CTX *ctx)
state
->
ostream
.
next_out
=
Z_NULL
;
state
->
ostream
.
avail_in
=
0
;
state
->
ostream
.
avail_out
=
0
;
err
=
deflateInit
(
&
state
->
ostream
,
Z_DEFAULT_COMPRESSION
);
err
=
deflateInit_
(
&
state
->
ostream
,
Z_DEFAULT_COMPRESSION
,
ZLIB_VERSION
,
sizeof
(
z_stream
));
if
(
err
!=
Z_OK
)
goto
err
;
...
...
@@ -243,6 +251,7 @@ static int zlib_stateful_expand_block(COMP_CTX *ctx, unsigned char *out,
return
olen
-
state
->
istream
.
avail_out
;
}
#if 0
static int zlib_compress_block(COMP_CTX *ctx, unsigned char *out,
unsigned int olen, unsigned char *in, unsigned int ilen)
{
...
...
@@ -319,7 +328,8 @@ static int zz_uncompress (Bytef *dest, uLongf *destLen, const Bytef *source,
stream.zalloc = (alloc_func)0;
stream.zfree = (free_func)0;
err
=
inflateInit
(
&
stream
);
err = inflateInit_(&stream,
ZLIB_VERSION, sizeof(z_stream));
if (err != Z_OK) return err;
err = inflate(&stream, Z_FINISH);
...
...
@@ -332,6 +342,7 @@ static int zz_uncompress (Bytef *dest, uLongf *destLen, const Bytef *source,
err = inflateEnd(&stream);
return err;
}
#endif
#endif
...
...
@@ -383,6 +394,7 @@ COMP_METHOD *COMP_zlib(void)
}
#ifdef ZLIB_SHARED
#if 0
/* Stubs for each function to be dynamicly loaded */
static int
stub_compress(Bytef *dest,uLongf *destLen,const Bytef *source, uLong sourceLen)
...
...
@@ -392,6 +404,7 @@ stub_compress(Bytef *dest,uLongf *destLen,const Bytef *source, uLong sourceLen)
else
return(Z_MEM_ERROR);
}
#endif
static
int
stub_inflateEnd
(
z_streamp
strm
)
...
...
@@ -443,7 +456,7 @@ stub_deflateInit_(z_streamp strm, int level,
const
char
*
version
,
int
stream_size
)
{
if
(
p_deflateInit_
)
return
(
p_deflateInit_
(
strm
,
version
,
stream_size
));
return
(
p_deflateInit_
(
strm
,
level
,
version
,
stream_size
));
else
return
(
Z_MEM_ERROR
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录