From 316b5f921440bcaaddbe503c6f64a73ce80b7d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 12 Apr 2008 09:30:47 +0000 Subject: [PATCH] updated bzip2 to 1.0.5 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24942 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/bzip2/LICENSE | 7 +++---- src/bin/bzip2/blocksort.c | 4 ++-- src/bin/bzip2/bzip2.c | 8 ++++---- src/bin/bzip2/bzip2.rdef | 6 +++--- src/bin/bzip2/bzip2recover.c | 6 +++--- src/bin/bzip2/bzlib.c | 7 ++++--- src/bin/bzip2/bzlib.h | 4 ++-- src/bin/bzip2/bzlib_private.h | 16 +++++++++++----- src/bin/bzip2/compress.c | 4 ++-- src/bin/bzip2/crctable.c | 4 ++-- src/bin/bzip2/decompress.c | 4 ++-- src/bin/bzip2/huffman.c | 4 ++-- src/bin/bzip2/randtable.c | 4 ++-- 13 files changed, 42 insertions(+), 36 deletions(-) diff --git a/src/bin/bzip2/LICENSE b/src/bin/bzip2/LICENSE index 4458e35bb5..f420cffb67 100644 --- a/src/bin/bzip2/LICENSE +++ b/src/bin/bzip2/LICENSE @@ -2,7 +2,7 @@ -------------------------------------------------------------------------- This program, "bzip2", the associated library "libbzip2", and all -documentation, are copyright (C) 1996-2006 Julian R Seward. All +documentation, are copyright (C) 1996-2007 Julian R Seward. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36,8 +36,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Julian Seward, Cambridge, UK. -jseward@bzip.org -bzip2/libbzip2 version 1.0.4 of 20 December 2006 +Julian Seward, jseward@bzip.org +bzip2/libbzip2 version 1.0.5 of 10 December 2007 -------------------------------------------------------------------------- diff --git a/src/bin/bzip2/blocksort.c b/src/bin/bzip2/blocksort.c index 8535c93c8d..bd2dec157f 100644 --- a/src/bin/bzip2/blocksort.c +++ b/src/bin/bzip2/blocksort.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/src/bin/bzip2/bzip2.c b/src/bin/bzip2/bzip2.c index 5fbae0ebe4..390410735b 100644 --- a/src/bin/bzip2/bzip2.c +++ b/src/bin/bzip2/bzip2.c @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -1605,11 +1605,11 @@ void license ( void ) "bzip2, a block-sorting file compressor. " "Version %s.\n" " \n" - " Copyright (C) 1996-2006 by Julian Seward.\n" + " Copyright (C) 1996-2007 by Julian Seward.\n" " \n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms set out in the LICENSE file, which is included\n" - " in the bzip2-1.0.4 source distribution.\n" + " in the bzip2-1.0.5 source distribution.\n" " \n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" diff --git a/src/bin/bzip2/bzip2.rdef b/src/bin/bzip2/bzip2.rdef index f5b9c1139d..45af30cafe 100644 --- a/src/bin/bzip2/bzip2.rdef +++ b/src/bin/bzip2/bzip2.rdef @@ -2,10 +2,10 @@ resource app_version { major = 1, middle = 0, - minor = 3, + minor = 5, variety = 5, internal = 0, - short_info = "1.03", - long_info = "1.03 ©2005 Julian R Seward" + short_info = "1.0.5", + long_info = "1.0.5 ©2007 Julian R Seward" }; diff --git a/src/bin/bzip2/bzip2recover.c b/src/bin/bzip2/bzip2recover.c index ffe60bc720..5f6d621809 100644 --- a/src/bin/bzip2/bzip2recover.c +++ b/src/bin/bzip2/bzip2recover.c @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -313,7 +313,7 @@ Int32 main ( Int32 argc, Char** argv ) inFileName[0] = outFileName[0] = 0; fprintf ( stderr, - "bzip2recover 1.0.4: extracts blocks from damaged .bz2 files.\n" ); + "bzip2recover 1.0.5: extracts blocks from damaged .bz2 files.\n" ); if (argc != 2) { fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", diff --git a/src/bin/bzip2/bzlib.c b/src/bin/bzip2/bzlib.c index 79c34a5400..ef86c91e69 100644 --- a/src/bin/bzip2/bzlib.c +++ b/src/bin/bzip2/bzlib.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -48,7 +48,7 @@ void BZ2_bz__AssertH__fail ( int errcode ) "component, you should also report this bug to the author(s)\n" "of that program. Please make an effort to report this bug;\n" "timely and accurate bug reports eventually lead to higher\n" - "quality software. Thanks. Julian Seward, 15 February 2005.\n\n", + "quality software. Thanks. Julian Seward, 10 December 2007.\n\n", errcode, BZ2_bzlibVersion() ); @@ -598,6 +598,7 @@ Bool unRLE_obuf_to_output_FAST ( DState* s ) UInt32 c_tPos = s->tPos; char* cs_next_out = s->strm->next_out; unsigned int cs_avail_out = s->strm->avail_out; + Int32 ro_blockSize100k = s->blockSize100k; /* end restore */ UInt32 avail_out_INIT = cs_avail_out; diff --git a/src/bin/bzip2/bzlib.h b/src/bin/bzip2/bzlib.h index fdb0dbe7b0..c5b75d6d8f 100644 --- a/src/bin/bzip2/bzlib.h +++ b/src/bin/bzip2/bzlib.h @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/src/bin/bzip2/bzlib_private.h b/src/bin/bzip2/bzlib_private.h index d0a05546ef..23427879b1 100644 --- a/src/bin/bzip2/bzlib_private.h +++ b/src/bin/bzip2/bzlib_private.h @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -36,7 +36,7 @@ /*-- General stuff. --*/ -#define BZ_VERSION "1.0.4, 20-Dec-2006" +#define BZ_VERSION "1.0.5, 10-Dec-2007" typedef char Char; typedef unsigned char Bool; @@ -442,11 +442,15 @@ typedef /*-- Macros for decompression. --*/ #define BZ_GET_FAST(cccc) \ + /* c_tPos is unsigned, hence test < 0 is pointless. */ \ + if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \ s->tPos = s->tt[s->tPos]; \ cccc = (UChar)(s->tPos & 0xff); \ s->tPos >>= 8; #define BZ_GET_FAST_C(cccc) \ + /* c_tPos is unsigned, hence test < 0 is pointless. */ \ + if (c_tPos >= (UInt32)100000 * (UInt32)ro_blockSize100k) return True; \ c_tPos = c_tt[c_tPos]; \ cccc = (UChar)(c_tPos & 0xff); \ c_tPos >>= 8; @@ -469,8 +473,10 @@ typedef (((UInt32)s->ll16[i]) | (GET_LL4(i) << 16)) #define BZ_GET_SMALL(cccc) \ - cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \ - s->tPos = GET_LL(s->tPos); + /* c_tPos is unsigned, hence test < 0 is pointless. */ \ + if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \ + cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \ + s->tPos = GET_LL(s->tPos); /*-- externs for decompression. --*/ diff --git a/src/bin/bzip2/compress.c b/src/bin/bzip2/compress.c index d98d5c0bd8..8c80a07970 100644 --- a/src/bin/bzip2/compress.c +++ b/src/bin/bzip2/compress.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/src/bin/bzip2/crctable.c b/src/bin/bzip2/crctable.c index bc7e2ae39d..215687b2c0 100644 --- a/src/bin/bzip2/crctable.c +++ b/src/bin/bzip2/crctable.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/src/bin/bzip2/decompress.c b/src/bin/bzip2/decompress.c index 124cc8ddc7..bba5e0fa36 100644 --- a/src/bin/bzip2/decompress.c +++ b/src/bin/bzip2/decompress.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/src/bin/bzip2/huffman.c b/src/bin/bzip2/huffman.c index be4dc024dc..87e79e38af 100644 --- a/src/bin/bzip2/huffman.c +++ b/src/bin/bzip2/huffman.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/src/bin/bzip2/randtable.c b/src/bin/bzip2/randtable.c index d186335e0e..068b76367b 100644 --- a/src/bin/bzip2/randtable.c +++ b/src/bin/bzip2/randtable.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.4 of 20 December 2006 - Copyright (C) 1996-2006 Julian Seward + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + Copyright (C) 1996-2007 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file.