summaryrefslogtreecommitdiffstats
path: root/cpukit/zlib/contrib/infback9
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-03-18 10:10:55 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-03-18 10:10:55 +0000
commit8198f694f52b6a6284069a37b44bcce5847acdf2 (patch)
tree37d98345fa38b6c25ca6e1b0658ffd45c31cbfcd /cpukit/zlib/contrib/infback9
parentImport from zlib-1.2.5 (diff)
downloadrtems-8198f694f52b6a6284069a37b44bcce5847acdf2.tar.bz2
Import zlib-1.2.3
Diffstat (limited to 'cpukit/zlib/contrib/infback9')
-rw-r--r--cpukit/zlib/contrib/infback9/infback9.h8
-rw-r--r--cpukit/zlib/contrib/infback9/inftree9.c8
-rw-r--r--cpukit/zlib/contrib/infback9/inftree9.h8
3 files changed, 16 insertions, 8 deletions
diff --git a/cpukit/zlib/contrib/infback9/infback9.h b/cpukit/zlib/contrib/infback9/infback9.h
index 10bf58c368..1073c0a38e 100644
--- a/cpukit/zlib/contrib/infback9/infback9.h
+++ b/cpukit/zlib/contrib/infback9/infback9.h
@@ -16,6 +16,10 @@
* zlib.h must be included before this header file.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm,
in_func in, void FAR *in_desc,
out_func out, void FAR *out_desc));
@@ -27,3 +31,7 @@ ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm,
#define inflateBack9Init(strm, window) \
inflateBack9Init_((strm), (window), \
ZLIB_VERSION, sizeof(z_stream))
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/cpukit/zlib/contrib/infback9/inftree9.c b/cpukit/zlib/contrib/infback9/inftree9.c
index 29bef6ab99..0993f75646 100644
--- a/cpukit/zlib/contrib/infback9/inftree9.c
+++ b/cpukit/zlib/contrib/infback9/inftree9.c
@@ -1,5 +1,5 @@
/* inftree9.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2003 Mark Adler
+ * Copyright (C) 1995-2005 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -9,7 +9,7 @@
#define MAXBITS 15
const char inflate9_copyright[] =
- " inflate9 1.2.2.2 Copyright 1995-2004 Mark Adler ";
+ " inflate9 1.2.3 Copyright 1995-2005 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
@@ -64,7 +64,7 @@ unsigned short FAR *work;
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
- 133, 133, 133, 133, 144, 72, 199};
+ 133, 133, 133, 133, 144, 201, 196};
static const unsigned short dbase[32] = { /* Distance codes 0..31 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,
@@ -128,7 +128,7 @@ unsigned short FAR *work;
left -= count[len];
if (left < 0) return -1; /* over-subscribed */
}
- if (left > 0 && (type == CODES || (codes - count[0] != 1)))
+ if (left > 0 && (type == CODES || max != 1))
return -1; /* incomplete set */
/* generate offsets into symbol table for each length for sorting */
diff --git a/cpukit/zlib/contrib/infback9/inftree9.h b/cpukit/zlib/contrib/infback9/inftree9.h
index 6a699a798f..a268084eea 100644
--- a/cpukit/zlib/contrib/infback9/inftree9.h
+++ b/cpukit/zlib/contrib/infback9/inftree9.h
@@ -36,12 +36,12 @@ typedef struct {
*/
/* Maximum size of dynamic tree. The maximum found in a long but non-
- exhaustive search was 1004 code structures (850 for length/literals
- and 154 for distances, the latter actually the result of an
+ exhaustive search was 1444 code structures (852 for length/literals
+ and 592 for distances, the latter actually the result of an
exhaustive search). The true maximum is not known, but the value
below is more than safe. */
-#define ENOUGH 1440
-#define MAXD 154
+#define ENOUGH 2048
+#define MAXD 592
/* Type of code to build for inftable() */
typedef enum {