Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Zlib
提交
73014202
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看板
提交
73014202
编写于
9月 09, 2011
作者:
M
Mark Adler
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zlib 1.2.4.5
上级
a7d70663
变更
31
显示空白变更内容
内联
并排
Showing
31 changed file
with
119 addition
and
106 deletion
+119
-106
ChangeLog
ChangeLog
+10
-2
Makefile.in
Makefile.in
+3
-3
README
README
+2
-2
configure
configure
+18
-11
contrib/delphi/ZLib.pas
contrib/delphi/ZLib.pas
+1
-1
contrib/dotzlib/DotZLib/UnitTests.cs
contrib/dotzlib/DotZLib/UnitTests.cs
+1
-1
contrib/infback9/inftree9.c
contrib/infback9/inftree9.c
+2
-2
contrib/pascal/zlibpas.pas
contrib/pascal/zlibpas.pas
+1
-1
contrib/vstudio/vc10/zlib.rc
contrib/vstudio/vc10/zlib.rc
+3
-3
contrib/vstudio/vc9/zlib.rc
contrib/vstudio/vc9/zlib.rc
+3
-3
deflate.c
deflate.c
+1
-1
deflate.h
deflate.h
+11
-11
gzguts.h
gzguts.h
+8
-4
gzlib.c
gzlib.c
+3
-3
inffast.c
inffast.c
+1
-1
inffast.h
inffast.h
+1
-1
inftrees.c
inftrees.c
+3
-3
inftrees.h
inftrees.h
+1
-1
qnx/package.qpg
qnx/package.qpg
+5
-5
treebuild.xml
treebuild.xml
+2
-2
trees.c
trees.c
+5
-5
trees.h
trees.h
+2
-2
win32/Makefile.gcc
win32/Makefile.gcc
+2
-2
zconf.h
zconf.h
+0
-4
zconf.h.cmakein
zconf.h.cmakein
+0
-4
zconf.h.in
zconf.h.in
+0
-4
zlib.3
zlib.3
+1
-1
zlib.3.pdf
zlib.3.pdf
+0
-0
zlib.h
zlib.h
+4
-4
zutil.c
zutil.c
+11
-11
zutil.h
zutil.h
+14
-8
未找到文件。
ChangeLog
浏览文件 @
73014202
ChangeLog file for zlib
ChangeLog file for zlib
Changes in 1.2.4.5 (18 Apr 2010)
- Set sharedlibdir in configure [Torok]
- Set LDFLAGS in Makefile.in [Bar-Lev]
- Avoid mkdir objs race condition in Makefile.in [Bowler]
- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays
- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C
- Don't use hidden attribute when it is a warning generator (e.g. Solaris)
Changes in 1.2.4.4 (18 Apr 2010)
Changes in 1.2.4.4 (18 Apr 2010)
- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [T
šrš
k]
- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [T
oro
k]
- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty
- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty
- Try to use bash or ksh regardless of functionality of /bin/sh
- Try to use bash or ksh regardless of functionality of /bin/sh
- Fix configure incompatibility with NetBSD sh
- Fix configure incompatibility with NetBSD sh
...
@@ -162,7 +170,7 @@ Changes in 1.2.3.6 (17 Jan 2010)
...
@@ -162,7 +170,7 @@ Changes in 1.2.3.6 (17 Jan 2010)
- Correct email address in configure for system options
- Correct email address in configure for system options
- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]
- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]
- Update zlib.map [Brown]
- Update zlib.map [Brown]
- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [T
šrš
k]
- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [T
oro
k]
- Apply various fixes to CMakeLists.txt [Lowman]
- Apply various fixes to CMakeLists.txt [Lowman]
- Add checks on len in gzread() and gzwrite()
- Add checks on len in gzread() and gzwrite()
- Add error message for no more room for gzungetc()
- Add error message for no more room for gzungetc()
...
...
Makefile.in
浏览文件 @
73014202
...
@@ -25,14 +25,14 @@ CFLAGS=-O
...
@@ -25,14 +25,14 @@ CFLAGS=-O
# -Wstrict-prototypes -Wmissing-prototypes
# -Wstrict-prototypes -Wmissing-prototypes
SFLAGS
=
-O
SFLAGS
=
-O
LDFLAGS
=
TEST_LDFLAGS
=
-L
.
libz.a
TEST_LDFLAGS
=
-L
.
libz.a
LDSHARED
=
$(CC)
LDSHARED
=
$(CC)
CPP
=
$(CC)
-E
CPP
=
$(CC)
-E
STATICLIB
=
libz.a
STATICLIB
=
libz.a
SHAREDLIB
=
libz.so
SHAREDLIB
=
libz.so
SHAREDLIBV
=
libz.so.1.2.4.
4
SHAREDLIBV
=
libz.so.1.2.4.
5
SHAREDLIBM
=
libz.so.1
SHAREDLIBM
=
libz.so.1
LIBS
=
$(STATICLIB)
$(SHAREDLIBV)
LIBS
=
$(STATICLIB)
$(SHAREDLIBV)
...
@@ -132,7 +132,7 @@ minigzip64.o: minigzip.c zlib.h zconf.h
...
@@ -132,7 +132,7 @@ minigzip64.o: minigzip.c zlib.h zconf.h
.SUFFIXES
:
.lo
.SUFFIXES
:
.lo
.c.lo
:
.c.lo
:
-
@
if
[
!
-d
objs
]
;
then
mkdir
objs
;
fi
-
@
mkdir objs 2>/dev/null
||
test
-d
objs
$(CC)
$(SFLAGS)
-DPIC
-c
-o
objs/
$*
.o
$<
$(CC)
$(SFLAGS)
-DPIC
-c
-o
objs/
$*
.o
$<
-
@mv objs/
$*
.o
$@
-
@mv objs/
$*
.o
$@
...
...
README
浏览文件 @
73014202
ZLIB DATA COMPRESSION LIBRARY
ZLIB DATA COMPRESSION LIBRARY
zlib 1.2.4.
4
is a general purpose data compression library. All the code is
zlib 1.2.4.
5
is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
(Request for Comments) 1950 to 1952 in the files
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
...
@@ -31,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
...
@@ -31,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available at
issue of Dr. Dobb's Journal; a copy of the article is available at
http://marknelson.us/1997/01/01/zlib-engine/ .
http://marknelson.us/1997/01/01/zlib-engine/ .
The changes made in version 1.2.4.
4
are documented in the file ChangeLog.
The changes made in version 1.2.4.
5
are documented in the file ChangeLog.
Unsupported third party contributions are provided in directory contrib/ .
Unsupported third party contributions are provided in directory contrib/ .
...
...
configure
浏览文件 @
73014202
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# an error.
# an error.
if
[
-n
"
${
CHOST
}
"
]
;
then
if
[
-n
"
${
CHOST
}
"
]
;
then
uname
=
"
$(
echo
"
${
CHOST
}
"
|
sed
-e
's/
.*-.*-\(.*\)-.*$/\1/'
-e
's/.*-\(.*\)-.*/\1/'
-e
's/.*-\(.*\)
$/\1/'
)
"
uname
=
"
$(
echo
"
${
CHOST
}
"
|
sed
-e
's/
^[^-]*-\([^-]*\)$/\1/'
-e
's/^[^-]*-[^-]*-\([^-]*\)$/\1/'
-e
's/^[^-]*-[^-]*-\([^-]*\)-.*
$/\1/'
)
"
CROSS_PREFIX
=
"
${
CHOST
}
-"
CROSS_PREFIX
=
"
${
CHOST
}
-"
fi
fi
...
@@ -49,6 +49,7 @@ LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
...
@@ -49,6 +49,7 @@ LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
prefix
=
${
prefix
-/usr/local
}
prefix
=
${
prefix
-/usr/local
}
exec_prefix
=
${
exec_prefix
-
'${prefix}'
}
exec_prefix
=
${
exec_prefix
-
'${prefix}'
}
libdir
=
${
libdir
-
'${exec_prefix}/lib'
}
libdir
=
${
libdir
-
'${exec_prefix}/lib'
}
sharedlibdir
=
${
sharedlibdir
-
'${exec_prefix}/lib'
}
includedir
=
${
includedir
-
'${prefix}/include'
}
includedir
=
${
includedir
-
'${prefix}/include'
}
mandir
=
${
mandir
-
'${prefix}/share/man'
}
mandir
=
${
mandir
-
'${prefix}/share/man'
}
shared_ext
=
'.so'
shared_ext
=
'.so'
...
@@ -147,6 +148,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
...
@@ -147,6 +148,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
else
else
# find system name and corresponding cc options
# find system name and corresponding cc options
CC
=
${
CC
-cc
}
CC
=
${
CC
-cc
}
gcc
=
0
if
test
-z
"
$uname
"
;
then
if
test
-z
"
$uname
"
;
then
uname
=
`
(
uname
-sr
||
echo
unknown
)
2>/dev/null
`
uname
=
`
(
uname
-sr
||
echo
unknown
)
2>/dev/null
`
fi
fi
...
@@ -504,21 +506,26 @@ EOF
...
@@ -504,21 +506,26 @@ EOF
fi
fi
fi
fi
cat
>
$test
.c
<<
EOF
if
test
"
$gcc
"
-eq
1
;
then
int foo __attribute__ ((visibility ("hidden")));
cat
>
$test
.c
<<
EOF
#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33)
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
#endif
int ZLIB_INTERNAL foo;
int main()
int main()
{
{
return 0;
return 0;
}
}
EOF
EOF
if
test
"
`
(
$CC
-c
-fvisibility
=
hidden
$CFLAGS
$test
.c
)
2>&1
`
"
=
""
;
then
if
test
"
`
(
$CC
-c
$CFLAGS
$test
.c
)
2>&1
`
"
=
""
;
then
CFLAGS
=
"
$CFLAGS
-fvisibility=hidden"
SFLAGS
=
"
$SFLAGS
-fvisibility=hidden"
echo
"Checking for attribute(visibility) support... Yes."
echo
"Checking for attribute(visibility) support... Yes."
else
else
CFLAGS
=
"
$CFLAGS
-DNO_VIZ"
CFLAGS
=
"
$CFLAGS
-DNO_VIZ"
SFLAGS
=
"
$SFLAGS
-DNO_VIZ"
SFLAGS
=
"
$SFLAGS
-DNO_VIZ"
echo
"Checking for attribute(visibility) support... No."
echo
"Checking for attribute(visibility) support... No."
fi
fi
fi
CPP
=
${
CPP
-
"
$CC
-E"
}
CPP
=
${
CPP
-
"
$CC
-E"
}
...
...
contrib/delphi/ZLib.pas
浏览文件 @
73014202
...
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
...
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
const
OutBuf
:
Pointer
;
BufSize
:
Integer
);
const
OutBuf
:
Pointer
;
BufSize
:
Integer
);
const
const
zlib_version
=
'1.2.4.
4
'
;
zlib_version
=
'1.2.4.
5
'
;
type
type
EZlibError
=
class
(
Exception
);
EZlibError
=
class
(
Exception
);
...
...
contrib/dotzlib/DotZLib/UnitTests.cs
浏览文件 @
73014202
...
@@ -156,7 +156,7 @@ namespace DotZLibTests
...
@@ -156,7 +156,7 @@ namespace DotZLibTests
public
void
Info_Version
()
public
void
Info_Version
()
{
{
Info
info
=
new
Info
();
Info
info
=
new
Info
();
Assert
.
AreEqual
(
"1.2.4.
4
"
,
Info
.
Version
);
Assert
.
AreEqual
(
"1.2.4.
5
"
,
Info
.
Version
);
Assert
.
AreEqual
(
32
,
info
.
SizeOfUInt
);
Assert
.
AreEqual
(
32
,
info
.
SizeOfUInt
);
Assert
.
AreEqual
(
32
,
info
.
SizeOfULong
);
Assert
.
AreEqual
(
32
,
info
.
SizeOfULong
);
Assert
.
AreEqual
(
32
,
info
.
SizeOfPointer
);
Assert
.
AreEqual
(
32
,
info
.
SizeOfPointer
);
...
...
contrib/infback9/inftree9.c
浏览文件 @
73014202
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#define MAXBITS 15
#define MAXBITS 15
const
char
inflate9_copyright
[]
=
const
char
inflate9_copyright
[]
=
" inflate9 1.2.4.
4
Copyright 1995-2010 Mark Adler "
;
" inflate9 1.2.4.
5
Copyright 1995-2010 Mark Adler "
;
/*
/*
If you use the zlib library in a product, an acknowledgment is welcome
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
in the documentation of your product. If for some reason you cannot
...
@@ -64,7 +64,7 @@ unsigned short FAR *work;
...
@@ -64,7 +64,7 @@ unsigned short FAR *work;
static
const
unsigned
short
lext
[
31
]
=
{
/* Length codes 257..285 extra */
static
const
unsigned
short
lext
[
31
]
=
{
/* Length codes 257..285 extra */
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
129
,
129
,
129
,
129
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
129
,
129
,
129
,
129
,
130
,
130
,
130
,
130
,
131
,
131
,
131
,
131
,
132
,
132
,
132
,
132
,
130
,
130
,
130
,
130
,
131
,
131
,
131
,
131
,
132
,
132
,
132
,
132
,
133
,
133
,
133
,
133
,
144
,
7
4
,
6
5
};
133
,
133
,
133
,
133
,
144
,
7
5
,
7
5
};
static
const
unsigned
short
dbase
[
32
]
=
{
/* Distance codes 0..31 base */
static
const
unsigned
short
dbase
[
32
]
=
{
/* Distance codes 0..31 base */
1
,
2
,
3
,
4
,
5
,
7
,
9
,
13
,
17
,
25
,
33
,
49
,
1
,
2
,
3
,
4
,
5
,
7
,
9
,
13
,
17
,
25
,
33
,
49
,
65
,
97
,
129
,
193
,
257
,
385
,
513
,
769
,
1025
,
1537
,
2049
,
3073
,
65
,
97
,
129
,
193
,
257
,
385
,
513
,
769
,
1025
,
1537
,
2049
,
3073
,
...
...
contrib/pascal/zlibpas.pas
浏览文件 @
73014202
...
@@ -10,7 +10,7 @@ unit zlibpas;
...
@@ -10,7 +10,7 @@ unit zlibpas;
interface
interface
const
const
ZLIB_VERSION
=
'1.2.4.
4
'
;
ZLIB_VERSION
=
'1.2.4.
5
'
;
type
type
alloc_func
=
function
(
opaque
:
Pointer
;
items
,
size
:
Integer
):
Pointer
;
alloc_func
=
function
(
opaque
:
Pointer
;
items
,
size
:
Integer
):
Pointer
;
...
...
contrib/vstudio/vc10/zlib.rc
浏览文件 @
73014202
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
#define IDR_VERSION1 1
#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1,2,4,
4
FILEVERSION 1,2,4,
5
PRODUCTVERSION 1,2,4,
4
PRODUCTVERSION 1,2,4,
5
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
FILEOS VOS_DOS_WINDOWS32
...
@@ -17,7 +17,7 @@ BEGIN
...
@@ -17,7 +17,7 @@ BEGIN
BEGIN
BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.4.
4
\0"
VALUE "FileVersion", "1.2.4.
5
\0"
VALUE "InternalName", "zlib\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlib.dll\0"
VALUE "OriginalFilename", "zlib.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
VALUE "ProductName", "ZLib.DLL\0"
...
...
contrib/vstudio/vc9/zlib.rc
浏览文件 @
73014202
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
#define IDR_VERSION1 1
#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1,2,4,
4
FILEVERSION 1,2,4,
5
PRODUCTVERSION 1,2,4,
4
PRODUCTVERSION 1,2,4,
5
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
FILEOS VOS_DOS_WINDOWS32
...
@@ -17,7 +17,7 @@ BEGIN
...
@@ -17,7 +17,7 @@ BEGIN
BEGIN
BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.4.
4
\0"
VALUE "FileVersion", "1.2.4.
5
\0"
VALUE "InternalName", "zlib\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlib.dll\0"
VALUE "OriginalFilename", "zlib.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
VALUE "ProductName", "ZLib.DLL\0"
...
...
deflate.c
浏览文件 @
73014202
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
#include "deflate.h"
#include "deflate.h"
const
char
deflate_copyright
[]
=
const
char
deflate_copyright
[]
=
" deflate 1.2.4.
4
Copyright 1995-2010 Jean-loup Gailly and Mark Adler "
;
" deflate 1.2.4.
5
Copyright 1995-2010 Jean-loup Gailly and Mark Adler "
;
/*
/*
If you use the zlib library in a product, an acknowledgment is welcome
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
in the documentation of your product. If for some reason you cannot
...
...
deflate.h
浏览文件 @
73014202
...
@@ -290,13 +290,13 @@ typedef struct internal_state {
...
@@ -290,13 +290,13 @@ typedef struct internal_state {
memory checker errors from longest match routines */
memory checker errors from longest match routines */
/* in trees.c */
/* in trees.c */
void
_tr_init
OF
((
deflate_state
*
s
));
void
ZLIB_INTERNAL
_tr_init
OF
((
deflate_state
*
s
));
int
_tr_tally
OF
((
deflate_state
*
s
,
unsigned
dist
,
unsigned
lc
));
int
ZLIB_INTERNAL
_tr_tally
OF
((
deflate_state
*
s
,
unsigned
dist
,
unsigned
lc
));
void
_tr_flush_block
OF
((
deflate_state
*
s
,
charf
*
buf
,
ulg
stored_len
,
void
ZLIB_INTERNAL
_tr_flush_block
OF
((
deflate_state
*
s
,
charf
*
buf
,
int
last
));
ulg
stored_len
,
int
last
));
void
_tr_align
OF
((
deflate_state
*
s
));
void
ZLIB_INTERNAL
_tr_align
OF
((
deflate_state
*
s
));
void
_tr_stored_block
OF
((
deflate_state
*
s
,
charf
*
buf
,
ulg
stored_len
,
void
ZLIB_INTERNAL
_tr_stored_block
OF
((
deflate_state
*
s
,
charf
*
buf
,
int
last
));
ulg
stored_len
,
int
last
));
#define d_code(dist) \
#define d_code(dist) \
((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
...
@@ -309,11 +309,11 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
...
@@ -309,11 +309,11 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
/* Inline versions of _tr_tally for speed: */
/* Inline versions of _tr_tally for speed: */
#if defined(GEN_TREES_H) || !defined(STDC)
#if defined(GEN_TREES_H) || !defined(STDC)
extern
uch
_length_code
[];
extern
uch
ZLIB_INTERNAL
_length_code
[];
extern
uch
_dist_code
[];
extern
uch
ZLIB_INTERNAL
_dist_code
[];
#else
#else
extern
const
uch
_length_code
[];
extern
const
uch
ZLIB_INTERNAL
_length_code
[];
extern
const
uch
_dist_code
[];
extern
const
uch
ZLIB_INTERNAL
_dist_code
[];
#endif
#endif
# define _tr_tally_lit(s, c, flush) \
# define _tr_tally_lit(s, c, flush) \
...
...
gzguts.h
浏览文件 @
73014202
...
@@ -12,7 +12,11 @@
...
@@ -12,7 +12,11 @@
# endif
# endif
#endif
#endif
#define ZLIB_INTERNAL
#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
#endif
#include <stdio.h>
#include <stdio.h>
#include "zlib.h"
#include "zlib.h"
...
@@ -112,9 +116,9 @@ typedef struct {
...
@@ -112,9 +116,9 @@ typedef struct {
typedef
gz_state
FAR
*
gz_statep
;
typedef
gz_state
FAR
*
gz_statep
;
/* shared functions */
/* shared functions */
ZEXTERN
void
ZEXPORT
gz_error
OF
((
gz_statep
,
int
,
const
char
*
));
void
ZLIB_INTERNAL
gz_error
OF
((
gz_statep
,
int
,
const
char
*
));
#if defined UNDER_CE
#if defined UNDER_CE
ZEXTERN
char
ZEXPORT
*
gz_strwinerror
OF
((
DWORD
error
));
char
ZLIB_INTERNAL
*
gz_strwinerror
OF
((
DWORD
error
));
#endif
#endif
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
...
@@ -123,6 +127,6 @@ ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
...
@@ -123,6 +127,6 @@ ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
#ifdef INT_MAX
#ifdef INT_MAX
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
#else
#else
ZEXTERN
unsigned
ZEXPORT
gz_intmax
OF
((
void
));
unsigned
ZLIB_INTERNAL
gz_intmax
OF
((
void
));
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
#endif
#endif
gzlib.c
浏览文件 @
73014202
...
@@ -26,7 +26,7 @@ local gzFile gz_open OF((const char *, int, const char *));
...
@@ -26,7 +26,7 @@ local gzFile gz_open OF((const char *, int, const char *));
The gz_strwinerror function does not change the current setting of
The gz_strwinerror function does not change the current setting of
GetLastError. */
GetLastError. */
char
Z
EXPORT
*
gz_strwinerror
(
error
)
char
Z
LIB_INTERNAL
*
gz_strwinerror
(
error
)
DWORD
error
;
DWORD
error
;
{
{
static
char
buf
[
1024
];
static
char
buf
[
1024
];
...
@@ -482,7 +482,7 @@ void ZEXPORT gzclearerr(file)
...
@@ -482,7 +482,7 @@ void ZEXPORT gzclearerr(file)
memory). Simply save the error message as a static string. If there is an
memory). Simply save the error message as a static string. If there is an
allocation failure constructing the error message, then convert the error to
allocation failure constructing the error message, then convert the error to
out of memory. */
out of memory. */
void
Z
EXPORT
gz_error
(
state
,
err
,
msg
)
void
Z
LIB_INTERNAL
gz_error
(
state
,
err
,
msg
)
gz_statep
state
;
gz_statep
state
;
int
err
;
int
err
;
const
char
*
msg
;
const
char
*
msg
;
...
@@ -522,7 +522,7 @@ void ZEXPORT gz_error(state, err, msg)
...
@@ -522,7 +522,7 @@ void ZEXPORT gz_error(state, err, msg)
available) -- we need to do this to cover cases where 2's complement not
available) -- we need to do this to cover cases where 2's complement not
used, since C standard permits 1's complement and sign-bit representations,
used, since C standard permits 1's complement and sign-bit representations,
otherwise we could just use ((unsigned)-1) >> 1 */
otherwise we could just use ((unsigned)-1) >> 1 */
unsigned
Z
EXPORT
gz_intmax
()
unsigned
Z
LIB_INTERNAL
gz_intmax
()
{
{
unsigned
p
,
q
;
unsigned
p
,
q
;
...
...
inffast.c
浏览文件 @
73014202
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
requires strm->avail_out >= 258 for each loop to avoid checking for
requires strm->avail_out >= 258 for each loop to avoid checking for
output space.
output space.
*/
*/
void
inflate_fast
(
strm
,
start
)
void
ZLIB_INTERNAL
inflate_fast
(
strm
,
start
)
z_streamp
strm
;
z_streamp
strm
;
unsigned
start
;
/* inflate()'s starting value for strm->avail_out */
unsigned
start
;
/* inflate()'s starting value for strm->avail_out */
{
{
...
...
inffast.h
浏览文件 @
73014202
...
@@ -8,4 +8,4 @@
...
@@ -8,4 +8,4 @@
subject to change. Applications should only use zlib.h.
subject to change. Applications should only use zlib.h.
*/
*/
void
inflate_fast
OF
((
z_streamp
strm
,
unsigned
start
));
void
ZLIB_INTERNAL
inflate_fast
OF
((
z_streamp
strm
,
unsigned
start
));
inftrees.c
浏览文件 @
73014202
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#define MAXBITS 15
#define MAXBITS 15
const
char
inflate_copyright
[]
=
const
char
inflate_copyright
[]
=
" inflate 1.2.4.
4
Copyright 1995-2010 Mark Adler "
;
" inflate 1.2.4.
5
Copyright 1995-2010 Mark Adler "
;
/*
/*
If you use the zlib library in a product, an acknowledgment is welcome
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
in the documentation of your product. If for some reason you cannot
...
@@ -29,7 +29,7 @@ const char inflate_copyright[] =
...
@@ -29,7 +29,7 @@ const char inflate_copyright[] =
table index bits. It will differ if the request is greater than the
table index bits. It will differ if the request is greater than the
longest code or if it is less than the shortest code.
longest code or if it is less than the shortest code.
*/
*/
int
inflate_table
(
type
,
lens
,
codes
,
table
,
bits
,
work
)
int
ZLIB_INTERNAL
inflate_table
(
type
,
lens
,
codes
,
table
,
bits
,
work
)
codetype
type
;
codetype
type
;
unsigned
short
FAR
*
lens
;
unsigned
short
FAR
*
lens
;
unsigned
codes
;
unsigned
codes
;
...
@@ -62,7 +62,7 @@ unsigned short FAR *work;
...
@@ -62,7 +62,7 @@ unsigned short FAR *work;
35
,
43
,
51
,
59
,
67
,
83
,
99
,
115
,
131
,
163
,
195
,
227
,
258
,
0
,
0
};
35
,
43
,
51
,
59
,
67
,
83
,
99
,
115
,
131
,
163
,
195
,
227
,
258
,
0
,
0
};
static
const
unsigned
short
lext
[
31
]
=
{
/* Length codes 257..285 extra */
static
const
unsigned
short
lext
[
31
]
=
{
/* Length codes 257..285 extra */
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
17
,
17
,
17
,
17
,
18
,
18
,
18
,
18
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
17
,
17
,
17
,
17
,
18
,
18
,
18
,
18
,
19
,
19
,
19
,
19
,
20
,
20
,
20
,
20
,
21
,
21
,
21
,
21
,
16
,
7
4
,
6
5
};
19
,
19
,
19
,
19
,
20
,
20
,
20
,
20
,
21
,
21
,
21
,
21
,
16
,
7
5
,
7
5
};
static
const
unsigned
short
dbase
[
32
]
=
{
/* Distance codes 0..29 base */
static
const
unsigned
short
dbase
[
32
]
=
{
/* Distance codes 0..29 base */
1
,
2
,
3
,
4
,
5
,
7
,
9
,
13
,
17
,
25
,
33
,
49
,
65
,
97
,
129
,
193
,
1
,
2
,
3
,
4
,
5
,
7
,
9
,
13
,
17
,
25
,
33
,
49
,
65
,
97
,
129
,
193
,
257
,
385
,
513
,
769
,
1025
,
1537
,
2049
,
3073
,
4097
,
6145
,
257
,
385
,
513
,
769
,
1025
,
1537
,
2049
,
3073
,
4097
,
6145
,
...
...
inftrees.h
浏览文件 @
73014202
...
@@ -57,6 +57,6 @@ typedef enum {
...
@@ -57,6 +57,6 @@ typedef enum {
DISTS
DISTS
}
codetype
;
}
codetype
;
extern
int
inflate_table
OF
((
codetype
type
,
unsigned
short
FAR
*
lens
,
int
ZLIB_INTERNAL
inflate_table
OF
((
codetype
type
,
unsigned
short
FAR
*
lens
,
unsigned
codes
,
code
FAR
*
FAR
*
table
,
unsigned
codes
,
code
FAR
*
FAR
*
table
,
unsigned
FAR
*
bits
,
unsigned
short
FAR
*
work
));
unsigned
FAR
*
bits
,
unsigned
short
FAR
*
work
));
qnx/package.qpg
浏览文件 @
73014202
...
@@ -25,10 +25,10 @@
...
@@ -25,10 +25,10 @@
<QPG:Files>
<QPG:Files>
<QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
<QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
<QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
<QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
<QPG:Add file="../libz.so.1.2.4.
4
" install="/opt/lib/" user="root:bin" permission="644"/>
<QPG:Add file="../libz.so.1.2.4.
5
" install="/opt/lib/" user="root:bin" permission="644"/>
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.4.
4
"/>
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.4.
5
"/>
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.
4
"/>
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.
5
"/>
<QPG:Add file="../libz.so.1.2.4.
4
" install="/opt/lib/" component="slib"/>
<QPG:Add file="../libz.so.1.2.4.
5
" install="/opt/lib/" component="slib"/>
</QPG:Files>
</QPG:Files>
<QPG:PackageFilter>
<QPG:PackageFilter>
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
</QPM:ProductDescription>
</QPM:ProductDescription>
<QPM:ReleaseDescription>
<QPM:ReleaseDescription>
<QPM:ReleaseVersion>1.2.4.
4
</QPM:ReleaseVersion>
<QPM:ReleaseVersion>1.2.4.
5
</QPM:ReleaseVersion>
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
...
...
treebuild.xml
浏览文件 @
73014202
<?xml version="1.0" ?>
<?xml version="1.0" ?>
<package
name=
"zlib"
version=
"1.2.4.
4
"
>
<package
name=
"zlib"
version=
"1.2.4.
5
"
>
<library
name=
"zlib"
dlversion=
"1.2.4.
4
"
dlname=
"z"
>
<library
name=
"zlib"
dlversion=
"1.2.4.
5
"
dlname=
"z"
>
<property
name=
"description"
>
zip compression library
</property>
<property
name=
"description"
>
zip compression library
</property>
<property
name=
"include-target-dir"
value=
"$(@PACKAGE/install-includedir)"
/>
<property
name=
"include-target-dir"
value=
"$(@PACKAGE/install-includedir)"
/>
...
...
trees.c
浏览文件 @
73014202
...
@@ -382,7 +382,7 @@ void gen_trees_header()
...
@@ -382,7 +382,7 @@ void gen_trees_header()
/* ===========================================================================
/* ===========================================================================
* Initialize the tree data structures for a new zlib stream.
* Initialize the tree data structures for a new zlib stream.
*/
*/
void
_tr_init
(
s
)
void
ZLIB_INTERNAL
_tr_init
(
s
)
deflate_state
*
s
;
deflate_state
*
s
;
{
{
tr_static_init
();
tr_static_init
();
...
@@ -867,7 +867,7 @@ local void send_all_trees(s, lcodes, dcodes, blcodes)
...
@@ -867,7 +867,7 @@ local void send_all_trees(s, lcodes, dcodes, blcodes)
/* ===========================================================================
/* ===========================================================================
* Send a stored block
* Send a stored block
*/
*/
void
_tr_stored_block
(
s
,
buf
,
stored_len
,
last
)
void
ZLIB_INTERNAL
_tr_stored_block
(
s
,
buf
,
stored_len
,
last
)
deflate_state
*
s
;
deflate_state
*
s
;
charf
*
buf
;
/* input block */
charf
*
buf
;
/* input block */
ulg
stored_len
;
/* length of input block */
ulg
stored_len
;
/* length of input block */
...
@@ -892,7 +892,7 @@ void _tr_stored_block(s, buf, stored_len, last)
...
@@ -892,7 +892,7 @@ void _tr_stored_block(s, buf, stored_len, last)
* To simplify the code, we assume the worst case of last real code encoded
* To simplify the code, we assume the worst case of last real code encoded
* on one bit only.
* on one bit only.
*/
*/
void
_tr_align
(
s
)
void
ZLIB_INTERNAL
_tr_align
(
s
)
deflate_state
*
s
;
deflate_state
*
s
;
{
{
send_bits
(
s
,
STATIC_TREES
<<
1
,
3
);
send_bits
(
s
,
STATIC_TREES
<<
1
,
3
);
...
@@ -921,7 +921,7 @@ void _tr_align(s)
...
@@ -921,7 +921,7 @@ void _tr_align(s)
* Determine the best encoding for the current block: dynamic trees, static
* Determine the best encoding for the current block: dynamic trees, static
* trees or store, and output the encoded block to the zip file.
* trees or store, and output the encoded block to the zip file.
*/
*/
void
_tr_flush_block
(
s
,
buf
,
stored_len
,
last
)
void
ZLIB_INTERNAL
_tr_flush_block
(
s
,
buf
,
stored_len
,
last
)
deflate_state
*
s
;
deflate_state
*
s
;
charf
*
buf
;
/* input block, or NULL if too old */
charf
*
buf
;
/* input block, or NULL if too old */
ulg
stored_len
;
/* length of input block */
ulg
stored_len
;
/* length of input block */
...
@@ -1022,7 +1022,7 @@ void _tr_flush_block(s, buf, stored_len, last)
...
@@ -1022,7 +1022,7 @@ void _tr_flush_block(s, buf, stored_len, last)
* Save the match info and tally the frequency counts. Return true if
* Save the match info and tally the frequency counts. Return true if
* the current block must be flushed.
* the current block must be flushed.
*/
*/
int
_tr_tally
(
s
,
dist
,
lc
)
int
ZLIB_INTERNAL
_tr_tally
(
s
,
dist
,
lc
)
deflate_state
*
s
;
deflate_state
*
s
;
unsigned
dist
;
/* distance of matched string */
unsigned
dist
;
/* distance of matched string */
unsigned
lc
;
/* match length-MIN_MATCH or unmatched char (if dist==0) */
unsigned
lc
;
/* match length-MIN_MATCH or unmatched char (if dist==0) */
...
...
trees.h
浏览文件 @
73014202
...
@@ -70,7 +70,7 @@ local const ct_data static_dtree[D_CODES] = {
...
@@ -70,7 +70,7 @@ local const ct_data static_dtree[D_CODES] = {
{{
19
},{
5
}},
{{
11
},{
5
}},
{{
27
},{
5
}},
{{
7
},{
5
}},
{{
23
},{
5
}}
{{
19
},{
5
}},
{{
11
},{
5
}},
{{
27
},{
5
}},
{{
7
},{
5
}},
{{
23
},{
5
}}
};
};
const
uch
_dist_code
[
DIST_CODE_LEN
]
=
{
const
uch
ZLIB_INTERNAL
_dist_code
[
DIST_CODE_LEN
]
=
{
0
,
1
,
2
,
3
,
4
,
4
,
5
,
5
,
6
,
6
,
6
,
6
,
7
,
7
,
7
,
7
,
8
,
8
,
8
,
8
,
0
,
1
,
2
,
3
,
4
,
4
,
5
,
5
,
6
,
6
,
6
,
6
,
7
,
7
,
7
,
7
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
8
,
8
,
8
,
8
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
11
,
...
@@ -99,7 +99,7 @@ const uch _dist_code[DIST_CODE_LEN] = {
...
@@ -99,7 +99,7 @@ const uch _dist_code[DIST_CODE_LEN] = {
29
,
29
,
29
,
29
,
29
,
29
,
29
,
29
,
29
,
29
,
29
,
29
29
,
29
,
29
,
29
,
29
,
29
,
29
,
29
,
29
,
29
,
29
,
29
};
};
const
uch
_length_code
[
MAX_MATCH
-
MIN_MATCH
+
1
]
=
{
const
uch
ZLIB_INTERNAL
_length_code
[
MAX_MATCH
-
MIN_MATCH
+
1
]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
8
,
9
,
9
,
10
,
10
,
11
,
11
,
12
,
12
,
12
,
12
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
8
,
9
,
9
,
10
,
10
,
11
,
11
,
12
,
12
,
12
,
12
,
13
,
13
,
13
,
13
,
14
,
14
,
14
,
14
,
15
,
15
,
15
,
15
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
13
,
13
,
13
,
13
,
14
,
14
,
14
,
14
,
15
,
15
,
15
,
15
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
17
,
17
,
17
,
17
,
17
,
17
,
17
,
17
,
18
,
18
,
18
,
18
,
18
,
18
,
18
,
18
,
19
,
19
,
19
,
19
,
17
,
17
,
17
,
17
,
17
,
17
,
17
,
17
,
18
,
18
,
18
,
18
,
18
,
18
,
18
,
18
,
19
,
19
,
19
,
19
,
...
...
win32/Makefile.gcc
浏览文件 @
73014202
...
@@ -116,13 +116,13 @@ zlibrc.o: win32/zlib1.rc
...
@@ -116,13 +116,13 @@ zlibrc.o: win32/zlib1.rc
.PHONY
:
install uninstall clean
.PHONY
:
install uninstall clean
install
:
zlib.h zconf.h $(STATICLIB) $(IMPLIB)
install
:
zlib.h zconf.h $(STATICLIB) $(IMPLIB)
-
@mkdir
-p
$(INCLUDE_PATH)
-
@mkdir
-p
$(LIBRARY_PATH)
-
if
[
"
$(SHARED_MODE)
"
=
"1"
]
;
then
\
-
if
[
"
$(SHARED_MODE)
"
=
"1"
]
;
then
\
mkdir
-p
$(BINARY_PATH)
;
\
mkdir
-p
$(BINARY_PATH)
;
\
$(INSTALL)
$(SHAREDLIB)
$(BINARY_PATH)
;
\
$(INSTALL)
$(SHAREDLIB)
$(BINARY_PATH)
;
\
$(INSTALL)
$(IMPLIB)
$(LIBRARY_PATH)
;
\
$(INSTALL)
$(IMPLIB)
$(LIBRARY_PATH)
;
\
fi
fi
-
@mkdir
-p
$(INCLUDE_PATH)
-
@mkdir
-p
$(LIBRARY_PATH)
-
$(INSTALL)
zlib.h
$(INCLUDE_PATH)
-
$(INSTALL)
zlib.h
$(INCLUDE_PATH)
-
$(INSTALL)
zconf.h
$(INCLUDE_PATH)
-
$(INSTALL)
zconf.h
$(INCLUDE_PATH)
-
$(INSTALL)
$(STATICLIB)
$(LIBRARY_PATH)
-
$(INSTALL)
$(STATICLIB)
$(LIBRARY_PATH)
...
...
zconf.h
浏览文件 @
73014202
...
@@ -315,10 +315,6 @@
...
@@ -315,10 +315,6 @@
# endif
# endif
#endif
#endif
#ifndef NO_VIZ
# define ZEXTERN __attribute__((visibility ("default"))) extern
#endif
#ifndef ZEXTERN
#ifndef ZEXTERN
# define ZEXTERN extern
# define ZEXTERN extern
#endif
#endif
...
...
zconf.h.cmakein
浏览文件 @
73014202
...
@@ -317,10 +317,6 @@
...
@@ -317,10 +317,6 @@
# endif
# endif
#endif
#endif
#ifndef NO_VIZ
# define ZEXTERN __attribute__((visibility ("default"))) extern
#endif
#ifndef ZEXTERN
#ifndef ZEXTERN
# define ZEXTERN extern
# define ZEXTERN extern
#endif
#endif
...
...
zconf.h.in
浏览文件 @
73014202
...
@@ -315,10 +315,6 @@
...
@@ -315,10 +315,6 @@
# endif
# endif
#endif
#endif
#ifndef NO_VIZ
# define ZEXTERN __attribute__((visibility ("default"))) extern
#endif
#ifndef ZEXTERN
#ifndef ZEXTERN
# define ZEXTERN extern
# define ZEXTERN extern
#endif
#endif
...
...
zlib.3
浏览文件 @
73014202
...
@@ -125,7 +125,7 @@ before asking for help.
...
@@ -125,7 +125,7 @@ before asking for help.
Send questions and/or comments to zlib@gzip.org,
Send questions and/or comments to zlib@gzip.org,
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
.SH AUTHORS
.SH AUTHORS
Version 1.2.4.
4
Version 1.2.4.
5
Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
and Mark Adler (madler@alumni.caltech.edu).
and Mark Adler (madler@alumni.caltech.edu).
.LP
.LP
...
...
zlib.3.pdf
浏览文件 @
73014202
无法预览此类型文件
zlib.h
浏览文件 @
73014202
/* zlib.h -- interface of the 'zlib' general purpose compression library
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.4.
4
, April 18th, 2010
version 1.2.4.
5
, April 18th, 2010
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
...
@@ -37,12 +37,12 @@
...
@@ -37,12 +37,12 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
#define ZLIB_VERSION "1.2.4.
4
"
#define ZLIB_VERSION "1.2.4.
5
"
#define ZLIB_VERNUM 0x124
4
#define ZLIB_VERNUM 0x124
5
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 2
#define ZLIB_VER_MINOR 2
#define ZLIB_VER_REVISION 4
#define ZLIB_VER_REVISION 4
#define ZLIB_VER_SUBREVISION
4
#define ZLIB_VER_SUBREVISION
5
/*
/*
The 'zlib' compression library provides in-memory compression and
The 'zlib' compression library provides in-memory compression and
...
...
zutil.c
浏览文件 @
73014202
...
@@ -117,9 +117,9 @@ uLong ZEXPORT zlibCompileFlags()
...
@@ -117,9 +117,9 @@ uLong ZEXPORT zlibCompileFlags()
# ifndef verbose
# ifndef verbose
# define verbose 0
# define verbose 0
# endif
# endif
int
z_verbose
=
verbose
;
int
ZLIB_INTERNAL
z_verbose
=
verbose
;
void
z_error
(
m
)
void
ZLIB_INTERNAL
z_error
(
m
)
char
*
m
;
char
*
m
;
{
{
fprintf
(
stderr
,
"%s
\n
"
,
m
);
fprintf
(
stderr
,
"%s
\n
"
,
m
);
...
@@ -146,7 +146,7 @@ const char * ZEXPORT zError(err)
...
@@ -146,7 +146,7 @@ const char * ZEXPORT zError(err)
#ifndef HAVE_MEMCPY
#ifndef HAVE_MEMCPY
void
zmemcpy
(
dest
,
source
,
len
)
void
ZLIB_INTERNAL
zmemcpy
(
dest
,
source
,
len
)
Bytef
*
dest
;
Bytef
*
dest
;
const
Bytef
*
source
;
const
Bytef
*
source
;
uInt
len
;
uInt
len
;
...
@@ -157,7 +157,7 @@ void zmemcpy(dest, source, len)
...
@@ -157,7 +157,7 @@ void zmemcpy(dest, source, len)
}
while
(
--
len
!=
0
);
}
while
(
--
len
!=
0
);
}
}
int
zmemcmp
(
s1
,
s2
,
len
)
int
ZLIB_INTERNAL
zmemcmp
(
s1
,
s2
,
len
)
const
Bytef
*
s1
;
const
Bytef
*
s1
;
const
Bytef
*
s2
;
const
Bytef
*
s2
;
uInt
len
;
uInt
len
;
...
@@ -170,7 +170,7 @@ int zmemcmp(s1, s2, len)
...
@@ -170,7 +170,7 @@ int zmemcmp(s1, s2, len)
return
0
;
return
0
;
}
}
void
zmemzero
(
dest
,
len
)
void
ZLIB_INTERNAL
zmemzero
(
dest
,
len
)
Bytef
*
dest
;
Bytef
*
dest
;
uInt
len
;
uInt
len
;
{
{
...
@@ -213,7 +213,7 @@ local ptr_table table[MAX_PTR];
...
@@ -213,7 +213,7 @@ local ptr_table table[MAX_PTR];
* a protected system like OS/2. Use Microsoft C instead.
* a protected system like OS/2. Use Microsoft C instead.
*/
*/
voidpf
zcalloc
(
voidpf
opaque
,
unsigned
items
,
unsigned
size
)
voidpf
ZLIB_INTERNAL
zcalloc
(
voidpf
opaque
,
unsigned
items
,
unsigned
size
)
{
{
voidpf
buf
=
opaque
;
/* just to make some compilers happy */
voidpf
buf
=
opaque
;
/* just to make some compilers happy */
ulg
bsize
=
(
ulg
)
items
*
size
;
ulg
bsize
=
(
ulg
)
items
*
size
;
...
@@ -237,7 +237,7 @@ voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
...
@@ -237,7 +237,7 @@ voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
return
buf
;
return
buf
;
}
}
void
zcfree
(
voidpf
opaque
,
voidpf
ptr
)
void
ZLIB_INTERNAL
zcfree
(
voidpf
opaque
,
voidpf
ptr
)
{
{
int
n
;
int
n
;
if
(
*
(
ush
*
)
&
ptr
!=
0
)
{
/* object < 64K */
if
(
*
(
ush
*
)
&
ptr
!=
0
)
{
/* object < 64K */
...
@@ -272,13 +272,13 @@ void zcfree (voidpf opaque, voidpf ptr)
...
@@ -272,13 +272,13 @@ void zcfree (voidpf opaque, voidpf ptr)
# define _hfree hfree
# define _hfree hfree
#endif
#endif
voidpf
zcalloc
(
voidpf
opaque
,
uInt
items
,
uInt
size
)
voidpf
ZLIB_INTERNAL
zcalloc
(
voidpf
opaque
,
uInt
items
,
uInt
size
)
{
{
if
(
opaque
)
opaque
=
0
;
/* to make compiler happy */
if
(
opaque
)
opaque
=
0
;
/* to make compiler happy */
return
_halloc
((
long
)
items
,
size
);
return
_halloc
((
long
)
items
,
size
);
}
}
void
zcfree
(
voidpf
opaque
,
voidpf
ptr
)
void
ZLIB_INTERNAL
zcfree
(
voidpf
opaque
,
voidpf
ptr
)
{
{
if
(
opaque
)
opaque
=
0
;
/* to make compiler happy */
if
(
opaque
)
opaque
=
0
;
/* to make compiler happy */
_hfree
(
ptr
);
_hfree
(
ptr
);
...
@@ -297,7 +297,7 @@ extern voidp calloc OF((uInt items, uInt size));
...
@@ -297,7 +297,7 @@ extern voidp calloc OF((uInt items, uInt size));
extern
void
free
OF
((
voidpf
ptr
));
extern
void
free
OF
((
voidpf
ptr
));
#endif
#endif
voidpf
zcalloc
(
opaque
,
items
,
size
)
voidpf
ZLIB_INTERNAL
zcalloc
(
opaque
,
items
,
size
)
voidpf
opaque
;
voidpf
opaque
;
unsigned
items
;
unsigned
items
;
unsigned
size
;
unsigned
size
;
...
@@ -307,7 +307,7 @@ voidpf zcalloc (opaque, items, size)
...
@@ -307,7 +307,7 @@ voidpf zcalloc (opaque, items, size)
(
voidpf
)
calloc
(
items
,
size
);
(
voidpf
)
calloc
(
items
,
size
);
}
}
void
zcfree
(
opaque
,
ptr
)
void
ZLIB_INTERNAL
zcfree
(
opaque
,
ptr
)
voidpf
opaque
;
voidpf
opaque
;
voidpf
ptr
;
voidpf
ptr
;
{
{
...
...
zutil.h
浏览文件 @
73014202
...
@@ -13,7 +13,12 @@
...
@@ -13,7 +13,12 @@
#ifndef ZUTIL_H
#ifndef ZUTIL_H
#define ZUTIL_H
#define ZUTIL_H
#define ZLIB_INTERNAL
#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
#endif
#include "zlib.h"
#include "zlib.h"
#ifdef STDC
#ifdef STDC
...
@@ -231,16 +236,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
...
@@ -231,16 +236,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define zmemzero(dest, len) memset(dest, 0, len)
# define zmemzero(dest, len) memset(dest, 0, len)
# endif
# endif
#else
#else
extern
void
zmemcpy
OF
((
Bytef
*
dest
,
const
Bytef
*
source
,
uInt
len
));
void
ZLIB_INTERNAL
zmemcpy
OF
((
Bytef
*
dest
,
const
Bytef
*
source
,
uInt
len
));
extern
int
zmemcmp
OF
((
const
Bytef
*
s1
,
const
Bytef
*
s2
,
uInt
len
));
int
ZLIB_INTERNAL
zmemcmp
OF
((
const
Bytef
*
s1
,
const
Bytef
*
s2
,
uInt
len
));
extern
void
zmemzero
OF
((
Bytef
*
dest
,
uInt
len
));
void
ZLIB_INTERNAL
zmemzero
OF
((
Bytef
*
dest
,
uInt
len
));
#endif
#endif
/* Diagnostic functions */
/* Diagnostic functions */
#ifdef DEBUG
#ifdef DEBUG
# include <stdio.h>
# include <stdio.h>
extern
int
z_verbose
;
extern
int
ZLIB_INTERNAL
z_verbose
;
extern
void
z_error
OF
((
char
*
m
));
extern
void
ZLIB_INTERNAL
z_error
OF
((
char
*
m
));
# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
# define Trace(x) {if (z_verbose>=0) fprintf x ;}
# define Trace(x) {if (z_verbose>=0) fprintf x ;}
# define Tracev(x) {if (z_verbose>0) fprintf x ;}
# define Tracev(x) {if (z_verbose>0) fprintf x ;}
...
@@ -257,8 +262,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
...
@@ -257,8 +262,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#endif
#endif
voidpf
zcalloc
OF
((
voidpf
opaque
,
unsigned
items
,
unsigned
size
));
voidpf
ZLIB_INTERNAL
zcalloc
OF
((
voidpf
opaque
,
unsigned
items
,
void
zcfree
OF
((
voidpf
opaque
,
voidpf
ptr
));
unsigned
size
));
void
ZLIB_INTERNAL
zcfree
OF
((
voidpf
opaque
,
voidpf
ptr
));
#define ZALLOC(strm, items, size) \
#define ZALLOC(strm, items, size) \
(*((strm)->zalloc))((strm)->opaque, (items), (size))
(*((strm)->zalloc))((strm)->opaque, (items), (size))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录