Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
e1b56469
Commit
e1b56469
authored
Mar 11, 2002
by
Tom Tromey
Committed by
Tom Tromey
Mar 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ChangeLog.gcj: Imported 1.1.4, while preserving local changes.
From-SVN: r50612
parent
932b4e3e
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
203 additions
and
151 deletions
+203
-151
zlib/ChangeLog
+11
-1
zlib/ChangeLog.gcj
+4
-0
zlib/FAQ
+68
-40
zlib/README
+33
-34
zlib/adler32.c
+2
-2
zlib/compress.c
+2
-2
zlib/crc32.c
+2
-2
zlib/deflate.c
+4
-4
zlib/deflate.h
+2
-2
zlib/example.c
+2
-2
zlib/gzio.c
+2
-2
zlib/infblock.c
+8
-3
zlib/infblock.h
+1
-1
zlib/infcodes.c
+3
-9
zlib/infcodes.h
+1
-1
zlib/inffast.c
+30
-17
zlib/inffast.h
+1
-1
zlib/inflate.c
+1
-1
zlib/inftrees.c
+4
-5
zlib/inftrees.h
+1
-1
zlib/infutil.c
+1
-1
zlib/infutil.h
+1
-1
zlib/maketree.c
+1
-1
zlib/minigzip.c
+2
-2
zlib/trees.c
+2
-2
zlib/uncompr.c
+2
-2
zlib/zconf.h
+2
-2
zlib/zlib.3
+3
-3
zlib/zlib.h
+3
-3
zlib/zutil.c
+2
-2
zlib/zutil.h
+2
-2
No files found.
zlib/ChangeLog
View file @
e1b56469
...
@@ -7,6 +7,16 @@
...
@@ -7,6 +7,16 @@
ChangeLog file for zlib
ChangeLog file for zlib
Changes in 1.1.4 (11 March 2002)
- ZFREE was repeated on same allocation on some error conditions.
This creates a security problem described in
http://www.zlib.org/advisory-2002-03-11.txt
- Returned incorrect error (Z_MEM_ERROR) on some invalid data
- Avoid accesses before window for invalid distances with inflate window
less than 32K.
- force windowBits > 8 to avoid a bug in the encoder for a window size
of 256 bytes. (A complete fix will be available in 1.1.5).
Changes in 1.1.3 (9 July 1998)
Changes in 1.1.3 (9 July 1998)
- fix "an inflate input buffer bug that shows up on rare but persistent
- fix "an inflate input buffer bug that shows up on rare but persistent
occasions" (Mark)
occasions" (Mark)
...
@@ -221,7 +231,7 @@ Changes in 1.0.6 (19 Jan 1998)
...
@@ -221,7 +231,7 @@ Changes in 1.0.6 (19 Jan 1998)
- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau)
- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau)
- added makelcc.bat for lcc-win32 (Tom St Denis)
- added makelcc.bat for lcc-win32 (Tom St Denis)
- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe)
- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe)
- Avoid expanded $Id: ChangeLog,v 1.
2 2001/06/09 20:31:02 aoliva
Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion.
- Avoid expanded $Id: ChangeLog,v 1.
1.1.2 2002/03/11 21:53:21 tromey
Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion.
- check for unistd.h in configure (for off_t)
- check for unistd.h in configure (for off_t)
- remove useless check parameter in inflate_blocks_free
- remove useless check parameter in inflate_blocks_free
- avoid useless assignment of s->check to itself in inflate_blocks_new
- avoid useless assignment of s->check to itself in inflate_blocks_new
...
...
zlib/ChangeLog.gcj
View file @
e1b56469
2002-03-11 Tom Tromey <tromey@redhat.com>
* ChangeLog.gcj: Imported 1.1.4, while preserving local changes.
2001-07-03 Tom Tromey <tromey@redhat.com>
2001-07-03 Tom Tromey <tromey@redhat.com>
Fix for PR bootstrap/3281:
Fix for PR bootstrap/3281:
...
...
zlib/FAQ
View file @
e1b56469
...
@@ -3,70 +3,98 @@
...
@@ -3,70 +3,98 @@
If your question is not there, please check the zlib home page
If your question is not there, please check the zlib home page
http://www.cdrom.com/pub/infozip/zlib/ which may have more recent information.
http://www.zlib.org which may have more recent information.
The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
1) I need a Windows DLL
1. Is zlib Y2K-compliant?
2) I need a Visual Basic interface to zlib
3) compress() returns Z_BUF_ERROR
4) deflate or inflate returns Z_BUF_ERROR
5) Where is the zlib documentation (man pages, etc...)?
6) Why don't you use GNU autoconf, libtool, etc...?
7) There is a bug in zlib.
8) I get "undefined reference to gzputc"
Yes. zlib doesn't handle dates.
2. Where can I get a Windows DLL version?
1) I need a Windows DLL
The zlib sources can be compiled without change to produce a DLL. If you
want a precompiled DLL, see http://www.winimage.com/zLibDll/ . Questions
about the zlib DLL should be sent to Gilles Vollant (info@winimage.com).
The zlib sources can be compiled without change to produce a DLL.
3. Where can I get a Visual Basic interface to zlib?
If you want a precompiled DLL, see http://www.winimage.com/zLibDll
See
* http://www.winimage.com/zLibDll/cmp-z-it.zip
* http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
* contrib/visual-basic.txt in the zlib distribution
2) I need a Visual Basic interface to zlib
4. compress() returns Z_BUF_ERROR
See http://www.tcfb.com/dowseware/cmp-z-it.zip
Make sure that before the call of compress, the length of the compressed
http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm
buffer is equal to the total size of the compressed buffer and not
and contrib/visual-basic.txt
zero. For Visual Basic, check that this parameter is passed by reference
("as any"), not by value ("as long").
3) compress
() returns Z_BUF_ERROR
5. deflate() or inflate
() returns Z_BUF_ERROR
Make sure that before the call of compress, the length of the
Before making the call, make sure that avail_in and avail_out are not
compressed buffer is equal to the total size of the compressed buffer
zero. When setting the parameter flush equal to Z_FINISH, also make sure
and not zero. For Visual Basic, check that this parameter is passed
that avail_out is big enough to allow processing all pending input.
by reference ("as any"), not by value ("as long").
6. Where's the zlib documentation (man pages, etc.)?
4) deflate or inflate returns Z_BUF_ERROR
It's in zlib.h for the moment, and Francis S. Lin has converted it to a
web page zlib.html. Volunteers to transform this to Unix-style man pages,
please contact Jean-loup Gailly (jloup@gzip.org). Examples of zlib usage
are in the files example.c and minigzip.c.
Make sure that before the call avail_in and avail_out are not zero.
7. Why don't you use GNU autoconf or libtool or ...?
Because we would like to keep zlib as a very small and simple
package. zlib is rather portable and doesn't need much configuration.
5) Where is the zlib documentation (man pages, etc...)?
8. I found a bug in zlib.
It's in zlib.h for the moment. Volunteers to transform this
Most of the time, such problems are due to an incorrect usage of
to man pages, please contact jloup@gzip.org. Examples of zlib usage
zlib. Please try to reproduce the problem with a small program and send
are in the files example.c and minigzip.c.
the corresponding source to us at zlib@gzip.org . Do not send
multi-megabyte data files without prior agreement.
9. Why do I get "undefined reference to gzputc"?
6) Why don't you use GNU autoconf, libtool, etc...?
If "make test" produces something like
Because we would like to keep zlib as a very small and simple package.
example.o(.text+0x154): undefined reference to `gzputc'
zlib is rather portable and doesn't need much configuration.
check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
/usr/X11R6/lib. Remove any old versions, then do "make install".
10. I need a Delphi interface to zlib.
7) There is a bug in zlib.
See the directories contrib/delphi and contrib/delphi2 in the zlib
distribution.
Most of the time, such problems are due to an incorrect usage
11. Can zlib handle .zip archives?
of zlib. Please try to reproduce the problem with a small
program and send us the corresponding source at zlib@quest.jpl.nasa.gov
Do not send multi-megabyte data files without prior agreement.
See the directory contrib/minizip in the zlib distribution.
8) I get "undefined reference to gzputc"
12. Can zlib handle .Z files?
If "make test" produces something like
No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
example.o(.text+0x174):
the code of uncompress on your own.
check that you don't have old files libz.* in /usr/lib, /usr/local/lib
or /usr/X11R6/lib. Remove old versions then do "make install".
13. How can I make a Unix shared library?
make clean
./configure -s
make
14. Why does "make test" fail on Mac OS X?
Mac OS X already includes zlib as a shared library, and so -lz links the
shared library instead of the one that the "make" compiled. For zlib
1.1.3, the two are incompatible due to different compile-time
options. Simply change the -lz in the Makefile to libz.a, and it will use
the compiled library instead of the shared one and the "make test" will
succeed.
15. I have a question about OttoPDF
We are not the authors of OttoPDF. The real author is on the OttoPDF web
site Joel Hainley jhainley@myndkryme.com.
zlib/README
View file @
e1b56469
zlib 1.1.
3
is a general purpose data compression library. All the code
zlib 1.1.
4
is a general purpose data compression library. All the code
is thread safe. The data format used by the zlib library
is thread safe. The data format used by the zlib library
is described by RFCs (Request for Comments) 1950 to 1952 in the files
is described by RFCs (Request for Comments) 1950 to 1952 in the files
ftp://ds.internic.net
/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate
http://www.ietf.org
/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate
format) and rfc1952.txt (gzip format). These documents are also available in
format) and rfc1952.txt (gzip format). These documents are also available in
other formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
other formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
...
@@ -14,51 +14,50 @@ except example.c and minigzip.c.
...
@@ -14,51 +14,50 @@ except example.c and minigzip.c.
To compile all files and run the test program, follow the instructions
To compile all files and run the test program, follow the instructions
given at the top of Makefile. In short "make test; make install"
given at the top of Makefile. In short "make test; make install"
should work for most machines. For Unix: "configure; make test; make install"
should work for most machines. For Unix: "
./
configure; make test; make install"
For MSDOS, use one of the special makefiles such as Makefile.msc.
For MSDOS, use one of the special makefiles such as Makefile.msc.
For VMS, use Make_vms.com or descrip.mms.
For VMS, use Make_vms.com or descrip.mms.
Questions about zlib should be sent to <zlib@
quest.jpl.nasa.gov
>, or to
Questions about zlib should be sent to <zlib@
gzip.org
>, or to
Gilles Vollant <info@winimage.com> for the Windows DLL version.
Gilles Vollant <info@winimage.com> for the Windows DLL version.
The zlib home page is http://www.cdrom.com/pub/infozip/zlib/
The zlib home page is http://www.zlib.org or http://www.gzip.org/zlib/
The official zlib ftp site is ftp://ftp.cdrom.com/pub/infozip/zlib/
Before reporting a problem, please check this site to verify that
Before reporting a problem, please check those sites to verify that
you have the latest version of zlib; otherwise get the latest version and
you have the latest version of zlib; otherwise get the latest version and
check whether the problem still exists or not.
check whether the problem still exists or not.
Mark Nelson <markn@tiny.com> wrote an article about zlib for the Jan. 1997
PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html
before asking for help.
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 in
issue of Dr. Dobb's Journal; a copy of the article is available in
http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm
http://dogma.net/markn/articles/zlibtool/zlibtool.htm
The changes made in version 1.1.3 are documented in the file ChangeLog.
The changes made in version 1.1.4 are documented in the file ChangeLog.
The main changes since 1.1.2 are:
The only changes made since 1.1.3 are bug corrections:
- fix "an inflate input buffer bug that shows up on rare but persistent
- ZFREE was repeated on same allocation on some error conditions.
occasions" (Mark)
This creates a security problem described in
- fix gzread and gztell for concatenated .gz files (Didier Le Botlan)
http://www.zlib.org/advisory-2002-03-11.txt
- fix gzseek(..., SEEK_SET) in write mode
- Returned incorrect error (Z_MEM_ERROR) on some invalid data
- fix crc check after a gzeek (Frank Faubert)
- Avoid accesses before window for invalid distances with inflate window
- fix miniunzip when the last entry in a zip file is itself a zip file
less than 32K.
(J Lillge)
- force windowBits > 8 to avoid a bug in the encoder for a window size
- add contrib/asm586 and contrib/asm686 (Brian Raiter)
of 256 bytes. (A complete fix will be available in 1.1.5).
See http://www.muppetlabs.com/~breadbox/software/assembly.html
- add support for Delphi 3 in contrib/delphi (Bob Dellaca)
The beta version 1.1.5beta includes many more changes. A new official
- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti)
version 1.1.5 will be released as soon as extensive testing has been
- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren)
completed on it.
- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks)
- added a FAQ file
plus many changes for portability.
Unsupported third party contributions are provided in directory "contrib".
Unsupported third party contributions are provided in directory "contrib".
A Java implementation of zlib is available in the Java Development Kit
1.1
A Java implementation of zlib is available in the Java Development Kit
http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html
http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html
See the zlib home page http://www.
cdrom.com/pub/infozip/zlib/
for details.
See the zlib home page http://www.
zlib.org
for details.
A Perl interface to zlib written by Paul Marquess <pmarquess@bfsec.bt.co.uk>
A Perl interface to zlib written by Paul Marquess <pmarquess@bfsec.bt.co.uk>
is in the CPAN (Comprehensive Perl Archive Network) sites
, such as:
is in the CPAN (Comprehensive Perl Archive Network) sites
ftp://ftp.cis.ufl.edu/pub/perl/CPAN/modules/by-module/Compress/Compress-Zlib*
http://www.cpan.org/modules/by-module/Compress/
A Python interface to zlib written by A.M. Kuchling <amk@magnet.com>
A Python interface to zlib written by A.M. Kuchling <amk@magnet.com>
is available in Python 1.5 and later versions, see
is available in Python 1.5 and later versions, see
...
@@ -117,7 +116,7 @@ Acknowledgments:
...
@@ -117,7 +116,7 @@ Acknowledgments:
Copyright notice:
Copyright notice:
(C) 1995-
1998
Jean-loup Gailly and Mark Adler
(C) 1995-
2002
Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
warranty. In no event will the authors be held liable for any damages
...
...
zlib/adler32.c
View file @
e1b56469
/* adler32.c -- compute the Adler-32 checksum of a data stream
/* adler32.c -- compute the Adler-32 checksum of a data stream
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
/* @(#) $Id: adler32.c,v 1.1
1999/05/04 19:30:26
tromey Exp $ */
/* @(#) $Id: adler32.c,v 1.1
.1.2 2002/03/11 21:53:23
tromey Exp $ */
#include "zlib.h"
#include "zlib.h"
...
...
zlib/compress.c
View file @
e1b56469
/* compress.c -- compress a memory buffer
/* compress.c -- compress a memory buffer
* Copyright (C) 1995-
1998
Jean-loup Gailly.
* Copyright (C) 1995-
2002
Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
/* @(#) $Id: compress.c,v 1.1
1999/05/04 19:30:26
tromey Exp $ */
/* @(#) $Id: compress.c,v 1.1
.1.2 2002/03/11 21:53:23
tromey Exp $ */
#include "zlib.h"
#include "zlib.h"
...
...
zlib/crc32.c
View file @
e1b56469
/* crc32.c -- compute the CRC-32 of a data stream
/* crc32.c -- compute the CRC-32 of a data stream
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
/* @(#) $Id: crc32.c,v 1.1
1999/05/04 19:30:26
tromey Exp $ */
/* @(#) $Id: crc32.c,v 1.1
.1.2 2002/03/11 21:53:23
tromey Exp $ */
#include "zlib.h"
#include "zlib.h"
...
...
zlib/deflate.c
View file @
e1b56469
/* deflate.c -- compress data using the deflation algorithm
/* deflate.c -- compress data using the deflation algorithm
* Copyright (C) 1995-
1998
Jean-loup Gailly.
* Copyright (C) 1995-
2002
Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
@@ -47,12 +47,12 @@
...
@@ -47,12 +47,12 @@
*
*
*/
*/
/* @(#) $Id: deflate.c,v 1.1
1999/05/04 19:30:26
tromey Exp $ */
/* @(#) $Id: deflate.c,v 1.1
.1.2 2002/03/11 21:53:23
tromey Exp $ */
#include "deflate.h"
#include "deflate.h"
const
char
deflate_copyright
[]
=
const
char
deflate_copyright
[]
=
" deflate 1.1.
3 Copyright 1995-1998
Jean-loup Gailly "
;
" deflate 1.1.
4 Copyright 1995-2002
Jean-loup Gailly "
;
/*
/*
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
...
@@ -242,7 +242,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
...
@@ -242,7 +242,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
windowBits
=
-
windowBits
;
windowBits
=
-
windowBits
;
}
}
if
(
memLevel
<
1
||
memLevel
>
MAX_MEM_LEVEL
||
method
!=
Z_DEFLATED
||
if
(
memLevel
<
1
||
memLevel
>
MAX_MEM_LEVEL
||
method
!=
Z_DEFLATED
||
windowBits
<
8
||
windowBits
>
15
||
level
<
0
||
level
>
9
||
windowBits
<
9
||
windowBits
>
15
||
level
<
0
||
level
>
9
||
strategy
<
0
||
strategy
>
Z_HUFFMAN_ONLY
)
{
strategy
<
0
||
strategy
>
Z_HUFFMAN_ONLY
)
{
return
Z_STREAM_ERROR
;
return
Z_STREAM_ERROR
;
}
}
...
...
zlib/deflate.h
View file @
e1b56469
/* deflate.h -- internal compression state
/* deflate.h -- internal compression state
* Copyright (C) 1995-
1998
Jean-loup Gailly
* Copyright (C) 1995-
2002
Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
subject to change. Applications should only use zlib.h.
subject to change. Applications should only use zlib.h.
*/
*/
/* @(#) $Id: deflate.h,v 1.1
1999/05/04 19:30:26
tromey Exp $ */
/* @(#) $Id: deflate.h,v 1.1
.1.2 2002/03/11 21:53:23
tromey Exp $ */
#ifndef _DEFLATE_H
#ifndef _DEFLATE_H
#define _DEFLATE_H
#define _DEFLATE_H
...
...
zlib/example.c
View file @
e1b56469
/* example.c -- usage example of the zlib compression library
/* example.c -- usage example of the zlib compression library
* Copyright (C) 1995-
1998
Jean-loup Gailly.
* Copyright (C) 1995-
2002
Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
/* @(#) $Id: example.c,v 1.1
1999/05/04 19:30:26
tromey Exp $ */
/* @(#) $Id: example.c,v 1.1
.1.2 2002/03/11 21:53:23
tromey Exp $ */
#include <stdio.h>
#include <stdio.h>
#include "zlib.h"
#include "zlib.h"
...
...
zlib/gzio.c
View file @
e1b56469
/* gzio.c -- IO on .gz files
/* gzio.c -- IO on .gz files
* Copyright (C) 1995-
1998
Jean-loup Gailly.
* Copyright (C) 1995-
2002
Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*
*
* Compile this file with -DNO_DEFLATE to avoid the compression code.
* Compile this file with -DNO_DEFLATE to avoid the compression code.
*/
*/
/* @(#) $Id: gzio.c,v 1.1
1999/05/04 19:30:26
tromey Exp $ */
/* @(#) $Id: gzio.c,v 1.1
.1.2 2002/03/11 21:53:24
tromey Exp $ */
#include <stdio.h>
#include <stdio.h>
...
...
zlib/infblock.c
View file @
e1b56469
/* infblock.c -- interpret and process block types to last block
/* infblock.c -- interpret and process block types to last block
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
@@ -249,10 +249,12 @@ int r;
...
@@ -249,10 +249,12 @@ int r;
&
s
->
sub
.
trees
.
tb
,
s
->
hufts
,
z
);
&
s
->
sub
.
trees
.
tb
,
s
->
hufts
,
z
);
if
(
t
!=
Z_OK
)
if
(
t
!=
Z_OK
)
{
{
ZFREE
(
z
,
s
->
sub
.
trees
.
blens
);
r
=
t
;
r
=
t
;
if
(
r
==
Z_DATA_ERROR
)
if
(
r
==
Z_DATA_ERROR
)
{
ZFREE
(
z
,
s
->
sub
.
trees
.
blens
);
s
->
mode
=
BAD
;
s
->
mode
=
BAD
;
}
LEAVE
LEAVE
}
}
s
->
sub
.
trees
.
index
=
0
;
s
->
sub
.
trees
.
index
=
0
;
...
@@ -313,11 +315,13 @@ int r;
...
@@ -313,11 +315,13 @@ int r;
t
=
inflate_trees_dynamic
(
257
+
(
t
&
0x1f
),
1
+
((
t
>>
5
)
&
0x1f
),
t
=
inflate_trees_dynamic
(
257
+
(
t
&
0x1f
),
1
+
((
t
>>
5
)
&
0x1f
),
s
->
sub
.
trees
.
blens
,
&
bl
,
&
bd
,
&
tl
,
&
td
,
s
->
sub
.
trees
.
blens
,
&
bl
,
&
bd
,
&
tl
,
&
td
,
s
->
hufts
,
z
);
s
->
hufts
,
z
);
ZFREE
(
z
,
s
->
sub
.
trees
.
blens
);
if
(
t
!=
Z_OK
)
if
(
t
!=
Z_OK
)
{
{
if
(
t
==
(
uInt
)
Z_DATA_ERROR
)
if
(
t
==
(
uInt
)
Z_DATA_ERROR
)
{
ZFREE
(
z
,
s
->
sub
.
trees
.
blens
);
s
->
mode
=
BAD
;
s
->
mode
=
BAD
;
}
r
=
t
;
r
=
t
;
LEAVE
LEAVE
}
}
...
@@ -329,6 +333,7 @@ int r;
...
@@ -329,6 +333,7 @@ int r;
}
}
s
->
sub
.
decode
.
codes
=
c
;
s
->
sub
.
decode
.
codes
=
c
;
}
}
ZFREE
(
z
,
s
->
sub
.
trees
.
blens
);
s
->
mode
=
CODES
;
s
->
mode
=
CODES
;
case
CODES
:
case
CODES
:
UPDATE
UPDATE
...
...
zlib/infblock.h
View file @
e1b56469
/* infblock.h -- header to use infblock.c
/* infblock.h -- header to use infblock.c
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
...
zlib/infcodes.c
View file @
e1b56469
/* infcodes.c -- process literals and length/distance pairs
/* infcodes.c -- process literals and length/distance pairs
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
@@ -196,15 +196,9 @@ int r;
...
@@ -196,15 +196,9 @@ int r;
Tracevv
((
stderr
,
"inflate: distance %u
\n
"
,
c
->
sub
.
copy
.
dist
));
Tracevv
((
stderr
,
"inflate: distance %u
\n
"
,
c
->
sub
.
copy
.
dist
));
c
->
mode
=
COPY
;
c
->
mode
=
COPY
;
case
COPY
:
/* o: copying bytes in window, waiting for space */
case
COPY
:
/* o: copying bytes in window, waiting for space */
#ifndef __TURBOC__
/* Turbo C bug for following expression */
f
=
(
uInt
)(
q
-
s
->
window
)
<
c
->
sub
.
copy
.
dist
?
s
->
end
-
(
c
->
sub
.
copy
.
dist
-
(
q
-
s
->
window
))
:
q
-
c
->
sub
.
copy
.
dist
;
#else
f
=
q
-
c
->
sub
.
copy
.
dist
;
f
=
q
-
c
->
sub
.
copy
.
dist
;
if
((
uInt
)(
q
-
s
->
window
)
<
c
->
sub
.
copy
.
dist
)
while
(
f
<
s
->
window
)
/* modulo window size-"while" instead */
f
=
s
->
end
-
(
c
->
sub
.
copy
.
dist
-
(
uInt
)(
q
-
s
->
window
));
f
+=
s
->
end
-
s
->
window
;
/* of "if" handles invalid distances */
#endif
while
(
c
->
len
)
while
(
c
->
len
)
{
{
NEEDOUT
NEEDOUT
...
...
zlib/infcodes.h
View file @
e1b56469
/* infcodes.h -- header to use infcodes.c
/* infcodes.h -- header to use infcodes.c
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
...
zlib/inffast.c
View file @
e1b56469
/* inffast.c -- process literals and length/distance pairs fast
/* inffast.c -- process literals and length/distance pairs fast
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
@@ -93,28 +93,41 @@ z_streamp z;
...
@@ -93,28 +93,41 @@ z_streamp z;
/* do the copy */
/* do the copy */
m
-=
c
;
m
-=
c
;
if
((
uInt
)(
q
-
s
->
window
)
>=
d
)
/* offset before dest */
r
=
q
-
d
;
{
/* just copy */
if
(
r
<
s
->
window
)
/* wrap if needed */
r
=
q
-
d
;
*
q
++
=
*
r
++
;
c
--
;
/* minimum count is three, */
*
q
++
=
*
r
++
;
c
--
;
/* so unroll loop a little */
}
else
/* else offset after destination */
{
{
e
=
d
-
(
uInt
)(
q
-
s
->
window
);
/* bytes from offset to end */
do
{
r
=
s
->
end
-
e
;
/* pointer to offset */
r
+=
s
->
end
-
s
->
window
;
/* force pointer in window */
if
(
c
>
e
)
/* if source crosses, */
}
while
(
r
<
s
->
window
);
/* covers invalid distances */
e
=
s
->
end
-
r
;
if
(
c
>
e
)
{
{
c
-=
e
;
/* copy to end of window
*/
c
-=
e
;
/* wrapped copy
*/
do
{
do
{
*
q
++
=
*
r
++
;
*
q
++
=
*
r
++
;
}
while
(
--
e
);
}
while
(
--
e
);
r
=
s
->
window
;
/* copy rest from start of window */
r
=
s
->
window
;
do
{
*
q
++
=
*
r
++
;
}
while
(
--
c
);
}
}
else
/* normal copy */
{
*
q
++
=
*
r
++
;
c
--
;
*
q
++
=
*
r
++
;
c
--
;
do
{
*
q
++
=
*
r
++
;
}
while
(
--
c
);
}
}
else
/* normal copy */
{
*
q
++
=
*
r
++
;
c
--
;
*
q
++
=
*
r
++
;
c
--
;
do
{
*
q
++
=
*
r
++
;
}
while
(
--
c
);
}
}
do
{
/* copy all or what's left */
*
q
++
=
*
r
++
;
}
while
(
--
c
);
break
;
break
;
}
}
else
if
((
e
&
64
)
==
0
)
else
if
((
e
&
64
)
==
0
)
...
...
zlib/inffast.h
View file @
e1b56469
/* inffast.h -- header to use inffast.c
/* inffast.h -- header to use inffast.c
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
...
zlib/inflate.c
View file @
e1b56469
/* inflate.c -- zlib interface to inflate modules
/* inflate.c -- zlib interface to inflate modules
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
...
zlib/inftrees.c
View file @
e1b56469
/* inftrees.c -- generate Huffman trees for efficient decoding
/* inftrees.c -- generate Huffman trees for efficient decoding
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#endif
#endif
const
char
inflate_copyright
[]
=
const
char
inflate_copyright
[]
=
" inflate 1.1.
3 Copyright 1995-1998
Mark Adler "
;
" inflate 1.1.
4 Copyright 1995-2002
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
...
@@ -104,8 +104,7 @@ uIntf *v; /* working area: values in order of bit length */
...
@@ -104,8 +104,7 @@ uIntf *v; /* working area: values in order of bit length */
/* Given a list of code lengths and a maximum table size, make a set of
/* Given a list of code lengths and a maximum table size, make a set of
tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
if the given code set is incomplete (the tables are still built in this
if the given code set is incomplete (the tables are still built in this
case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of
case), or Z_DATA_ERROR if the input is invalid. */
lengths), or Z_MEM_ERROR if not enough memory. */
{
{
uInt
a
;
/* counter for codes of length k */
uInt
a
;
/* counter for codes of length k */
...
@@ -231,7 +230,7 @@ uIntf *v; /* working area: values in order of bit length */
...
@@ -231,7 +230,7 @@ uIntf *v; /* working area: values in order of bit length */
/* allocate new table */
/* allocate new table */
if
(
*
hn
+
z
>
MANY
)
/* (note: doesn't matter for fixed) */
if
(
*
hn
+
z
>
MANY
)
/* (note: doesn't matter for fixed) */
return
Z_
MEM_ERROR
;
/* not enough memory
*/
return
Z_
DATA_ERROR
;
/* overflow of MANY
*/
u
[
h
]
=
q
=
hp
+
*
hn
;
u
[
h
]
=
q
=
hp
+
*
hn
;
*
hn
+=
z
;
*
hn
+=
z
;
...
...
zlib/inftrees.h
View file @
e1b56469
/* inftrees.h -- header to use inftrees.c
/* inftrees.h -- header to use inftrees.c
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
...
zlib/infutil.c
View file @
e1b56469
/* inflate_util.c -- data and routines common to blocks and codes
/* inflate_util.c -- data and routines common to blocks and codes
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
...
zlib/infutil.h
View file @
e1b56469
/* infutil.h -- types and macros common to blocks and codes
/* infutil.h -- types and macros common to blocks and codes
* Copyright (C) 1995-
1998
Mark Adler
* Copyright (C) 1995-
2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
...
zlib/maketree.c
View file @
e1b56469
/* maketree.c -- make inffixed.h table for decoding fixed codes
/* maketree.c -- make inffixed.h table for decoding fixed codes
* Copyright (C) 199
8
Mark Adler
* Copyright (C) 199
5-2002
Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
...
zlib/minigzip.c
View file @
e1b56469
/* minigzip.c -- simulate gzip using the zlib compression library
/* minigzip.c -- simulate gzip using the zlib compression library
* Copyright (C) 1995-
1998
Jean-loup Gailly.
* Copyright (C) 1995-
2002
Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* or in pipe mode.
* or in pipe mode.
*/
*/
/* @(#) $Id: minigzip.c,v 1.1
1999/05/04 19:30:27
tromey Exp $ */
/* @(#) $Id: minigzip.c,v 1.1
.1.2 2002/03/11 21:53:26
tromey Exp $ */
#include <stdio.h>
#include <stdio.h>
#include "zlib.h"
#include "zlib.h"
...
...
zlib/trees.c
View file @
e1b56469
/* trees.c -- output deflated data using Huffman coding
/* trees.c -- output deflated data using Huffman coding
* Copyright (C) 1995-
1998
Jean-loup Gailly
* Copyright (C) 1995-
2002
Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
* Addison-Wesley, 1983. ISBN 0-201-06672-6.
* Addison-Wesley, 1983. ISBN 0-201-06672-6.
*/
*/
/* @(#) $Id: trees.c,v 1.1
1999/05/04 19:30
:27 tromey Exp $ */
/* @(#) $Id: trees.c,v 1.1
.1.2 2002/03/11 21:53
:27 tromey Exp $ */
/* #define GEN_TREES_H */
/* #define GEN_TREES_H */
...
...
zlib/uncompr.c
View file @
e1b56469
/* uncompr.c -- decompress a memory buffer
/* uncompr.c -- decompress a memory buffer
* Copyright (C) 1995-
1998
Jean-loup Gailly.
* Copyright (C) 1995-
2002
Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
/* @(#) $Id: uncompr.c,v 1.1
1999/05/04 19:30
:27 tromey Exp $ */
/* @(#) $Id: uncompr.c,v 1.1
.1.2 2002/03/11 21:53
:27 tromey Exp $ */
#include "zlib.h"
#include "zlib.h"
...
...
zlib/zconf.h
View file @
e1b56469
/* zconf.h -- configuration of the zlib compression library
/* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-
1998
Jean-loup Gailly.
* Copyright (C) 1995-
2002
Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
/* @(#) $Id: zconf.h,v 1.1
1999/05/04 19:30
:27 tromey Exp $ */
/* @(#) $Id: zconf.h,v 1.1
.1.2 2002/03/11 21:53
:27 tromey Exp $ */
#ifndef _ZCONF_H
#ifndef _ZCONF_H
#define _ZCONF_H
#define _ZCONF_H
...
...
zlib/zlib.3
View file @
e1b56469
.TH ZLIB 3 "
9 July 1998
"
.TH ZLIB 3 "
11 March 2002
"
.SH NAME
.SH NAME
zlib \- compression/decompression library
zlib \- compression/decompression library
.SH SYNOPSIS
.SH SYNOPSIS
...
@@ -81,8 +81,8 @@ These documents are also available in other formats from:
...
@@ -81,8 +81,8 @@ These documents are also available in other formats from:
.IP
.IP
ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
.SH AUTHORS
.SH AUTHORS
Version 1.1.
3
Version 1.1.
4
Copyright (C) 1995-
1998
Jean-loup Gailly (jloup@gzip.org)
Copyright (C) 1995-
2002
Jean-loup Gailly (jloup@gzip.org)
and Mark Adler (madler@alumni.caltech.edu).
and Mark Adler (madler@alumni.caltech.edu).
.LP
.LP
This software is provided "as-is,"
This software is provided "as-is,"
...
...
zlib/zlib.h
View file @
e1b56469
/* zlib.h -- interface of the 'zlib' general purpose compression library
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.1.
3, July 9th, 1998
version 1.1.
4, March 11th, 2002
Copyright (C) 1995-
1998
Jean-loup Gailly and Mark Adler
Copyright (C) 1995-
2002
Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
warranty. In no event will the authors be held liable for any damages
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
#define ZLIB_VERSION "1.1.
3
"
#define ZLIB_VERSION "1.1.
4
"
/*
/*
The 'zlib' compression library provides in-memory compression and
The 'zlib' compression library provides in-memory compression and
...
...
zlib/zutil.c
View file @
e1b56469
/* zutil.c -- target dependent utility functions for the compression library
/* zutil.c -- target dependent utility functions for the compression library
* Copyright (C) 1995-
1998
Jean-loup Gailly.
* Copyright (C) 1995-
2002
Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
/* @(#) $Id: zutil.c,v 1.1
1999/05/04 19:30
:27 tromey Exp $ */
/* @(#) $Id: zutil.c,v 1.1
.1.2 2002/03/11 21:53
:27 tromey Exp $ */
#include "zutil.h"
#include "zutil.h"
...
...
zlib/zutil.h
View file @
e1b56469
/* zutil.h -- internal interface and configuration of the compression library
/* zutil.h -- internal interface and configuration of the compression library
* Copyright (C) 1995-
1998
Jean-loup Gailly.
* Copyright (C) 1995-
2002
Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in zlib.h
*/
*/
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
subject to change. Applications should only use zlib.h.
subject to change. Applications should only use zlib.h.
*/
*/
/* @(#) $Id: zutil.h,v 1.1
1999/05/04 19:30:27
tromey Exp $ */
/* @(#) $Id: zutil.h,v 1.1
.1.2 2002/03/11 21:53:28
tromey Exp $ */
#ifndef _Z_UTIL_H
#ifndef _Z_UTIL_H
#define _Z_UTIL_H
#define _Z_UTIL_H
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment