diff options
author | Tom Tromey <tromey@gcc.gnu.org> | 2005-09-12 17:04:02 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2005-09-12 17:04:02 +0000 |
commit | 3ec980b182de950223663d4a3ef65177fa887501 (patch) | |
tree | 253197a1e98aea7fe0dd20a442e82f1f30007b5a /zlib/contrib/infback9 | |
parent | 303ae446cf2ab1469d83e83f4cc5168c899c3cee (diff) | |
download | gcc-3ec980b182de950223663d4a3ef65177fa887501.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r104181,
which included commits to RCS files with non-trunk default branches.
From-SVN: r104182
Diffstat (limited to 'zlib/contrib/infback9')
-rw-r--r-- | zlib/contrib/infback9/infback9.c | 3 | ||||
-rw-r--r-- | zlib/contrib/infback9/infback9.h | 8 | ||||
-rw-r--r-- | zlib/contrib/infback9/inftree9.c | 8 | ||||
-rw-r--r-- | zlib/contrib/infback9/inftree9.h | 8 |
4 files changed, 19 insertions, 8 deletions
diff --git a/zlib/contrib/infback9/infback9.c b/zlib/contrib/infback9/infback9.c index 34a95fc0dac..f5ddde67da6 100644 --- a/zlib/contrib/infback9/infback9.c +++ b/zlib/contrib/infback9/infback9.c @@ -430,6 +430,9 @@ void FAR *out_desc; } } + /* handle error breaks in while */ + if (mode == BAD) break; + /* build code tables */ state->next = state->codes; lencode = (code const FAR *)(state->next); diff --git a/zlib/contrib/infback9/infback9.h b/zlib/contrib/infback9/infback9.h index 10bf58c368e..1073c0a38e6 100644 --- a/zlib/contrib/infback9/infback9.h +++ b/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/zlib/contrib/infback9/inftree9.c b/zlib/contrib/infback9/inftree9.c index fe76a1b1cd8..0993f75646c 100644 --- a/zlib/contrib/infback9/inftree9.c +++ b/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.1 Copyright 1995-2003 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, 76, 66}; + 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/zlib/contrib/infback9/inftree9.h b/zlib/contrib/infback9/inftree9.h index 6a699a798f5..a268084eea6 100644 --- a/zlib/contrib/infback9/inftree9.h +++ b/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 { |