Updated zlib to 1.2.2.
This commit is contained in:
parent
91319260b1
commit
ec86fac0bb
|
@ -2,6 +2,7 @@
|
|||
* CHANGELOG.
|
||||
*/
|
||||
|
||||
07132005 - Updated zlib to 1.2.2.
|
||||
06122005 - Added support for mingw to Unix build process (thanks, Matze!).
|
||||
03162005 - Added missing translation and Portuguese support (thanks, Danny!).
|
||||
MPW support and several MacOS Classic fixes (thanks, Chris!).
|
||||
|
|
|
@ -6,33 +6,33 @@ libphysfsinclude_HEADERS = \
|
|||
|
||||
if BUILD_MACOSX
|
||||
|
||||
ZLIB_FILES = zlib121/adler32.c \
|
||||
zlib121/compress.c \
|
||||
zlib121/crc32.c \
|
||||
zlib121/crc32.h \
|
||||
zlib121/deflate.c \
|
||||
zlib121/deflate.h \
|
||||
zlib121/gzio.c \
|
||||
zlib121/infback.c \
|
||||
zlib121/inffast.c \
|
||||
zlib121/inffast.h \
|
||||
zlib121/inffixed.h \
|
||||
zlib121/inflate.c \
|
||||
zlib121/inflate.h \
|
||||
zlib121/inftrees.c \
|
||||
zlib121/inftrees.h \
|
||||
zlib121/trees.c \
|
||||
zlib121/trees.h \
|
||||
zlib121/uncompr.c \
|
||||
zlib121/zconf.h \
|
||||
zlib121/zlib.h \
|
||||
zlib121/zutil.c \
|
||||
zlib121/zutil.h
|
||||
ZLIB_FILES = zlib122/adler32.c \
|
||||
zlib122/compress.c \
|
||||
zlib122/crc32.c \
|
||||
zlib122/crc32.h \
|
||||
zlib122/deflate.c \
|
||||
zlib122/deflate.h \
|
||||
zlib122/gzio.c \
|
||||
zlib122/infback.c \
|
||||
zlib122/inffast.c \
|
||||
zlib122/inffast.h \
|
||||
zlib122/inffixed.h \
|
||||
zlib122/inflate.c \
|
||||
zlib122/inflate.h \
|
||||
zlib122/inftrees.c \
|
||||
zlib122/inftrees.h \
|
||||
zlib122/trees.c \
|
||||
zlib122/trees.h \
|
||||
zlib122/uncompr.c \
|
||||
zlib122/zconf.h \
|
||||
zlib122/zlib.h \
|
||||
zlib122/zutil.c \
|
||||
zlib122/zutil.h
|
||||
|
||||
|
||||
if BUILD_ZLIB
|
||||
ZLIB_SRC = $(ZLIB_FILES)
|
||||
ZLIB_INC = -I$(top_srcdir)/zlib121
|
||||
ZLIB_INC = -I$(top_srcdir)/zlib122
|
||||
ZLIB_EXTRADIST =
|
||||
else
|
||||
ZLIB_SRC =
|
||||
|
@ -105,7 +105,7 @@ EXTRA_DIST = \
|
|||
|
||||
else
|
||||
|
||||
SUBDIRS = platform archivers zlib121 . test extras
|
||||
SUBDIRS = platform archivers zlib122 . test extras
|
||||
|
||||
libphysfs_la_SOURCES = \
|
||||
physfs.c \
|
||||
|
@ -113,7 +113,7 @@ libphysfs_la_SOURCES = \
|
|||
physfs_byteorder.c
|
||||
|
||||
if BUILD_ZLIB
|
||||
ZLIB_LIB = zlib121/libz.la
|
||||
ZLIB_LIB = zlib122/libz.la
|
||||
else
|
||||
ZLIB_LIB =
|
||||
endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
lib_LTLIBRARIES = libphysfs.la
|
||||
|
||||
SUBDIRS = platform archivers zlib121 . test extras
|
||||
SUBDIRS = platform archivers zlib122 . test extras
|
||||
|
||||
libphysfsincludedir = $(includedir)
|
||||
libphysfsinclude_HEADERS = \
|
||||
|
@ -12,7 +12,7 @@ libphysfs_la_SOURCES = \
|
|||
physfs_byteorder.c
|
||||
|
||||
if BUILD_ZLIB
|
||||
ZLIB_LIB = zlib121/libz.la
|
||||
ZLIB_LIB = zlib122/libz.la
|
||||
else
|
||||
ZLIB_LIB =
|
||||
endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
noinst_LTLIBRARIES = libarchivers.la
|
||||
|
||||
if BUILD_ZLIB
|
||||
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/zlib121
|
||||
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/zlib122
|
||||
else
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
endif
|
||||
|
|
|
@ -547,7 +547,7 @@ AC_OUTPUT([
|
|||
Makefile
|
||||
archivers/Makefile
|
||||
platform/Makefile
|
||||
zlib121/Makefile
|
||||
zlib122/Makefile
|
||||
test/Makefile
|
||||
extras/Makefile
|
||||
physfs.spec
|
||||
|
|
28
makeos2.cmd
28
makeos2.cmd
|
@ -7,8 +7,8 @@ rem Patches go to icculus@clutteredmind.org ...
|
|||
|
||||
set PHYSFSLANG=PHYSFS_LANG_ENGLISH
|
||||
set DEBUGFLAGS=-D_NDEBUG -O2 -s
|
||||
rem set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib121 -c -D__ST_MT_ERRNO__ -DOS2 -DZ_PREFIX -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_WAD -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_SUPPORTS_HOG -DPHYSFS_SUPPORTS_MVL -DPHYSFS_LANG=%PHYSFSLANG% -DHAVE_ASSERT_H
|
||||
set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib121 -c -D__ST_MT_ERRNO__ -DOS2 -DZ_PREFIX -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_WAD -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_SUPPORTS_HOG -DPHYSFS_SUPPORTS_MVL -DHAVE_ASSERT_H
|
||||
rem set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib122 -c -D__ST_MT_ERRNO__ -DOS2 -DZ_PREFIX -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_WAD -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_SUPPORTS_HOG -DPHYSFS_SUPPORTS_MVL -DPHYSFS_LANG=%PHYSFSLANG% -DHAVE_ASSERT_H
|
||||
set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib122 -c -D__ST_MT_ERRNO__ -DOS2 -DZ_PREFIX -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_WAD -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_SUPPORTS_HOG -DPHYSFS_SUPPORTS_MVL -DHAVE_ASSERT_H
|
||||
|
||||
rem goto :dolinking
|
||||
|
||||
|
@ -126,18 +126,18 @@ gcc %CFLAGS% -o bin/zip.obj archivers/zip.c
|
|||
gcc %CFLAGS% -o bin/qpak.obj archivers/qpak.c
|
||||
gcc %CFLAGS% -o bin/hog.obj archivers/hog.c
|
||||
gcc %CFLAGS% -o bin/mvl.obj archivers/mvl.c
|
||||
gcc %CFLAGS% -o bin/adler32.obj zlib121/adler32.c
|
||||
gcc %CFLAGS% -o bin/compress.obj zlib121/compress.c
|
||||
gcc %CFLAGS% -o bin/crc32.obj zlib121/crc32.c
|
||||
gcc %CFLAGS% -o bin/deflate.obj zlib121/deflate.c
|
||||
gcc %CFLAGS% -o bin/gzio.obj zlib121/gzio.c
|
||||
gcc %CFLAGS% -o bin/infback.obj zlib121/infback.c
|
||||
gcc %CFLAGS% -o bin/inffast.obj zlib121/inffast.c
|
||||
gcc %CFLAGS% -o bin/inflate.obj zlib121/inflate.c
|
||||
gcc %CFLAGS% -o bin/inftrees.obj zlib121/inftrees.c
|
||||
gcc %CFLAGS% -o bin/trees.obj zlib121/trees.c
|
||||
gcc %CFLAGS% -o bin/uncompr.obj zlib121/uncompr.c
|
||||
gcc %CFLAGS% -o bin/zutil.obj zlib121/zutil.c
|
||||
gcc %CFLAGS% -o bin/adler32.obj zlib122/adler32.c
|
||||
gcc %CFLAGS% -o bin/compress.obj zlib122/compress.c
|
||||
gcc %CFLAGS% -o bin/crc32.obj zlib122/crc32.c
|
||||
gcc %CFLAGS% -o bin/deflate.obj zlib122/deflate.c
|
||||
gcc %CFLAGS% -o bin/gzio.obj zlib122/gzio.c
|
||||
gcc %CFLAGS% -o bin/infback.obj zlib122/infback.c
|
||||
gcc %CFLAGS% -o bin/inffast.obj zlib122/inffast.c
|
||||
gcc %CFLAGS% -o bin/inflate.obj zlib122/inflate.c
|
||||
gcc %CFLAGS% -o bin/inftrees.obj zlib122/inftrees.c
|
||||
gcc %CFLAGS% -o bin/trees.obj zlib122/trees.c
|
||||
gcc %CFLAGS% -o bin/uncompr.obj zlib122/uncompr.c
|
||||
gcc %CFLAGS% -o bin/zutil.obj zlib122/zutil.c
|
||||
@echo off
|
||||
|
||||
:dolinking
|
||||
|
|
46
physfs.dsp
46
physfs.dsp
|
@ -44,7 +44,7 @@ RSC=rc.exe
|
|||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /WX /Gm /ZI /Od /I "." /I "zlibwin32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "Z_PREFIX" /D "PHYSFS_EXPORTS" /D "PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_WAD" /D "PHYSFS_SUPPORTS_ZIP" /D "PHYSFS_SUPPORTS_QPAK" /D "PHYSFS_SUPPORTS_MVL" /D "PHYSFS_SUPPORTS_HOG" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /WX /Zi /Od /I "." /I "zlib121" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "Z_PREFIX" /D "PHYSFS_EXPORTS" /D "PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_WAD" /D "PHYSFS_SUPPORTS_ZIP" /D "PHYSFS_SUPPORTS_QPAK" /D "PHYSFS_SUPPORTS_MVL" /D "PHYSFS_SUPPORTS_HOG" /FR /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /WX /Zi /Od /I "." /I "zlib122" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "Z_PREFIX" /D "PHYSFS_EXPORTS" /D "PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_WAD" /D "PHYSFS_SUPPORTS_ZIP" /D "PHYSFS_SUPPORTS_QPAK" /D "PHYSFS_SUPPORTS_MVL" /D "PHYSFS_SUPPORTS_HOG" /FR /YX /FD /GZ /c
|
||||
# SUBTRACT CPP /X
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
|
@ -74,7 +74,7 @@ LINK32=link.exe
|
|||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /WX /O2 /I "." /I "zlibwin32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS" /D "PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_WAD" /D "PHYSFS_SUPPORTS_ZIP" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /WX /O2 /I "." /I "zlib121" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS" /D "PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_WAD" /D "PHYSFS_SUPPORTS_ZIP" /D "PHYSFS_SUPPORTS_QPAK" /D "PHYSFS_SUPPORTS_HOG" /D "PHYSFS_SUPPORTS_MVL" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /WX /O2 /I "." /I "zlib122" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHYSFS_EXPORTS" /D "PHYSFS_SUPPORTS_GRP" /D "PHYSFS_SUPPORTS_WAD" /D "PHYSFS_SUPPORTS_ZIP" /D "PHYSFS_SUPPORTS_QPAK" /D "PHYSFS_SUPPORTS_HOG" /D "PHYSFS_SUPPORTS_MVL" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
|
@ -97,19 +97,19 @@ LINK32=link.exe
|
|||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\adler32.c
|
||||
SOURCE=.\zlib122\adler32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\compress.c
|
||||
SOURCE=.\zlib122\compress.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\crc32.c
|
||||
SOURCE=.\zlib122\crc32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\deflate.c
|
||||
SOURCE=.\zlib122\deflate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -125,15 +125,15 @@ SOURCE=.\archivers\hog.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\inffast.c
|
||||
SOURCE=.\zlib122\inffast.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\inflate.c
|
||||
SOURCE=.\zlib122\inflate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\inftrees.c
|
||||
SOURCE=.\zlib122\inftrees.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -153,11 +153,11 @@ SOURCE=.\archivers\qpak.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\trees.c
|
||||
SOURCE=.\zlib122\trees.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\uncompr.c
|
||||
SOURCE=.\zlib122\uncompr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -173,7 +173,7 @@ SOURCE=.\archivers\zip.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\zutil.c
|
||||
SOURCE=.\zlib122\zutil.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
@ -181,31 +181,31 @@ SOURCE=.\zlib121\zutil.c
|
|||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\deflate.h
|
||||
SOURCE=.\zlib122\deflate.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\infblock.h
|
||||
SOURCE=.\zlib122\infblock.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\infcodes.h
|
||||
SOURCE=.\zlib122\infcodes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\inffast.h
|
||||
SOURCE=.\zlib122\inffast.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\inffixed.h
|
||||
SOURCE=.\zlib122\inffixed.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\inftrees.h
|
||||
SOURCE=.\zlib122\inftrees.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\infutil.h
|
||||
SOURCE=.\zlib122\infutil.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -217,19 +217,19 @@ SOURCE=.\physfs_internal.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\trees.h
|
||||
SOURCE=.\zlib122\trees.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\zconf.h
|
||||
SOURCE=.\zlib122\zconf.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\zlib.h
|
||||
SOURCE=.\zlib122\zlib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\zutil.h
|
||||
SOURCE=.\zlib122\zutil.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".,zlib121"
|
||||
AdditionalIncludeDirectories=".,zlib122"
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL;Z_PREFIX;PHYSFS_EXPORTS;PHYSFS_SUPPORTS_GRP;PHYSFS_SUPPORTS_WAD;PHYSFS_SUPPORTS_ZIP;PHYSFS_SUPPORTS_QPAK;PHYSFS_SUPPORTS_HOG;PHYSFS_SUPPORTS_MVL"
|
||||
ExceptionHandling="FALSE"
|
||||
BasicRuntimeChecks="3"
|
||||
|
@ -93,7 +93,7 @@
|
|||
EnableIntrinsicFunctions="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="FALSE"
|
||||
AdditionalIncludeDirectories=".,zlib121"
|
||||
AdditionalIncludeDirectories=".,zlib122"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL;Z_PREFIX;PHYSFS_EXPORTS;PHYSFS_SUPPORTS_GRP;PHYSFS_SUPPORTS_WAD;PHYSFS_SUPPORTS_ZIP;PHYSFS_SUPPORTS_QPAK;PHYSFS_SUPPORTS_HOG;PHYSFS_SUPPORTS_MVL"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
|
@ -155,16 +155,16 @@
|
|||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath=".\zlib121\adler32.c">
|
||||
RelativePath=".\zlib122\adler32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\compress.c">
|
||||
RelativePath=".\zlib122\compress.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\crc32.c">
|
||||
RelativePath=".\zlib122\crc32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\deflate.c">
|
||||
RelativePath=".\zlib122\deflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\archivers\dir.c">
|
||||
|
@ -176,13 +176,13 @@
|
|||
RelativePath="archivers\hog.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\inffast.c">
|
||||
RelativePath=".\zlib122\inffast.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\inflate.c">
|
||||
RelativePath=".\zlib122\inflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\inftrees.c">
|
||||
RelativePath=".\zlib122\inftrees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="archivers\mvl.c">
|
||||
|
@ -197,10 +197,10 @@
|
|||
RelativePath="archivers\qpak.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\trees.c">
|
||||
RelativePath=".\zlib122\trees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\uncompr.c">
|
||||
RelativePath=".\zlib122\uncompr.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\archivers\wad.c">
|
||||
|
@ -212,32 +212,32 @@
|
|||
RelativePath=".\archivers\zip.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\zutil.c">
|
||||
RelativePath=".\zlib122\zutil.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath=".\zlib121\deflate.h">
|
||||
RelativePath=".\zlib122\deflate.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\infblock.h">
|
||||
RelativePath=".\zlib122\infblock.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\infcodes.h">
|
||||
RelativePath=".\zlib122\infcodes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\inffast.h">
|
||||
RelativePath=".\zlib122\inffast.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\inffixed.h">
|
||||
RelativePath=".\zlib122\inffixed.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\inftrees.h">
|
||||
RelativePath=".\zlib122\inftrees.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\infutil.h">
|
||||
RelativePath=".\zlib122\infutil.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\physfs.h">
|
||||
|
@ -246,16 +246,16 @@
|
|||
RelativePath=".\physfs_internal.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\trees.h">
|
||||
RelativePath=".\zlib122\trees.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\zconf.h">
|
||||
RelativePath=".\zlib122\zconf.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\zlib.h">
|
||||
RelativePath=".\zlib122\zlib.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib121\zutil.h">
|
||||
RelativePath=".\zlib122\zutil.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
|
|
|
@ -8,7 +8,7 @@ MAKEFILE = PhysicsFS.make
|
|||
|
||||
ObjDir = :obj:
|
||||
Includes = -i : ¶
|
||||
-i ":zlib121:"
|
||||
-i ":zlib122:"
|
||||
|
||||
Sym-PPC = -sym on
|
||||
|
||||
|
@ -29,18 +29,18 @@ SrcFiles =
|
|||
physfs.c ¶
|
||||
physfs_byteorder.c ¶
|
||||
:platform:macclassic.c ¶
|
||||
:zlib121:adler32.c ¶
|
||||
:zlib121:compress.c ¶
|
||||
:zlib121:crc32.c ¶
|
||||
:zlib121:deflate.c ¶
|
||||
:zlib121:gzio.c ¶
|
||||
:zlib121:infback.c ¶
|
||||
:zlib121:inffast.c ¶
|
||||
:zlib121:inflate.c ¶
|
||||
:zlib121:inftrees.c ¶
|
||||
:zlib121:trees.c ¶
|
||||
:zlib121:uncompr.c ¶
|
||||
:zlib121:zutil.c
|
||||
:zlib122:adler32.c ¶
|
||||
:zlib122:compress.c ¶
|
||||
:zlib122:crc32.c ¶
|
||||
:zlib122:deflate.c ¶
|
||||
:zlib122:gzio.c ¶
|
||||
:zlib122:infback.c ¶
|
||||
:zlib122:inffast.c ¶
|
||||
:zlib122:inflate.c ¶
|
||||
:zlib122:inftrees.c ¶
|
||||
:zlib122:trees.c ¶
|
||||
:zlib122:uncompr.c ¶
|
||||
:zlib122:zutil.c
|
||||
|
||||
|
||||
### Object Files ###
|
||||
|
@ -116,18 +116,18 @@ PhysicsFS
|
|||
"{ObjDir}physfs.c.x" Ä physfs.c
|
||||
"{ObjDir}physfs_byteorder.c.x" Ä physfs_byteorder.c
|
||||
"{ObjDir}macclassic.c.x" Ä :platform:macclassic.c
|
||||
"{ObjDir}adler32.c.x" Ä :zlib121:adler32.c
|
||||
"{ObjDir}compress.c.x" Ä :zlib121:compress.c
|
||||
"{ObjDir}crc32.c.x" Ä :zlib121:crc32.c
|
||||
"{ObjDir}deflate.c.x" Ä :zlib121:deflate.c
|
||||
"{ObjDir}gzio.c.x" Ä :zlib121:gzio.c
|
||||
"{ObjDir}infback.c.x" Ä :zlib121:infback.c
|
||||
"{ObjDir}inffast.c.x" Ä :zlib121:inffast.c
|
||||
"{ObjDir}inflate.c.x" Ä :zlib121:inflate.c
|
||||
"{ObjDir}inftrees.c.x" Ä :zlib121:inftrees.c
|
||||
"{ObjDir}trees.c.x" Ä :zlib121:trees.c
|
||||
"{ObjDir}uncompr.c.x" Ä :zlib121:uncompr.c
|
||||
"{ObjDir}zutil.c.x" Ä :zlib121:zutil.c
|
||||
"{ObjDir}adler32.c.x" Ä :zlib122:adler32.c
|
||||
"{ObjDir}compress.c.x" Ä :zlib122:compress.c
|
||||
"{ObjDir}crc32.c.x" Ä :zlib122:crc32.c
|
||||
"{ObjDir}deflate.c.x" Ä :zlib122:deflate.c
|
||||
"{ObjDir}gzio.c.x" Ä :zlib122:gzio.c
|
||||
"{ObjDir}infback.c.x" Ä :zlib122:infback.c
|
||||
"{ObjDir}inffast.c.x" Ä :zlib122:inffast.c
|
||||
"{ObjDir}inflate.c.x" Ä :zlib122:inflate.c
|
||||
"{ObjDir}inftrees.c.x" Ä :zlib122:inftrees.c
|
||||
"{ObjDir}trees.c.x" Ä :zlib122:trees.c
|
||||
"{ObjDir}uncompr.c.x" Ä :zlib122:uncompr.c
|
||||
"{ObjDir}zutil.c.x" Ä :zlib122:zutil.c
|
||||
|
||||
|
||||
### Optional Dependencies ###
|
||||
|
|
|
@ -42,7 +42,7 @@ RSC=rc.exe
|
|||
# PROP Target_Dir ""
|
||||
MTL=midl.exe
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "zlib121" /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PHYSFS_SUPPORTS_QPAK=1 /D PHYSFS_SUPPORTS_ZIP=1 /D PHYSFS_SUPPORTS_HOG=1 /D PHYSFS_SUPPORTS_GRP=1 /D PHYSFS_SUPPORTS_WAD=1 /D PHYSFS_SUPPORTS_MVL=1 /D Z_PREFIX=1 /YX /FD /c
|
||||
# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "zlib122" /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PHYSFS_SUPPORTS_QPAK=1 /D PHYSFS_SUPPORTS_ZIP=1 /D PHYSFS_SUPPORTS_HOG=1 /D PHYSFS_SUPPORTS_GRP=1 /D PHYSFS_SUPPORTS_WAD=1 /D PHYSFS_SUPPORTS_MVL=1 /D Z_PREFIX=1 /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
@ -66,7 +66,7 @@ LIB32=link.exe -lib
|
|||
# PROP Target_Dir ""
|
||||
MTL=midl.exe
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "zlib121" /I "." /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PHYSFS_SUPPORTS_QPAK=1 /D PHYSFS_SUPPORTS_ZIP=1 /D PHYSFS_SUPPORTS_HOG=1 /D PHYSFS_SUPPORTS_GRP=1 /D PHYSFS_SUPPORTS_WAD=1 /D PHYSFS_SUPPORTS_MVL=1 /D Z_PREFIX=1 /FR /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "zlib122" /I "." /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PHYSFS_SUPPORTS_QPAK=1 /D PHYSFS_SUPPORTS_ZIP=1 /D PHYSFS_SUPPORTS_HOG=1 /D PHYSFS_SUPPORTS_GRP=1 /D PHYSFS_SUPPORTS_WAD=1 /D PHYSFS_SUPPORTS_MVL=1 /D Z_PREFIX=1 /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
@ -90,47 +90,47 @@ LIB32=link.exe -lib
|
|||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\adler32.c
|
||||
SOURCE=.\zlib122\adler32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\compress.c
|
||||
SOURCE=.\zlib122\compress.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\crc32.c
|
||||
SOURCE=.\zlib122\crc32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\deflate.c
|
||||
SOURCE=.\zlib122\deflate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\infback.c
|
||||
SOURCE=.\zlib122\infback.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\inffast.c
|
||||
SOURCE=.\zlib122\inffast.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\inflate.c
|
||||
SOURCE=.\zlib122\inflate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\inftrees.c
|
||||
SOURCE=.\zlib122\inftrees.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\trees.c
|
||||
SOURCE=.\zlib122\trees.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\uncompr.c
|
||||
SOURCE=.\zlib122\uncompr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zlib121\zutil.c
|
||||
SOURCE=.\zlib122\zutil.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: adler32.c,v 1.1 2003/12/07 05:29:20 icculus Exp $ */
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#define ZLIB_INTERNAL
|
||||
#include "zlib.h"
|
|
@ -3,7 +3,7 @@
|
|||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: compress.c,v 1.1 2003/12/07 05:29:20 icculus Exp $ */
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#define ZLIB_INTERNAL
|
||||
#include "zlib.h"
|
|
@ -9,7 +9,15 @@
|
|||
* of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
|
||||
*/
|
||||
|
||||
/* @(#) $Id: crc32.c,v 1.1 2003/12/07 05:29:20 icculus Exp $ */
|
||||
/* @(#) $Id$ */
|
||||
|
||||
/*
|
||||
Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
|
||||
protection on the static variables used to control the first-use generation
|
||||
of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should
|
||||
first call get_crc_table() to initialize the tables before allowing more than
|
||||
one thread to use crc32().
|
||||
*/
|
||||
|
||||
#ifdef MAKECRCH
|
||||
# include <stdio.h>
|
||||
|
@ -58,7 +66,7 @@
|
|||
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
|
||||
local int crc_table_empty = 1;
|
||||
local volatile int crc_table_empty = 1;
|
||||
local unsigned long FAR crc_table[TBLS][256];
|
||||
local void make_crc_table OF((void));
|
||||
#ifdef MAKECRCH
|
||||
|
@ -95,38 +103,51 @@ local void make_crc_table()
|
|||
{
|
||||
unsigned long c;
|
||||
int n, k;
|
||||
unsigned long poly; /* polynomial exclusive-or pattern */
|
||||
unsigned long poly; /* polynomial exclusive-or pattern */
|
||||
/* terms of polynomial defining this crc (except x^32): */
|
||||
static volatile int first = 1; /* flag to limit concurrent making */
|
||||
static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
|
||||
|
||||
/* make exclusive-or pattern from polynomial (0xedb88320UL) */
|
||||
poly = 0UL;
|
||||
for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
|
||||
poly |= 1UL << (31 - p[n]);
|
||||
/* See if another task is already doing this (not thread-safe, but better
|
||||
than nothing -- significantly reduces duration of vulnerability in
|
||||
case the advice about DYNAMIC_CRC_TABLE is ignored) */
|
||||
if (first) {
|
||||
first = 0;
|
||||
|
||||
/* generate a crc for every 8-bit value */
|
||||
for (n = 0; n < 256; n++) {
|
||||
c = (unsigned long)n;
|
||||
for (k = 0; k < 8; k++)
|
||||
c = c & 1 ? poly ^ (c >> 1) : c >> 1;
|
||||
crc_table[0][n] = c;
|
||||
}
|
||||
/* make exclusive-or pattern from polynomial (0xedb88320UL) */
|
||||
poly = 0UL;
|
||||
for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
|
||||
poly |= 1UL << (31 - p[n]);
|
||||
|
||||
/* generate a crc for every 8-bit value */
|
||||
for (n = 0; n < 256; n++) {
|
||||
c = (unsigned long)n;
|
||||
for (k = 0; k < 8; k++)
|
||||
c = c & 1 ? poly ^ (c >> 1) : c >> 1;
|
||||
crc_table[0][n] = c;
|
||||
}
|
||||
|
||||
#ifdef BYFOUR
|
||||
/* generate crc for each value followed by one, two, and three zeros, and
|
||||
then the byte reversal of those as well as the first table */
|
||||
for (n = 0; n < 256; n++) {
|
||||
c = crc_table[0][n];
|
||||
crc_table[4][n] = REV(c);
|
||||
for (k = 1; k < 4; k++) {
|
||||
c = crc_table[0][c & 0xff] ^ (c >> 8);
|
||||
crc_table[k][n] = c;
|
||||
crc_table[k + 4][n] = REV(c);
|
||||
/* generate crc for each value followed by one, two, and three zeros,
|
||||
and then the byte reversal of those as well as the first table */
|
||||
for (n = 0; n < 256; n++) {
|
||||
c = crc_table[0][n];
|
||||
crc_table[4][n] = REV(c);
|
||||
for (k = 1; k < 4; k++) {
|
||||
c = crc_table[0][c & 0xff] ^ (c >> 8);
|
||||
crc_table[k][n] = c;
|
||||
crc_table[k + 4][n] = REV(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* BYFOUR */
|
||||
|
||||
crc_table_empty = 0;
|
||||
crc_table_empty = 0;
|
||||
}
|
||||
else { /* not first */
|
||||
/* wait for the other guy to finish (not efficient, but rare) */
|
||||
while (crc_table_empty)
|
||||
;
|
||||
}
|
||||
|
||||
#ifdef MAKECRCH
|
||||
/* write out CRC tables to crc32.h */
|
||||
|
@ -180,9 +201,10 @@ local void write_table(out, table)
|
|||
const unsigned long FAR * ZEXPORT get_crc_table()
|
||||
{
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
if (crc_table_empty) make_crc_table();
|
||||
if (crc_table_empty)
|
||||
make_crc_table();
|
||||
#endif /* DYNAMIC_CRC_TABLE */
|
||||
return (const unsigned long FAR *)crc_table;
|
||||
return (const unsigned long FAR *)crc_table;
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
|
@ -1,5 +1,5 @@
|
|||
/* deflate.c -- compress data using the deflation algorithm
|
||||
* Copyright (C) 1995-2003 Jean-loup Gailly.
|
||||
* Copyright (C) 1995-2004 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -47,12 +47,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* @(#) $Id: deflate.c,v 1.1 2003/12/07 05:29:20 icculus Exp $ */
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#include "deflate.h"
|
||||
|
||||
const char deflate_copyright[] =
|
||||
" deflate 1.2.1 Copyright 1995-2003 Jean-loup Gailly ";
|
||||
" deflate 1.2.2 Copyright 1995-2004 Jean-loup Gailly ";
|
||||
/*
|
||||
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
|
|
@ -8,7 +8,7 @@
|
|||
subject to change. Applications should only use zlib.h.
|
||||
*/
|
||||
|
||||
/* @(#) $Id: deflate.h,v 1.1 2003/12/07 05:29:20 icculus Exp $ */
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef DEFLATE_H
|
||||
#define DEFLATE_H
|
||||
|
@ -95,7 +95,6 @@ typedef struct internal_state {
|
|||
Bytef *pending_out; /* next pending byte to output to the stream */
|
||||
int pending; /* nb of bytes in the pending buffer */
|
||||
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
|
||||
Byte data_type; /* UNKNOWN, BINARY or ASCII */
|
||||
Byte method; /* STORED (for zip only) or DEFLATED */
|
||||
int last_flush; /* value of flush param for previous deflate call */
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
* Compile this file with -DNO_GZCOMPRESS to avoid the compression code.
|
||||
*/
|
||||
|
||||
/* @(#) $Id: gzio.c,v 1.1 2003/12/07 05:29:20 icculus Exp $ */
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -455,6 +455,10 @@ int ZEXPORT gzread (file, buf, len)
|
|||
s->z_err = Z_ERRNO;
|
||||
break;
|
||||
}
|
||||
if (feof(s->file)) { /* avoid error for empty file */
|
||||
s->z_err = Z_STREAM_END;
|
||||
break;
|
||||
}
|
||||
}
|
||||
s->stream.next_in = s->inbuf;
|
||||
}
|
|
@ -434,6 +434,9 @@ void FAR *out_desc;
|
|||
}
|
||||
}
|
||||
|
||||
/* handle error breaks in while */
|
||||
if (state->mode == BAD) break;
|
||||
|
||||
/* build code tables */
|
||||
state->next = state->codes;
|
||||
state->lencode = (code const FAR *)(state->next);
|
|
@ -1,5 +1,5 @@
|
|||
/* inffast.c -- fast decoding
|
||||
* Copyright (C) 1995-2003 Mark Adler
|
||||
* Copyright (C) 1995-2004 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
- none
|
||||
No measurable difference:
|
||||
- Pentium III (Anderson)
|
||||
- 68060 (Nikl)
|
||||
- M68060 (Nikl)
|
||||
*/
|
||||
#ifdef POSTINC
|
||||
# define OFF 0
|
|
@ -109,6 +109,7 @@ z_streamp strm;
|
|||
state = (struct inflate_state FAR *)strm->state;
|
||||
strm->total_in = strm->total_out = state->total = 0;
|
||||
strm->msg = Z_NULL;
|
||||
strm->adler = 1; /* to support ill-conceived Java test suite */
|
||||
state->mode = HEAD;
|
||||
state->last = 0;
|
||||
state->havedict = 0;
|
||||
|
@ -861,6 +862,9 @@ int flush;
|
|||
}
|
||||
}
|
||||
|
||||
/* handle error breaks in while */
|
||||
if (state->mode == BAD) break;
|
||||
|
||||
/* build code tables */
|
||||
state->next = state->codes;
|
||||
state->lencode = (code const FAR *)(state->next);
|
|
@ -1,5 +1,5 @@
|
|||
/* inftrees.c -- generate Huffman trees for efficient decoding
|
||||
* Copyright (C) 1995-2003 Mark Adler
|
||||
* Copyright (C) 1995-2004 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define MAXBITS 15
|
||||
|
||||
const char inflate_copyright[] =
|
||||
" inflate 1.2.1 Copyright 1995-2003 Mark Adler ";
|
||||
" inflate 1.2.2 Copyright 1995-2004 Mark Adler ";
|
||||
/*
|
||||
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
|
||||
|
@ -62,7 +62,7 @@ unsigned short FAR *work;
|
|||
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 */
|
||||
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, 76, 66};
|
||||
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 198};
|
||||
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,
|
||||
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
||||
|
@ -114,7 +114,15 @@ unsigned short FAR *work;
|
|||
for (max = MAXBITS; max >= 1; max--)
|
||||
if (count[max] != 0) break;
|
||||
if (root > max) root = max;
|
||||
if (max == 0) return -1; /* no codes! */
|
||||
if (max == 0) { /* no symbols to code at all */
|
||||
this.op = (unsigned char)64; /* invalid code marker */
|
||||
this.bits = (unsigned char)1;
|
||||
this.val = (unsigned short)0;
|
||||
*(*table)++ = this; /* make a table to force an error */
|
||||
*(*table)++ = this;
|
||||
*bits = 1;
|
||||
return 0; /* no symbols, but wait for decoding to report error */
|
||||
}
|
||||
for (min = 1; min <= MAXBITS; min++)
|
||||
if (count[min] != 0) break;
|
||||
if (root < min) root = min;
|
||||
|
@ -295,7 +303,6 @@ unsigned short FAR *work;
|
|||
drop = 0;
|
||||
len = root;
|
||||
next = *table;
|
||||
curr = root;
|
||||
this.bits = (unsigned char)len;
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
* Addison-Wesley, 1983. ISBN 0-201-06672-6.
|
||||
*/
|
||||
|
||||
/* @(#) $Id: trees.c,v 1.1 2003/12/07 05:29:20 icculus Exp $ */
|
||||
/* @(#) $Id$ */
|
||||
|
||||
/* #define GEN_TREES_H */
|
||||
|
||||
|
@ -931,7 +931,7 @@ void _tr_flush_block(s, buf, stored_len, eof)
|
|||
if (s->level > 0) {
|
||||
|
||||
/* Check if the file is ascii or binary */
|
||||
if (s->data_type == Z_UNKNOWN) set_data_type(s);
|
||||
if (s->strm->data_type == Z_UNKNOWN) set_data_type(s);
|
||||
|
||||
/* Construct the literal and distance trees */
|
||||
build_tree(s, (tree_desc *)(&(s->l_desc)));
|
||||
|
@ -1131,7 +1131,7 @@ local void set_data_type(s)
|
|||
while (n < 7) bin_freq += s->dyn_ltree[n++].Freq;
|
||||
while (n < 128) ascii_freq += s->dyn_ltree[n++].Freq;
|
||||
while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq;
|
||||
s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII);
|
||||
s->strm->data_type = bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII;
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
|
@ -3,7 +3,7 @@
|
|||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: uncompr.c,v 1.1 2003/12/07 05:29:20 icculus Exp $ */
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#define ZLIB_INTERNAL
|
||||
#include "zlib.h"
|
|
@ -1,5 +1,5 @@
|
|||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2003 Jean-loup Gailly.
|
||||
* Copyright (C) 1995-2004 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -13,65 +13,46 @@
|
|||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
*/
|
||||
#ifdef Z_PREFIX
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflate z_deflate
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflate z_inflate
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflateBound z_deflateBound
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateReset z_inflateReset
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# define uncompress z_uncompress
|
||||
# define adler32 z_adler32
|
||||
# define crc32 z_crc32
|
||||
# define get_crc_table z_get_crc_table
|
||||
|
||||
# define Byte z_Byte
|
||||
# define uInt z_uInt
|
||||
# define uLong z_uLong
|
||||
# define Bytef z_Bytef
|
||||
# define charf z_charf
|
||||
# define intf z_intf
|
||||
# define uIntf z_uIntf
|
||||
# define uLongf z_uLongf
|
||||
# define voidpf z_voidpf
|
||||
# define voidp z_voidp
|
||||
|
||||
# define inflate_table z_inflate_table
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define zlibVersion z_zlibVersion
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zError z_zError
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# define z_errmsg z_z_errmsg
|
||||
# define _tr_init z_tr_init
|
||||
# define _tr_stored_block z_tr_stored_block
|
||||
# define _tr_flush_block z_tr_flush_block
|
||||
# define _tr_tally z_tr_tally
|
||||
# define _length_code z_length_code
|
||||
# define _dist_code z_dist_code
|
||||
# define _tr_align z_tr_align
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflate z_deflate
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflate z_inflate
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# define uncompress z_uncompress
|
||||
# define adler32 z_adler32
|
||||
# define crc32 z_crc32
|
||||
# define get_crc_table z_get_crc_table
|
||||
# define zError z_zError
|
||||
|
||||
# define Byte z_Byte
|
||||
# define uInt z_uInt
|
||||
# define uLong z_uLong
|
||||
# define Bytef z_Bytef
|
||||
# define charf z_charf
|
||||
# define intf z_intf
|
||||
# define uIntf z_uIntf
|
||||
# define uLongf z_uLongf
|
||||
# define voidpf z_voidpf
|
||||
# define voidp z_voidp
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
|
@ -127,9 +108,6 @@
|
|||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && defined(macintosh)
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
|
@ -142,7 +120,7 @@
|
|||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)||defined(__MRC__)
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
|
@ -306,7 +284,7 @@ typedef uLong FAR uLongf;
|
|||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# define z_off_t off_t
|
||||
# define z_off_t off_t
|
||||
#endif
|
||||
#ifndef SEEK_SET
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
|
@ -314,11 +292,11 @@ typedef uLong FAR uLongf;
|
|||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__)
|
||||
#define NO_vsnprintf
|
||||
# define NO_vsnprintf
|
||||
#endif
|
||||
|
||||
#if defined(__MVS__)
|
|
@ -1,7 +1,7 @@
|
|||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.2.1, November 17th, 2003
|
||||
version 1.2.2, October 3rd, 2004
|
||||
|
||||
Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler
|
||||
Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -37,8 +37,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ZLIB_VERSION "1.2.1"
|
||||
#define ZLIB_VERNUM 0x1210
|
||||
#define ZLIB_VERSION "1.2.2"
|
||||
#define ZLIB_VERNUM 0x1220
|
||||
|
||||
/*
|
||||
The 'zlib' compression library provides in-memory compression and
|
||||
|
@ -53,24 +53,22 @@ extern "C" {
|
|||
application must provide more input and/or consume the output
|
||||
(providing more output space) before each call.
|
||||
|
||||
The compressed data format used by the in-memory functions is the zlib
|
||||
format, which is a zlib wrapper documented in RFC 1950, wrapped around a
|
||||
deflate stream, which is itself documented in RFC 1951.
|
||||
The compressed data format used by default by the in-memory functions is
|
||||
the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
|
||||
around a deflate stream, which is itself documented in RFC 1951.
|
||||
|
||||
The library also supports reading and writing files in gzip (.gz) format
|
||||
with an interface similar to that of stdio using the functions that start
|
||||
with "gz". The gzip format is different from the zlib format. gzip is a
|
||||
gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
|
||||
|
||||
This library can optionally read and write gzip streams in memory as well.
|
||||
|
||||
The zlib format was designed to be compact and fast for use in memory
|
||||
and on communications channels. The gzip format was designed for single-
|
||||
file compression on file systems, has a larger header than zlib to maintain
|
||||
directory information, and uses a different, slower check method than zlib.
|
||||
|
||||
This library does not provide any functions to write gzip files in memory.
|
||||
However such functions could be easily written using zlib's deflate function,
|
||||
the documentation in the gzip RFC, and the examples in gzio.c.
|
||||
|
||||
The library does not install any signal handler. The decoder checks
|
||||
the consistency of the compressed data, so the library should never
|
||||
crash even in case of corrupted input.
|
||||
|
@ -401,7 +399,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
|||
because Z_BLOCK is used.
|
||||
|
||||
If a preset dictionary is needed after this call (see inflateSetDictionary
|
||||
below), inflate sets strm-adler to the adler32 checksum of the dictionary
|
||||
below), inflate sets strm->adler to the adler32 checksum of the dictionary
|
||||
chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
|
||||
strm->adler to the adler32 checksum of all output produced so far (that is,
|
||||
total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
|
||||
|
@ -478,7 +476,8 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
|||
16 to windowBits to write a simple gzip header and trailer around the
|
||||
compressed data instead of a zlib wrapper. The gzip header will have no
|
||||
file name, no extra data, no comment, no modification time (set to zero),
|
||||
no header crc, and the operating system will be set to 255 (unknown).
|
||||
no header crc, and the operating system will be set to 255 (unknown). If a
|
||||
gzip stream is being written, strm->adler is a crc32 instead of an adler32.
|
||||
|
||||
The memLevel parameter specifies how much memory should be allocated
|
||||
for the internal compression state. memLevel=1 uses minimum memory but
|
||||
|
@ -649,7 +648,8 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
|
|||
windowBits can also be greater than 15 for optional gzip decoding. Add
|
||||
32 to windowBits to enable zlib and gzip decoding with automatic header
|
||||
detection, or add 16 to decode only the gzip format (the zlib format will
|
||||
return a Z_DATA_ERROR).
|
||||
return a Z_DATA_ERROR. If a gzip stream is being decoded, strm->adler is
|
||||
a crc32 instead of an adler32.
|
||||
|
||||
inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
||||
memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative
|
||||
|
@ -1189,7 +1189,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_stream FAR *strm, int windowBits,
|
|||
struct internal_state {int dummy;}; /* hack for buggy compilers */
|
||||
#endif
|
||||
|
||||
ZEXTERN const char * ZEXPORT zError OF((int err));
|
||||
ZEXTERN const char * ZEXPORT zError OF((int));
|
||||
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
|
||||
ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: zutil.c,v 1.1 2003/12/07 05:29:20 icculus Exp $ */
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#include "zutil.h"
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
subject to change. Applications should only use zlib.h.
|
||||
*/
|
||||
|
||||
/* @(#) $Id: zutil.h,v 1.1 2003/12/07 05:29:20 icculus Exp $ */
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZUTIL_H
|
||||
#define ZUTIL_H
|
||||
|
@ -189,9 +189,14 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|||
# define NO_vsnprintf
|
||||
# endif
|
||||
#endif
|
||||
#ifdef VMS
|
||||
# define NO_vsnprintf
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRERROR
|
||||
extern char *strerror OF((int));
|
||||
# ifndef VMS
|
||||
extern char *strerror OF((int));
|
||||
# endif
|
||||
# define zstrerror(errnum) strerror(errnum)
|
||||
#else
|
||||
# define zstrerror(errnum) ""
|
Loading…
Reference in New Issue