Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Zlib
提交
360c3e95
T
Third Party Zlib
项目概览
OpenHarmony
/
Third Party Zlib
1 年多 前同步成功
通知
16
Star
112
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Zlib
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
360c3e95
编写于
8月 13, 2012
作者:
M
Mark Adler
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update examples/gun.c for proper z_const usage.
上级
62d6112a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
6 addition
and
5 deletion
+6
-5
examples/gun.c
examples/gun.c
+6
-5
未找到文件。
examples/gun.c
浏览文件 @
360c3e95
/* gun.c -- simple gunzip to give an example of the use of inflateBack()
* Copyright (C) 2003, 2005, 2008, 2010 Mark Adler
* Copyright (C) 2003, 2005, 2008, 2010
, 2012
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
Version 1.
6 17 January 2010
Mark Adler */
Version 1.
7 12 August 2012
Mark Adler */
/* Version history:
1.0 16 Feb 2003 First version for testing of inflateBack()
...
...
@@ -18,6 +18,7 @@
1.4 8 Dec 2006 LZW decompression speed improvements
1.5 9 Feb 2008 Avoid warning in latest version of gcc
1.6 17 Jan 2010 Avoid signed/unsigned comparison warnings
1.7 12 Aug 2012 Update for z_const usage in zlib 1.2.8
*/
/*
...
...
@@ -85,7 +86,7 @@ struct ind {
/* Load input buffer, assumed to be empty, and return bytes loaded and a
pointer to them. read() is called until the buffer is full, or until it
returns end-of-file or error. Return 0 on error. */
local
unsigned
in
(
void
*
in_desc
,
unsigned
char
**
buf
)
local
unsigned
in
(
void
*
in_desc
,
z_const
unsigned
char
**
buf
)
{
int
ret
;
unsigned
len
;
...
...
@@ -196,7 +197,7 @@ unsigned char match[65280 + 2]; /* buffer for reversed match or gzip
file, read error, or write error (a write error indicated by strm->next_in
not equal to Z_NULL), or Z_DATA_ERROR for invalid input.
*/
local
int
lunpipe
(
unsigned
have
,
unsigned
char
*
next
,
struct
ind
*
indp
,
local
int
lunpipe
(
unsigned
have
,
z_const
unsigned
char
*
next
,
struct
ind
*
indp
,
int
outfile
,
z_stream
*
strm
)
{
int
last
;
/* last byte read by NEXT(), or -1 if EOF */
...
...
@@ -383,7 +384,7 @@ local int gunpipe(z_stream *strm, int infile, int outfile)
{
int
ret
,
first
,
last
;
unsigned
have
,
flags
,
len
;
unsigned
char
*
next
=
NULL
;
z_const
unsigned
char
*
next
=
NULL
;
struct
ind
ind
,
*
indp
;
struct
outd
outd
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录