summaryrefslogtreecommitdiff
path: root/cpan/Compress-Raw-Zlib
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-05-27 22:53:30 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-05-27 22:53:30 +0100
commit1cae22935619e1afdd20b077ec901cbee90536d7 (patch)
tree1d1e47c37f6c5017bb9e3aebd4e66ddb5fc809f2 /cpan/Compress-Raw-Zlib
parent3383dc2c38271fef318bd4d8d6f10c0ea537aceb (diff)
downloadperl-1cae22935619e1afdd20b077ec901cbee90536d7.tar.gz
Update Compress-Raw-Zlib to CPAN version 2.061
[DELTA] 2.061 19 May 2013 * Include zlib 1.2.8 source. * typo fix [#85431] * silence compiler warning by making 2nd parameter to DispStream a const char*
Diffstat (limited to 'cpan/Compress-Raw-Zlib')
-rw-r--r--cpan/Compress-Raw-Zlib/Changes10
-rw-r--r--cpan/Compress-Raw-Zlib/README18
-rw-r--r--cpan/Compress-Raw-Zlib/Zlib.xs14
-rw-r--r--cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm2
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/compress.c2
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/deflate.c12
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/deflate.h2
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/infback.c2
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/inffast.c6
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/inflate.c62
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/inftrees.c14
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/trees.c14
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/uncompr.c2
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/zconf.h31
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/zlib.h48
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/zutil.c22
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/zutil.h9
17 files changed, 166 insertions, 104 deletions
diff --git a/cpan/Compress-Raw-Zlib/Changes b/cpan/Compress-Raw-Zlib/Changes
index 99424de47b..8ab5fec082 100644
--- a/cpan/Compress-Raw-Zlib/Changes
+++ b/cpan/Compress-Raw-Zlib/Changes
@@ -1,6 +1,16 @@
CHANGES
-------
+ 2.061 19 May 2013
+
+ * Include zlib 1.2.8 source.
+
+ * typo fix
+ [#85431]
+
+ * silence compiler warning by making 2nd parameter to
+ DispStream a const char*
+
2.060 7 January 2013
* Mention SimpleZip in POD
diff --git a/cpan/Compress-Raw-Zlib/README b/cpan/Compress-Raw-Zlib/README
index 37a3f1ce8d..28522d755c 100644
--- a/cpan/Compress-Raw-Zlib/README
+++ b/cpan/Compress-Raw-Zlib/README
@@ -1,16 +1,16 @@
Compress-Raw-Zlib
- Version 2.060
+ Version 2.061
- 7th January 2013
+ 19th May 2013
Copyright (c) 2005-2013 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
The directory zlib-src contains a subset of the
- source files copied directly from zlib version 1.2.7.
+ source files copied directly from zlib version 1.2.8.
These files are Copyright(C) 1995-2012
Jean-loup Gailly and Mark Adler.
Full source for the zlib library is available at
@@ -99,16 +99,16 @@ before building this module.
For option 2, fetch a copy of the zlib source distribution from
http://www.zlib.org and unpack it into the Compress-Raw-Zlib source
- directory. Assuming you have fetched zlib 1.2.7,
- it will create a directory called zlib-1.2.7.
+ directory. Assuming you have fetched zlib 1.2.8,
+ it will create a directory called zlib-1.2.8.
Now set the variables in the file config.in as follows (if the version
- you have fetched isn't 1.2.7, change the INCLUDE and LIB
+ you have fetched isn't 1.2.8, change the INCLUDE and LIB
variables appropriately):
BUILD_ZLIB = True
- INCLUDE = ./zlib-1.2.7
- LIB = ./zlib-1.2.7
+ INCLUDE = ./zlib-1.2.8
+ LIB = ./zlib-1.2.8
OLD_ZLIB = False
GZIP_OS_CODE = AUTO_DETECT
@@ -355,7 +355,7 @@ To help me help you, I need all of the following information:
If you haven't installed Compress-Raw-Zlib then search Compress::Raw::Zlib.pm
for a line like this:
- $VERSION = "2.060" ;
+ $VERSION = "2.061" ;
c. The version of zlib you have used.
If you have successfully installed Compress-Raw-Zlib, this one-liner
diff --git a/cpan/Compress-Raw-Zlib/Zlib.xs b/cpan/Compress-Raw-Zlib/Zlib.xs
index 1812230474..9751a2e1d5 100644
--- a/cpan/Compress-Raw-Zlib/Zlib.xs
+++ b/cpan/Compress-Raw-Zlib/Zlib.xs
@@ -70,6 +70,10 @@
# define AT_LEAST_ZLIB_1_2_5_2
#endif
+#if defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1280
+# define AT_LEAST_ZLIB_1_2_8
+#endif
+
#ifdef USE_PPPORT_H
# define NEED_sv_2pvbyte
# define NEED_sv_2pv_nolen
@@ -417,11 +421,11 @@ DispHex(ptr, length)
static void
#ifdef CAN_PROTOTYPE
-DispStream(di_stream * s, char * message)
+DispStream(di_stream * s, const char * message)
#else
DispStream(s, message)
di_stream * s;
- char * message;
+ const char * message;
#endif
{
@@ -911,7 +915,7 @@ MODULE = Compress::Raw::Zlib PACKAGE = Compress::Raw::Zlib::deflateStream
void
DispStream(s, message=NULL)
Compress::Raw::Zlib::deflateStream s
- char * message
+ const char * message
DualType
deflateReset(s)
@@ -1333,7 +1337,7 @@ MODULE = Compress::Raw::Zlib PACKAGE = Compress::Raw::Zlib::inflateStream
void
DispStream(s, message=NULL)
Compress::Raw::Zlib::inflateStream s
- char * message
+ const char * message
DualType
inflateReset(s)
@@ -1707,7 +1711,7 @@ DESTROY(s)
void
DispStream(s, message=NULL)
Compress::Raw::Zlib::inflateScanStream s
- char * message
+ const char * message
DualType
inflateReset(s)
diff --git a/cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm b/cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm
index acf599daa2..59f1ee2ad4 100644
--- a/cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm
+++ b/cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm
@@ -11,7 +11,7 @@ use warnings ;
use bytes ;
our ($VERSION, $XS_VERSION, @ISA, @EXPORT, %EXPORT_TAGS, @EXPORT_OK, $AUTOLOAD, %DEFLATE_CONSTANTS, @DEFLATE_CONSTANTS );
-$VERSION = '2.060';
+$VERSION = '2.061';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/compress.c b/cpan/Compress-Raw-Zlib/zlib-src/compress.c
index 1cb602b92e..0314fbc61a 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/compress.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/compress.c
@@ -29,7 +29,7 @@ int ZEXPORT compress2 (
z_stream stream;
int err;
- stream.next_in = (Bytef*)source;
+ stream.next_in = (z_const Bytef *)source;
stream.avail_in = (uInt)sourceLen;
#ifdef MAXSEG_64K
/* Check for source > 64K on 16-bit machine: */
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/deflate.c b/cpan/Compress-Raw-Zlib/zlib-src/deflate.c
index c15d5e7f51..e001a058b2 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/deflate.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/deflate.c
@@ -1,5 +1,5 @@
/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler
+ * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -52,7 +52,7 @@
#include "deflate.h"
const char deflate_copyright[] =
- " deflate 1.2.7 Copyright 1995-2012 Jean-loup Gailly and Mark Adler ";
+ " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and 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
@@ -304,7 +304,7 @@ int ZEXPORT deflateInit2_(
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
s->pending_buf == Z_NULL) {
s->status = FINISH_STATE;
- strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
+ strm->msg = ERR_MSG(Z_MEM_ERROR);
deflateEnd (strm);
return Z_MEM_ERROR;
}
@@ -328,7 +328,7 @@ int ZEXPORT deflateSetDictionary (
uInt str, n;
int wrap;
unsigned avail;
- unsigned char *next;
+ z_const unsigned char *next;
if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL)
return Z_STREAM_ERROR;
@@ -358,7 +358,7 @@ int ZEXPORT deflateSetDictionary (
avail = strm->avail_in;
next = strm->next_in;
strm->avail_in = dictLength;
- strm->next_in = (Bytef *)dictionary;
+ strm->next_in = (z_const Bytef *)dictionary;
fill_window(s);
while (s->lookahead >= MIN_MATCH) {
str = s->strstart;
@@ -512,6 +512,8 @@ int ZEXPORT deflateParams(
strm->total_in != 0) {
/* Flush the last buffer: */
err = deflate(strm, Z_BLOCK);
+ if (err == Z_BUF_ERROR && s->pending == 0)
+ err = Z_OK;
}
if (s->level != level) {
s->level = level;
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/deflate.h b/cpan/Compress-Raw-Zlib/zlib-src/deflate.h
index fbac44d908..ce0299edd1 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/deflate.h
+++ b/cpan/Compress-Raw-Zlib/zlib-src/deflate.h
@@ -104,7 +104,7 @@ typedef struct internal_state {
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
gz_headerp gzhead; /* gzip header information to write */
uInt gzindex; /* where in extra, name, or comment */
- Byte method; /* STORED (for zip only) or DEFLATED */
+ Byte method; /* can only be DEFLATED */
int last_flush; /* value of flush param for previous deflate call */
/* used by deflate.c: */
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/infback.c b/cpan/Compress-Raw-Zlib/zlib-src/infback.c
index 60f78dc982..cff17ee2f6 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/infback.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/infback.c
@@ -255,7 +255,7 @@ int ZEXPORT inflateBack(
void FAR *out_desc)
{
struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
+ z_const unsigned char FAR *next; /* next input */
unsigned char FAR *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/inffast.c b/cpan/Compress-Raw-Zlib/zlib-src/inffast.c
index 155dcc7bde..436b0b2bf6 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/inffast.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/inffast.c
@@ -1,5 +1,5 @@
/* inffast.c -- fast decoding
- * Copyright (C) 1995-2008, 2010 Mark Adler
+ * Copyright (C) 1995-2008, 2010, 2013 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -69,8 +69,8 @@ void ZLIB_INTERNAL inflate_fast(
unsigned start)
{
struct inflate_state FAR *state;
- unsigned char FAR *in; /* local strm->next_in */
- unsigned char FAR *last; /* while in < last, enough input available */
+ z_const unsigned char FAR *in; /* local strm->next_in */
+ z_const unsigned char FAR *last; /* have enough input while in < last */
unsigned char FAR *out; /* local strm->next_out */
unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
unsigned char FAR *end; /* while out < end, enough space available */
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/inflate.c b/cpan/Compress-Raw-Zlib/zlib-src/inflate.c
index 77b2de8907..c8dca0b08f 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/inflate.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/inflate.c
@@ -93,11 +93,12 @@
/* function prototypes */
local void fixedtables OF((struct inflate_state FAR *state));
-local int updatewindow OF((z_streamp strm, unsigned out));
+local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
+ unsigned copy));
#ifdef BUILDFIXED
void makefixed OF((void));
#endif
-local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
+local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
unsigned len));
int ZEXPORT inflateResetKeep(
@@ -377,10 +378,11 @@ void makefixed()
*/
local int updatewindow(
z_streamp strm,
- unsigned out)
+ const Bytef *end,
+ unsigned copy)
{
struct inflate_state FAR *state;
- unsigned copy, dist;
+ unsigned dist;
state = (struct inflate_state FAR *)strm->state;
@@ -400,19 +402,18 @@ local int updatewindow(
}
/* copy state->wsize or less output bytes into the circular window */
- copy = out - strm->avail_out;
if (copy >= state->wsize) {
- zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
+ zmemcpy(state->window, end - state->wsize, state->wsize);
state->wnext = 0;
state->whave = state->wsize;
}
else {
dist = state->wsize - state->wnext;
if (dist > copy) dist = copy;
- zmemcpy(state->window + state->wnext, strm->next_out - copy, dist);
+ zmemcpy(state->window + state->wnext, end - copy, dist);
copy -= dist;
if (copy) {
- zmemcpy(state->window, strm->next_out - copy, copy);
+ zmemcpy(state->window, end - copy, copy);
state->wnext = copy;
state->whave = state->wsize;
}
@@ -606,7 +607,7 @@ int ZEXPORT inflate(
int flush)
{
struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
+ z_const unsigned char FAR *next; /* next input */
unsigned char FAR *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
@@ -920,7 +921,7 @@ int ZEXPORT inflate(
while (state->have < 19)
state->lens[order[state->have++]] = 0;
state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
+ state->lencode = (const code FAR *)(state->next);
state->lenbits = 7;
ret = inflate_table(CODES, state->lens, 19, &(state->next),
&(state->lenbits), state->work);
@@ -994,7 +995,7 @@ int ZEXPORT inflate(
values here (9 and 6) without reading the comments in inftrees.h
concerning the ENOUGH constants, which depend on those values */
state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
+ state->lencode = (const code FAR *)(state->next);
state->lenbits = 9;
ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
&(state->lenbits), state->work);
@@ -1003,7 +1004,7 @@ int ZEXPORT inflate(
state->mode = BAD;
break;
}
- state->distcode = (code const FAR *)(state->next);
+ state->distcode = (const code FAR *)(state->next);
state->distbits = 6;
ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
&(state->next), &(state->distbits), state->work);
@@ -1230,7 +1231,7 @@ int ZEXPORT inflate(
RESTORE();
if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
(state->mode < CHECK || flush != Z_FINISH)))
- if (updatewindow(strm, out)) {
+ if (updatewindow(strm, strm->next_out, out - strm->avail_out)) {
state->mode = MEM;
return Z_MEM_ERROR;
}
@@ -1264,6 +1265,29 @@ int ZEXPORT inflateEnd(
return Z_OK;
}
+int ZEXPORT inflateGetDictionary(
+ z_streamp strm,
+ Bytef *dictionary,
+ uInt *dictLength)
+{
+ struct inflate_state FAR *state;
+
+ /* check state */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+
+ /* copy dictionary */
+ if (state->whave && dictionary != Z_NULL) {
+ zmemcpy(dictionary, state->window + state->wnext,
+ state->whave - state->wnext);
+ zmemcpy(dictionary + state->whave - state->wnext,
+ state->window, state->wnext);
+ }
+ if (dictLength != Z_NULL)
+ *dictLength = state->whave;
+ return Z_OK;
+}
+
int ZEXPORT inflateSetDictionary(
z_streamp strm,
const Bytef *dictionary,
@@ -1271,8 +1295,6 @@ int ZEXPORT inflateSetDictionary(
{
struct inflate_state FAR *state;
unsigned long dictid;
- unsigned char *next;
- unsigned avail;
int ret;
/* check state */
@@ -1291,13 +1313,7 @@ int ZEXPORT inflateSetDictionary(
/* copy dictionary to window using updatewindow(), which will amend the
existing dictionary if appropriate */
- next = strm->next_out;
- avail = strm->avail_out;
- strm->next_out = (Bytef *)dictionary + dictLength;
- strm->avail_out = 0;
- ret = updatewindow(strm, dictLength);
- strm->avail_out = avail;
- strm->next_out = next;
+ ret = updatewindow(strm, dictionary + dictLength, dictLength);
if (ret) {
state->mode = MEM;
return Z_MEM_ERROR;
@@ -1337,7 +1353,7 @@ int ZEXPORT inflateGetHeader(
*/
local unsigned syncsearch(
unsigned FAR *have,
- unsigned char FAR *buf,
+ const unsigned char FAR *buf,
unsigned len)
{
unsigned got;
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/inftrees.c b/cpan/Compress-Raw-Zlib/zlib-src/inftrees.c
index ed1082dc3b..039222a952 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/inftrees.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/inftrees.c
@@ -1,5 +1,5 @@
/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2012 Mark Adler
+ * Copyright (C) 1995-2013 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.7 Copyright 1995-2012 Mark Adler ";
+ " inflate 1.2.8 Copyright 1995-2013 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 @@ int ZLIB_INTERNAL inflate_table(
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, 78, 68};
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78};
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,
@@ -208,8 +208,8 @@ int ZLIB_INTERNAL inflate_table(
mask = used - 1; /* mask for comparing low */
/* check available table space */
- if ((type == LENS && used >= ENOUGH_LENS) ||
- (type == DISTS && used >= ENOUGH_DISTS))
+ if ((type == LENS && used > ENOUGH_LENS) ||
+ (type == DISTS && used > ENOUGH_DISTS))
return 1;
/* process all codes and make table entries */
@@ -277,8 +277,8 @@ int ZLIB_INTERNAL inflate_table(
/* check for enough space */
used += 1U << curr;
- if ((type == LENS && used >= ENOUGH_LENS) ||
- (type == DISTS && used >= ENOUGH_DISTS))
+ if ((type == LENS && used > ENOUGH_LENS) ||
+ (type == DISTS && used > ENOUGH_DISTS))
return 1;
/* point entry in root table to sub-table */
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/trees.c b/cpan/Compress-Raw-Zlib/zlib-src/trees.c
index de0b7f210c..9dbd905e1d 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/trees.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/trees.c
@@ -146,8 +146,8 @@ local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
local int build_bl_tree OF((deflate_state *s));
local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
int blcodes));
-local void compress_block OF((deflate_state *s, ct_data *ltree,
- ct_data *dtree));
+local void compress_block OF((deflate_state *s, const ct_data *ltree,
+ const ct_data *dtree));
local int detect_data_type OF((deflate_state *s));
local unsigned bi_reverse OF((unsigned value, int length));
local void bi_windup OF((deflate_state *s));
@@ -974,7 +974,8 @@ void ZLIB_INTERNAL _tr_flush_block(
} else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
#endif
send_bits(s, (STATIC_TREES<<1)+last, 3);
- compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
+ compress_block(s, (const ct_data *)static_ltree,
+ (const ct_data *)static_dtree);
#ifdef DEBUG
s->compressed_len += 3 + s->static_len;
#endif
@@ -982,7 +983,8 @@ void ZLIB_INTERNAL _tr_flush_block(
send_bits(s, (DYN_TREES<<1)+last, 3);
send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
max_blindex+1);
- compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
+ compress_block(s, (const ct_data *)s->dyn_ltree,
+ (const ct_data *)s->dyn_dtree);
#ifdef DEBUG
s->compressed_len += 3 + s->opt_len;
#endif
@@ -1059,8 +1061,8 @@ int ZLIB_INTERNAL _tr_tally (
*/
local void compress_block(
deflate_state *s,
- ct_data *ltree,
- ct_data *dtree)
+ const ct_data *ltree,
+ const ct_data *dtree)
{
unsigned dist; /* distance of matched string */
int lc; /* match length or unmatched char (if dist == 0) */
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/uncompr.c b/cpan/Compress-Raw-Zlib/zlib-src/uncompr.c
index 9b272e983f..d3cb8fe183 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/uncompr.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/uncompr.c
@@ -30,7 +30,7 @@ int ZEXPORT uncompress (
z_stream stream;
int err;
- stream.next_in = (Bytef*)source;
+ stream.next_in = (z_const Bytef *)source;
stream.avail_in = (uInt)sourceLen;
/* Check for source > 64K on 16-bit machine: */
if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/zconf.h b/cpan/Compress-Raw-Zlib/zlib-src/zconf.h
index 69c6370bc9..9987a77553 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/zconf.h
+++ b/cpan/Compress-Raw-Zlib/zlib-src/zconf.h
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2012 Jean-loup Gailly.
+ * Copyright (C) 1995-2013 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -21,6 +21,7 @@
# define _dist_code z__dist_code
# define _length_code z__length_code
# define _tr_align z__tr_align
+# define _tr_flush_bits z__tr_flush_bits
# define _tr_flush_block z__tr_flush_block
# define _tr_init z__tr_init
# define _tr_stored_block z__tr_stored_block
@@ -77,6 +78,7 @@
# define gzopen_w z_gzopen_w
# endif
# define gzprintf z_gzprintf
+# define gzvprintf z_gzvprintf
# define gzputc z_gzputc
# define gzputs z_gzputs
# define gzread z_gzread
@@ -103,6 +105,7 @@
# define inflateReset z_inflateReset
# define inflateReset2 z_inflateReset2
# define inflateSetDictionary z_inflateSetDictionary
+# define inflateGetDictionary z_inflateGetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateUndermine z_inflateUndermine
@@ -388,20 +391,14 @@ typedef uLong FAR uLongf;
typedef Byte *voidp;
#endif
-/* ./configure may #define Z_U4 here */
-
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
# include <limits.h>
# if (UINT_MAX == 0xffffffffUL)
# define Z_U4 unsigned
-# else
-# if (ULONG_MAX == 0xffffffffUL)
-# define Z_U4 unsigned long
-# else
-# if (USHRT_MAX == 0xffffffffUL)
-# define Z_U4 unsigned short
-# endif
-# endif
+# elif (ULONG_MAX == 0xffffffffUL)
+# define Z_U4 unsigned long
+# elif (USHRT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned short
# endif
#endif
@@ -425,9 +422,15 @@ typedef uLong FAR uLongf;
# endif
#endif
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+# include <stdarg.h> /* for va_list */
+# endif
+#endif
+
#ifdef _WIN32
# ifndef Z_SOLO
-# include <stddef.h> /* for wchar_t */
+# include <stddef.h> /* for wchar_t */
# endif
#endif
@@ -437,7 +440,7 @@ typedef uLong FAR uLongf;
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
* equivalently requesting no 64-bit operations
*/
-#if defined(LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
+#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
# undef _LARGEFILE64_SOURCE
#endif
@@ -445,7 +448,7 @@ typedef uLong FAR uLongf;
# define Z_HAVE_UNISTD_H
#endif
#ifndef Z_SOLO
-# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE)
+# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
# ifdef VMS
# include <unixio.h> /* for off_t */
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/zlib.h b/cpan/Compress-Raw-Zlib/zlib-src/zlib.h
index 3edf3acdb5..3e0c7672ac 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/zlib.h
+++ b/cpan/Compress-Raw-Zlib/zlib-src/zlib.h
@@ -1,7 +1,7 @@
/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.2.7, May 2nd, 2012
+ version 1.2.8, April 28th, 2013
- Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler
+ Copyright (C) 1995-2013 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,11 +37,11 @@
extern "C" {
#endif
-#define ZLIB_VERSION "1.2.7"
-#define ZLIB_VERNUM 0x1270
+#define ZLIB_VERSION "1.2.8"
+#define ZLIB_VERNUM 0x1280
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 2
-#define ZLIB_VER_REVISION 7
+#define ZLIB_VER_REVISION 8
#define ZLIB_VER_SUBREVISION 0
/*
@@ -839,6 +839,21 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
inflate().
*/
+ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
+ Bytef *dictionary,
+ uInt *dictLength));
+/*
+ Returns the sliding dictionary being maintained by inflate. dictLength is
+ set to the number of bytes in the dictionary, and that many bytes are copied
+ to dictionary. dictionary must have enough space, where 32768 bytes is
+ always enough. If inflateGetDictionary() is called with dictionary equal to
+ Z_NULL, then only the dictionary length is returned, and nothing is copied.
+ Similary, if dictLength is Z_NULL, then it is not set.
+
+ inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
+ stream state is inconsistent.
+*/
+
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
/*
Skips invalid compressed data until a possible full flush point (see above
@@ -846,7 +861,7 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
available input is skipped. No output is provided.
inflateSync searches for a 00 00 FF FF pattern in the compressed data.
- All full flush points have this pattern, but not all occurences of this
+ All full flush points have this pattern, but not all occurrences of this
pattern are full flush points.
inflateSync returns Z_OK if a possible full flush point has been found,
@@ -1007,7 +1022,8 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
the version of the header file.
*/
-typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef unsigned (*in_func) OF((void FAR *,
+ z_const unsigned char FAR * FAR *));
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
@@ -1015,11 +1031,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
out_func out, void FAR *out_desc));
/*
inflateBack() does a raw inflate with a single call using a call-back
- interface for input and output. This is more efficient than inflate() for
- file i/o applications in that it avoids copying between the output and the
- sliding window by simply making the window itself the output buffer. This
- function trusts the application to not change the output buffer passed by
- the output function, at least until inflateBack() returns.
+ interface for input and output. This is potentially more efficient than
+ inflate() for file i/o applications, in that it avoids copying between the
+ output and the sliding window by simply making the window itself the output
+ buffer. inflate() can be faster on modern CPUs when used with large
+ buffers. inflateBack() trusts the application to not change the output
+ buffer passed by the output function, at least until inflateBack() returns.
inflateBackInit() must be called first to allocate the internal state
and to initialize the state with the user-provided window buffer.
@@ -1736,6 +1753,13 @@ ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
const char *mode));
#endif
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
+ const char *format,
+ va_list va));
+# endif
+#endif
#ifdef __cplusplus
}
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/zutil.c b/cpan/Compress-Raw-Zlib/zlib-src/zutil.c
index 6498287e3d..5688d4f7e2 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/zutil.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/zutil.c
@@ -14,17 +14,17 @@
struct internal_state {int dummy;}; /* for buggy compilers */
#endif
-const char * const z_errmsg[10] = {
-"need dictionary", /* Z_NEED_DICT 2 */
-"stream end", /* Z_STREAM_END 1 */
-"", /* Z_OK 0 */
-"file error", /* Z_ERRNO (-1) */
-"stream error", /* Z_STREAM_ERROR (-2) */
-"data error", /* Z_DATA_ERROR (-3) */
-"insufficient memory", /* Z_MEM_ERROR (-4) */
-"buffer error", /* Z_BUF_ERROR (-5) */
-"incompatible version",/* Z_VERSION_ERROR (-6) */
-""};
+z_const char * const z_errmsg[10] = {
+(char*)"need dictionary", /* Z_NEED_DICT 2 */
+(char*)"stream end", /* Z_STREAM_END 1 */
+(char*)"", /* Z_OK 0 */
+(char*)"file error", /* Z_ERRNO (-1) */
+(char*)"stream error", /* Z_STREAM_ERROR (-2) */
+(char*)"data error", /* Z_DATA_ERROR (-3) */
+(char*)"insufficient memory", /* Z_MEM_ERROR (-4) */
+(char*)"buffer error", /* Z_BUF_ERROR (-5) */
+(char*)"incompatible version",/* Z_VERSION_ERROR (-6) */
+(char*)""};
const char * ZEXPORT zlibVersion()
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/zutil.h b/cpan/Compress-Raw-Zlib/zlib-src/zutil.h
index 5d759c6463..0e7dfd96ba 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/zutil.h
+++ b/cpan/Compress-Raw-Zlib/zlib-src/zutil.h
@@ -1,5 +1,5 @@
/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2012 Jean-loup Gailly.
+ * Copyright (C) 1995-2013 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -48,13 +48,13 @@ typedef unsigned short ush;
typedef ush FAR ushf;
typedef unsigned long ulg;
-extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* (size given to avoid silly warnings with Visual C++) */
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
#define ERR_RETURN(strm,err) \
- return (strm->msg = (char*)ERR_MSG(err), (err))
+ return (strm->msg = ERR_MSG(err), (err))
/* To be used only when the state is known to be valid */
/* common constants */
@@ -172,7 +172,8 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#endif
/* provide prototypes for these when building zlib without LFS */
-#if !defined(_WIN32) && (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
+#if !defined(_WIN32) && \
+ (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
#endif