diff options
-rw-r--r-- | CHANGES | 41 | ||||
-rw-r--r-- | LICENSE | 9 | ||||
-rw-r--r-- | Makefile | 30 | ||||
-rw-r--r-- | Makefile-libbz2_so | 31 | ||||
-rw-r--r-- | README | 100 | ||||
-rw-r--r-- | README.COMPILATION.PROBLEMS | 37 | ||||
-rw-r--r-- | README.XML.STUFF | 22 | ||||
-rw-r--r-- | Y2K_INFO | 34 | ||||
-rw-r--r-- | blocksort.c | 77 | ||||
-rw-r--r-- | bz-fo.xsl | 19 | ||||
-rw-r--r-- | bzdiff | 4 | ||||
-rw-r--r-- | bzgrep | 6 | ||||
-rw-r--r-- | bzip2.1 | 6 | ||||
-rw-r--r-- | bzip2.1.preformatted | 14 | ||||
-rw-r--r-- | bzip2.c | 205 | ||||
-rw-r--r-- | bzip2.txt | 14 | ||||
-rw-r--r-- | bzip2recover.c | 88 | ||||
-rw-r--r-- | bzlib.c | 95 | ||||
-rw-r--r-- | bzlib.h | 69 | ||||
-rw-r--r-- | bzlib_private.h | 88 | ||||
-rw-r--r-- | compress.c | 86 | ||||
-rw-r--r-- | crctable.c | 60 | ||||
-rw-r--r-- | decompress.c | 66 | ||||
-rw-r--r-- | dlltest.c | 5 | ||||
-rw-r--r-- | entities.xml | 6 | ||||
-rwxr-xr-x | format.pl | 15 | ||||
-rw-r--r-- | huffman.c | 66 | ||||
-rw-r--r-- | manual.xml | 28 | ||||
-rw-r--r-- | mk251.c | 15 | ||||
-rw-r--r-- | randtable.c | 60 | ||||
-rw-r--r-- | spewG.c | 15 | ||||
-rw-r--r-- | unzcrash.c | 17 | ||||
-rw-r--r-- | words0 | 6 | ||||
-rw-r--r-- | words2 | 2 | ||||
-rw-r--r-- | words3 | 13 | ||||
-rwxr-xr-x | xmlproc.sh | 19 |
36 files changed, 593 insertions, 875 deletions
@@ -1,3 +1,16 @@ | |||
1 | ------------------------------------------------------------------ | ||
2 | This file is part of bzip2/libbzip2, a program and library for | ||
3 | lossless, block-sorting data compression. | ||
4 | |||
5 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
6 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
7 | |||
8 | Please read the WARNING, DISCLAIMER and PATENTS sections in the | ||
9 | README file. | ||
10 | |||
11 | This program is released under the terms of the license contained | ||
12 | in the file LICENSE. | ||
13 | ------------------------------------------------------------------ | ||
1 | 14 | ||
2 | 15 | ||
3 | 0.9.0 | 16 | 0.9.0 |
@@ -261,7 +274,7 @@ Fixes some minor bugs since the last version, 1.0.2. | |||
261 | decompressor to crash, loop or access memory which does not | 274 | decompressor to crash, loop or access memory which does not |
262 | belong to it. If you are using bzip2 or the library to | 275 | belong to it. If you are using bzip2 or the library to |
263 | decompress bitstreams from untrusted sources, an upgrade | 276 | decompress bitstreams from untrusted sources, an upgrade |
264 | to 1.0.3 is recommended. | 277 | to 1.0.3 is recommended. This fixes CAN-2005-1260. |
265 | 278 | ||
266 | * The documentation has been converted to XML, from which html | 279 | * The documentation has been converted to XML, from which html |
267 | and pdf can be derived. | 280 | and pdf can be derived. |
@@ -273,3 +286,29 @@ Fixes some minor bugs since the last version, 1.0.2. | |||
273 | 286 | ||
274 | * The BZ_NO_STDIO cpp symbol was not properly observed in 1.0.2. | 287 | * The BZ_NO_STDIO cpp symbol was not properly observed in 1.0.2. |
275 | This has been fixed. | 288 | This has been fixed. |
289 | |||
290 | |||
291 | 1.0.4 (20 Dec 06) | ||
292 | ~~~~~~~~~~~~~~~~~ | ||
293 | Fixes some minor bugs since the last version, 1.0.3. | ||
294 | |||
295 | * Fix file permissions race problem (CAN-2005-0953). | ||
296 | |||
297 | * Avoid possible segfault in BZ2_bzclose. From Coverity's NetBSD | ||
298 | scan. | ||
299 | |||
300 | * 'const'/prototype cleanups in the C code. | ||
301 | |||
302 | * Change default install location to /usr/local, and handle multiple | ||
303 | 'make install's without error. | ||
304 | |||
305 | * Sanitise file names more carefully in bzgrep. Fixes CAN-2005-0758 | ||
306 | to the extent that applies to bzgrep. | ||
307 | |||
308 | * Use 'mktemp' rather than 'tempfile' in bzdiff. | ||
309 | |||
310 | * Tighten up a couple of assertions in blocksort.c following automated | ||
311 | analysis. | ||
312 | |||
313 | * Fix minor doc/comment bugs. | ||
314 | |||
@@ -1,6 +1,8 @@ | |||
1 | 1 | ||
2 | -------------------------------------------------------------------------- | ||
3 | |||
2 | This program, "bzip2", the associated library "libbzip2", and all | 4 | This program, "bzip2", the associated library "libbzip2", and all |
3 | documentation, are copyright (C) 1996-2005 Julian R Seward. All | 5 | documentation, are copyright (C) 1996-2006 Julian R Seward. All |
4 | rights reserved. | 6 | rights reserved. |
5 | 7 | ||
6 | Redistribution and use in source and binary forms, with or without | 8 | Redistribution and use in source and binary forms, with or without |
@@ -35,6 +37,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |||
35 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 37 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
36 | 38 | ||
37 | Julian Seward, Cambridge, UK. | 39 | Julian Seward, Cambridge, UK. |
38 | jseward@acm.org | 40 | jseward@bzip.org |
39 | bzip2/libbzip2 version 1.0.3 of 15 February 2005 | 41 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
40 | 42 | ||
43 | -------------------------------------------------------------------------- | ||
@@ -1,3 +1,16 @@ | |||
1 | # ------------------------------------------------------------------ | ||
2 | # This file is part of bzip2/libbzip2, a program and library for | ||
3 | # lossless, block-sorting data compression. | ||
4 | # | ||
5 | # bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
6 | # Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
7 | # | ||
8 | # Please read the WARNING, DISCLAIMER and PATENTS sections in the | ||
9 | # README file. | ||
10 | # | ||
11 | # This program is released under the terms of the license contained | ||
12 | # in the file LICENSE. | ||
13 | # ------------------------------------------------------------------ | ||
1 | 14 | ||
2 | SHELL=/bin/sh | 15 | SHELL=/bin/sh |
3 | 16 | ||
@@ -8,10 +21,10 @@ RANLIB=ranlib | |||
8 | LDFLAGS= | 21 | LDFLAGS= |
9 | 22 | ||
10 | BIGFILES=-D_FILE_OFFSET_BITS=64 | 23 | BIGFILES=-D_FILE_OFFSET_BITS=64 |
11 | CFLAGS=-Wall -Winline -O -g $(BIGFILES) | 24 | CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) |
12 | 25 | ||
13 | # Where you want it installed when you do 'make install' | 26 | # Where you want it installed when you do 'make install' |
14 | PREFIX=/usr | 27 | PREFIX=/usr/local |
15 | 28 | ||
16 | 29 | ||
17 | OBJS= blocksort.o \ | 30 | OBJS= blocksort.o \ |
@@ -77,14 +90,14 @@ install: bzip2 bzip2recover | |||
77 | cp -f libbz2.a $(PREFIX)/lib | 90 | cp -f libbz2.a $(PREFIX)/lib |
78 | chmod a+r $(PREFIX)/lib/libbz2.a | 91 | chmod a+r $(PREFIX)/lib/libbz2.a |
79 | cp -f bzgrep $(PREFIX)/bin/bzgrep | 92 | cp -f bzgrep $(PREFIX)/bin/bzgrep |
80 | ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep | 93 | ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep |
81 | ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep | 94 | ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep |
82 | chmod a+x $(PREFIX)/bin/bzgrep | 95 | chmod a+x $(PREFIX)/bin/bzgrep |
83 | cp -f bzmore $(PREFIX)/bin/bzmore | 96 | cp -f bzmore $(PREFIX)/bin/bzmore |
84 | ln $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless | 97 | ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless |
85 | chmod a+x $(PREFIX)/bin/bzmore | 98 | chmod a+x $(PREFIX)/bin/bzmore |
86 | cp -f bzdiff $(PREFIX)/bin/bzdiff | 99 | cp -f bzdiff $(PREFIX)/bin/bzdiff |
87 | ln $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp | 100 | ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp |
88 | chmod a+x $(PREFIX)/bin/bzdiff | 101 | chmod a+x $(PREFIX)/bin/bzdiff |
89 | cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1 | 102 | cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1 |
90 | chmod a+r $(PREFIX)/man/man1/bzgrep.1 | 103 | chmod a+r $(PREFIX)/man/man1/bzgrep.1 |
@@ -124,10 +137,10 @@ bzip2recover.o: bzip2recover.c | |||
124 | distclean: clean | 137 | distclean: clean |
125 | rm -f manual.ps manual.html manual.pdf | 138 | rm -f manual.ps manual.html manual.pdf |
126 | 139 | ||
127 | DISTNAME=bzip2-1.0.3 | 140 | DISTNAME=bzip2-1.0.4 |
128 | dist: check manual | 141 | dist: check manual |
129 | rm -f $(DISTNAME) | 142 | rm -f $(DISTNAME) |
130 | ln -sf . $(DISTNAME) | 143 | ln -s -f . $(DISTNAME) |
131 | tar cvf $(DISTNAME).tar \ | 144 | tar cvf $(DISTNAME).tar \ |
132 | $(DISTNAME)/blocksort.c \ | 145 | $(DISTNAME)/blocksort.c \ |
133 | $(DISTNAME)/huffman.c \ | 146 | $(DISTNAME)/huffman.c \ |
@@ -167,7 +180,6 @@ dist: check manual | |||
167 | $(DISTNAME)/libbz2.dsp \ | 180 | $(DISTNAME)/libbz2.dsp \ |
168 | $(DISTNAME)/dlltest.dsp \ | 181 | $(DISTNAME)/dlltest.dsp \ |
169 | $(DISTNAME)/makefile.msc \ | 182 | $(DISTNAME)/makefile.msc \ |
170 | $(DISTNAME)/Y2K_INFO \ | ||
171 | $(DISTNAME)/unzcrash.c \ | 183 | $(DISTNAME)/unzcrash.c \ |
172 | $(DISTNAME)/spewG.c \ | 184 | $(DISTNAME)/spewG.c \ |
173 | $(DISTNAME)/mk251.c \ | 185 | $(DISTNAME)/mk251.c \ |
diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so index 458c5a1..2b65f3b 100644 --- a/Makefile-libbz2_so +++ b/Makefile-libbz2_so | |||
@@ -1,15 +1,30 @@ | |||
1 | 1 | ||
2 | # This Makefile builds a shared version of the library, | 2 | # This Makefile builds a shared version of the library, |
3 | # libbz2.so.1.0.3, with soname libbz2.so.1.0, | 3 | # libbz2.so.1.0.4, with soname libbz2.so.1.0, |
4 | # at least on x86-Linux (RedHat 7.2), | 4 | # at least on x86-Linux (RedHat 7.2), |
5 | # with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98). | 5 | # with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98). |
6 | # Please see the README file for some | 6 | # Please see the README file for some important info |
7 | # important info about building the library like this. | 7 | # about building the library like this. |
8 | |||
9 | # ------------------------------------------------------------------ | ||
10 | # This file is part of bzip2/libbzip2, a program and library for | ||
11 | # lossless, block-sorting data compression. | ||
12 | # | ||
13 | # bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
14 | # Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
15 | # | ||
16 | # Please read the WARNING, DISCLAIMER and PATENTS sections in the | ||
17 | # README file. | ||
18 | # | ||
19 | # This program is released under the terms of the license contained | ||
20 | # in the file LICENSE. | ||
21 | # ------------------------------------------------------------------ | ||
22 | |||
8 | 23 | ||
9 | SHELL=/bin/sh | 24 | SHELL=/bin/sh |
10 | CC=gcc | 25 | CC=gcc |
11 | BIGFILES=-D_FILE_OFFSET_BITS=64 | 26 | BIGFILES=-D_FILE_OFFSET_BITS=64 |
12 | CFLAGS=-fpic -fPIC -Wall -Winline -O -g | 27 | CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) |
13 | 28 | ||
14 | OBJS= blocksort.o \ | 29 | OBJS= blocksort.o \ |
15 | huffman.o \ | 30 | huffman.o \ |
@@ -20,13 +35,13 @@ OBJS= blocksort.o \ | |||
20 | bzlib.o | 35 | bzlib.o |
21 | 36 | ||
22 | all: $(OBJS) | 37 | all: $(OBJS) |
23 | $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.3 $(OBJS) | 38 | $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 $(OBJS) |
24 | $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.3 | 39 | $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.4 |
25 | rm -f libbz2.so.1.0 | 40 | rm -f libbz2.so.1.0 |
26 | ln -s libbz2.so.1.0.3 libbz2.so.1.0 | 41 | ln -s libbz2.so.1.0.4 libbz2.so.1.0 |
27 | 42 | ||
28 | clean: | 43 | clean: |
29 | rm -f $(OBJS) bzip2.o libbz2.so.1.0.3 libbz2.so.1.0 bzip2-shared | 44 | rm -f $(OBJS) bzip2.o libbz2.so.1.0.4 libbz2.so.1.0 bzip2-shared |
30 | 45 | ||
31 | blocksort.o: blocksort.c | 46 | blocksort.o: blocksort.c |
32 | $(CC) $(CFLAGS) -c blocksort.c | 47 | $(CC) $(CFLAGS) -c blocksort.c |
@@ -1,33 +1,48 @@ | |||
1 | 1 | ||
2 | This is the README for bzip2, a block-sorting file compressor, version | 2 | This is the README for bzip2/libzip2. |
3 | 1.0.3. This version is fully compatible with the previous public | 3 | This version is fully compatible with the previous public releases. |
4 | releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1 and 1.0.2. | ||
5 | 4 | ||
6 | bzip2-1.0.3 is distributed under a BSD-style license. For details, | 5 | ------------------------------------------------------------------ |
7 | see the file LICENSE. | 6 | This file is part of bzip2/libbzip2, a program and library for |
7 | lossless, block-sorting data compression. | ||
8 | |||
9 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
10 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
11 | |||
12 | Please read the WARNING, DISCLAIMER and PATENTS sections in this file. | ||
13 | |||
14 | This program is released under the terms of the license contained | ||
15 | in the file LICENSE. | ||
16 | ------------------------------------------------------------------ | ||
8 | 17 | ||
9 | Complete documentation is available in Postscript form (manual.ps), | 18 | Complete documentation is available in Postscript form (manual.ps), |
10 | PDF (manual.pdf) or html (manual.html). A plain-text version of the | 19 | PDF (manual.pdf) or html (manual.html). A plain-text version of the |
11 | manual page is available as bzip2.txt. A statement about Y2K issues | 20 | manual page is available as bzip2.txt. |
12 | is now included in the file Y2K_INFO. | ||
13 | 21 | ||
14 | 22 | ||
15 | HOW TO BUILD -- UNIX | 23 | HOW TO BUILD -- UNIX |
16 | 24 | ||
17 | Type `make'. This builds the library libbz2.a and then the | 25 | Type 'make'. This builds the library libbz2.a and then the programs |
18 | programs bzip2 and bzip2recover. Six self-tests are run. | 26 | bzip2 and bzip2recover. Six self-tests are run. If the self-tests |
19 | If the self-tests complete ok, carry on to installation: | 27 | complete ok, carry on to installation: |
28 | |||
29 | To install in /usr/local/bin, /usr/local/lib, /usr/local/man and | ||
30 | /usr/local/include, type | ||
20 | 31 | ||
21 | To install in /usr/bin, /usr/lib, /usr/man and /usr/include, type | ||
22 | make install | 32 | make install |
23 | To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type | 33 | |
34 | To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type | ||
35 | |||
24 | make install PREFIX=/xxx/yyy | 36 | make install PREFIX=/xxx/yyy |
37 | |||
25 | If you are (justifiably) paranoid and want to see what 'make install' | 38 | If you are (justifiably) paranoid and want to see what 'make install' |
26 | is going to do, you can first do | 39 | is going to do, you can first do |
40 | |||
27 | make -n install or | 41 | make -n install or |
28 | make -n install PREFIX=/xxx/yyy respectively. | 42 | make -n install PREFIX=/xxx/yyy respectively. |
29 | The -n instructs make to show the commands it would execute, but | 43 | |
30 | not actually execute them. | 44 | The -n instructs make to show the commands it would execute, but not |
45 | actually execute them. | ||
31 | 46 | ||
32 | 47 | ||
33 | HOW TO BUILD -- UNIX, shared library libbz2.so. | 48 | HOW TO BUILD -- UNIX, shared library libbz2.so. |
@@ -49,23 +64,25 @@ Important note for people upgrading .so's from 0.9.0/0.9.5 to version | |||
49 | bzCompress to BZ2_bzCompress, to avoid namespace pollution. | 64 | bzCompress to BZ2_bzCompress, to avoid namespace pollution. |
50 | Unfortunately this means that the libbz2.so created by | 65 | Unfortunately this means that the libbz2.so created by |
51 | Makefile-libbz2_so will not work with any program which used an older | 66 | Makefile-libbz2_so will not work with any program which used an older |
52 | version of the library. Sorry. I do encourage library clients to | 67 | version of the library. I do encourage library clients to make the |
53 | make the effort to upgrade to use version 1.0, since it is both faster | 68 | effort to upgrade to use version 1.0, since it is both faster and more |
54 | and more robust than previous versions. | 69 | robust than previous versions. |
55 | 70 | ||
56 | 71 | ||
57 | HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. | 72 | HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. |
58 | 73 | ||
59 | It's difficult for me to support compilation on all these platforms. | 74 | It's difficult for me to support compilation on all these platforms. |
60 | My approach is to collect binaries for these platforms, and put them | 75 | My approach is to collect binaries for these platforms, and put them |
61 | on the master web page (http://sources.redhat.com/bzip2). Look there. | 76 | on the master web site (http://www.bzip.org). Look there. However |
62 | However (FWIW), bzip2-1.0.X is very standard ANSI C and should compile | 77 | (FWIW), bzip2-1.0.X is very standard ANSI C and should compile |
63 | unmodified with MS Visual C. If you have difficulties building, you | 78 | unmodified with MS Visual C. If you have difficulties building, you |
64 | might want to read README.COMPILATION.PROBLEMS. | 79 | might want to read README.COMPILATION.PROBLEMS. |
65 | 80 | ||
66 | At least using MS Visual C++ 6, you can build from the unmodified | 81 | At least using MS Visual C++ 6, you can build from the unmodified |
67 | sources by issuing, in a command shell: | 82 | sources by issuing, in a command shell: |
83 | |||
68 | nmake -f makefile.msc | 84 | nmake -f makefile.msc |
85 | |||
69 | (you may need to first run the MSVC-provided script VCVARS32.BAT | 86 | (you may need to first run the MSVC-provided script VCVARS32.BAT |
70 | so as to set up paths to the MSVC tools correctly). | 87 | so as to set up paths to the MSVC tools correctly). |
71 | 88 | ||
@@ -86,18 +103,19 @@ Please read and be aware of the following: | |||
86 | 103 | ||
87 | WARNING: | 104 | WARNING: |
88 | 105 | ||
89 | This program (attempts to) compress data by performing several | 106 | This program and library (attempts to) compress data by |
90 | non-trivial transformations on it. Unless you are 100% familiar | 107 | performing several non-trivial transformations on it. |
91 | with *all* the algorithms contained herein, and with the | 108 | Unless you are 100% familiar with *all* the algorithms |
92 | consequences of modifying them, you should NOT meddle with the | 109 | contained herein, and with the consequences of modifying them, |
93 | compression or decompression machinery. Incorrect changes can and | 110 | you should NOT meddle with the compression or decompression |
94 | very likely *will* lead to disastrous loss of data. | 111 | machinery. Incorrect changes can and very likely *will* |
112 | lead to disastrous loss of data. | ||
95 | 113 | ||
96 | 114 | ||
97 | DISCLAIMER: | 115 | DISCLAIMER: |
98 | 116 | ||
99 | I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE | 117 | I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE |
100 | USE OF THIS PROGRAM, HOWSOEVER CAUSED. | 118 | USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED. |
101 | 119 | ||
102 | Every compression of a file implies an assumption that the | 120 | Every compression of a file implies an assumption that the |
103 | compressed file can be decompressed to reproduce the original. | 121 | compressed file can be decompressed to reproduce the original. |
@@ -110,19 +128,18 @@ DISCLAIMER: | |||
110 | PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER | 128 | PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER |
111 | SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. | 129 | SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. |
112 | 130 | ||
113 | That is not to say this program is inherently unreliable. Indeed, | 131 | That is not to say this program is inherently unreliable. |
114 | I very much hope the opposite is true. bzip2 has been carefully | 132 | Indeed, I very much hope the opposite is true. bzip2/libbzip2 |
115 | constructed and extensively tested. | 133 | has been carefully constructed and extensively tested. |
116 | 134 | ||
117 | 135 | ||
118 | PATENTS: | 136 | PATENTS: |
119 | 137 | ||
120 | To the best of my knowledge, bzip2 does not use any patented | 138 | To the best of my knowledge, bzip2/libbzip2 does not use any |
121 | algorithms. However, I do not have the resources to carry out | 139 | patented algorithms. However, I do not have the resources |
122 | a patent search. Therefore I cannot give any guarantee of the | 140 | to carry out a patent search. Therefore I cannot give any |
123 | above statement. | 141 | guarantee of the above statement. |
124 | 142 | ||
125 | End of legalities. | ||
126 | 143 | ||
127 | 144 | ||
128 | WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? | 145 | WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? |
@@ -156,21 +173,23 @@ WHAT'S NEW IN 1.0.3 ? | |||
156 | 173 | ||
157 | See the CHANGES file. | 174 | See the CHANGES file. |
158 | 175 | ||
176 | WHAT'S NEW IN 1.0.4 ? | ||
177 | |||
178 | See the CHANGES file. | ||
179 | |||
159 | 180 | ||
160 | I hope you find bzip2 useful. Feel free to contact me at | 181 | I hope you find bzip2 useful. Feel free to contact me at |
161 | jseward@bzip.org | 182 | jseward@bzip.org |
162 | if you have any suggestions or queries. Many people mailed me with | 183 | if you have any suggestions or queries. Many people mailed me with |
163 | comments, suggestions and patches after the releases of bzip-0.15, | 184 | comments, suggestions and patches after the releases of bzip-0.15, |
164 | bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1 and | 185 | bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, |
165 | 1.0.2, and the changes in bzip2 are largely a result of this feedback. | 186 | 1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this |
166 | I thank you for your comments. | 187 | feedback. I thank you for your comments. |
167 | 188 | ||
168 | At least for the time being, bzip2's "home" is (or can be reached via) | 189 | bzip2's "home" is http://www.bzip.org/ |
169 | http://www.bzip.org | ||
170 | 190 | ||
171 | Julian Seward | 191 | Julian Seward |
172 | jseward@bzip.org | 192 | jseward@bzip.org |
173 | |||
174 | Cambridge, UK. | 193 | Cambridge, UK. |
175 | 194 | ||
176 | 18 July 1996 (version 0.15) | 195 | 18 July 1996 (version 0.15) |
@@ -183,3 +202,4 @@ Cambridge, UK. | |||
183 | 5 May 2000 (bzip2, version 1.0pre8) | 202 | 5 May 2000 (bzip2, version 1.0pre8) |
184 | 30 December 2001 (bzip2, version 1.0.2pre1) | 203 | 30 December 2001 (bzip2, version 1.0.2pre1) |
185 | 15 February 2005 (bzip2, version 1.0.3) | 204 | 15 February 2005 (bzip2, version 1.0.3) |
205 | 20 December 2006 (bzip2, version 1.0.4) | ||
diff --git a/README.COMPILATION.PROBLEMS b/README.COMPILATION.PROBLEMS index f1bc396..64ab586 100644 --- a/README.COMPILATION.PROBLEMS +++ b/README.COMPILATION.PROBLEMS | |||
@@ -1,32 +1,47 @@ | |||
1 | ------------------------------------------------------------------ | ||
2 | This file is part of bzip2/libbzip2, a program and library for | ||
3 | lossless, block-sorting data compression. | ||
1 | 4 | ||
2 | bzip2-1.0.3 should compile without problems on the vast majority of | 5 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
6 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
7 | |||
8 | Please read the WARNING, DISCLAIMER and PATENTS sections in the | ||
9 | README file. | ||
10 | |||
11 | This program is released under the terms of the license contained | ||
12 | in the file LICENSE. | ||
13 | ------------------------------------------------------------------ | ||
14 | |||
15 | bzip2-1.0.4 should compile without problems on the vast majority of | ||
3 | platforms. Using the supplied Makefile, I've built and tested it | 16 | platforms. Using the supplied Makefile, I've built and tested it |
4 | myself for x86-linux and x86_64-linux. With makefile.msc, Visual C++ | 17 | myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ |
5 | 6.0 and nmake, you can build a native Win32 version too. Large file | 18 | 6.0 and nmake, you can build a native Win32 version too. Large file |
6 | support seems to work correctly on at least alpha-tru64unix and | 19 | support seems to work correctly on at least on amd64-linux. |
7 | x86-cygwin32 (on Windows 2000). | ||
8 | 20 | ||
9 | When I say "large file" I mean a file of size 2,147,483,648 (2^31) | 21 | When I say "large file" I mean a file of size 2,147,483,648 (2^31) |
10 | bytes or above. Many older OSs can't handle files above this size, | 22 | bytes or above. Many older OSs can't handle files above this size, |
11 | but many newer ones can. Large files are pretty huge -- most files | 23 | but many newer ones can. Large files are pretty huge -- most files |
12 | you'll encounter are not Large Files. | 24 | you'll encounter are not Large Files. |
13 | 25 | ||
14 | Earlier versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide | 26 | Early versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide variety |
15 | variety of platforms without difficulty, and I hope this version will | 27 | of platforms without difficulty, and I hope this version will continue |
16 | continue in that tradition. However, in order to support large files, | 28 | in that tradition. However, in order to support large files, I've had |
17 | I've had to include the define -D_FILE_OFFSET_BITS=64 in the Makefile. | 29 | to include the define -D_FILE_OFFSET_BITS=64 in the Makefile. This |
18 | This can cause problems. | 30 | can cause problems. |
19 | 31 | ||
20 | The technique of adding -D_FILE_OFFSET_BITS=64 to get large file | 32 | The technique of adding -D_FILE_OFFSET_BITS=64 to get large file |
21 | support is, as far as I know, the Recommended Way to get correct large | 33 | support is, as far as I know, the Recommended Way to get correct large |
22 | file support. For more details, see the Large File Support | 34 | file support. For more details, see the Large File Support |
23 | Specification, published by the Large File Summit, at | 35 | Specification, published by the Large File Summit, at |
36 | |||
24 | http://ftp.sas.com/standards/large.file | 37 | http://ftp.sas.com/standards/large.file |
25 | 38 | ||
26 | As a general comment, if you get compilation errors which you think | 39 | As a general comment, if you get compilation errors which you think |
27 | are related to large file support, try removing the above define from | 40 | are related to large file support, try removing the above define from |
28 | the Makefile, ie, delete the line | 41 | the Makefile, ie, delete the line |
42 | |||
29 | BIGFILES=-D_FILE_OFFSET_BITS=64 | 43 | BIGFILES=-D_FILE_OFFSET_BITS=64 |
44 | |||
30 | from the Makefile, and do 'make clean ; make'. This will give you a | 45 | from the Makefile, and do 'make clean ; make'. This will give you a |
31 | version of bzip2 without large file support, which, for most | 46 | version of bzip2 without large file support, which, for most |
32 | applications, is probably not a problem. | 47 | applications, is probably not a problem. |
@@ -37,3 +52,7 @@ You can use the spewG.c program to generate huge files to test bzip2's | |||
37 | large file support, if you are feeling paranoid. Be aware though that | 52 | large file support, if you are feeling paranoid. Be aware though that |
38 | any compilation problems which affect bzip2 will also affect spewG.c, | 53 | any compilation problems which affect bzip2 will also affect spewG.c, |
39 | alas. | 54 | alas. |
55 | |||
56 | AIX: I have reports that for large file support, you need to specify | ||
57 | -D_LARGE_FILES rather than -D_FILE_OFFSET_BITS=64. I have not tested | ||
58 | this myself. | ||
diff --git a/README.XML.STUFF b/README.XML.STUFF index 0ff209f..93bf405 100644 --- a/README.XML.STUFF +++ b/README.XML.STUFF | |||
@@ -1,3 +1,17 @@ | |||
1 | ---------------------------------------------------------------- | ||
2 | This file is part of bzip2/libbzip2, a program and library for | ||
3 | lossless, block-sorting data compression. | ||
4 | |||
5 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
6 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
7 | |||
8 | Please read the WARNING, DISCLAIMER and PATENTS sections in the | ||
9 | README file. | ||
10 | |||
11 | This program is released under the terms of the license contained | ||
12 | in the file LICENSE. | ||
13 | ---------------------------------------------------------------- | ||
14 | |||
1 | The script xmlproc.sh takes an xml file as input, | 15 | The script xmlproc.sh takes an xml file as input, |
2 | and processes it to create .pdf, .html or .ps output. | 16 | and processes it to create .pdf, .html or .ps output. |
3 | It uses format.pl, a perl script to format <pre> blocks nicely, | 17 | It uses format.pl, a perl script to format <pre> blocks nicely, |
@@ -9,16 +23,16 @@ version, year, etc. | |||
9 | 23 | ||
10 | Usage: | 24 | Usage: |
11 | 25 | ||
12 | xmlproc.sh -v manual.xml | 26 | ./xmlproc.sh -v manual.xml |
13 | Validates an xml file to ensure no dtd-compliance errors | 27 | Validates an xml file to ensure no dtd-compliance errors |
14 | 28 | ||
15 | xmlproc.sh -html manual.xml | 29 | ./xmlproc.sh -html manual.xml |
16 | Output: manual.html | 30 | Output: manual.html |
17 | 31 | ||
18 | xmlproc.sh -pdf manual.xml | 32 | ./xmlproc.sh -pdf manual.xml |
19 | Output: manual.pdf | 33 | Output: manual.pdf |
20 | 34 | ||
21 | xmlproc.sh -ps manual.xml | 35 | ./xmlproc.sh -ps manual.xml |
22 | Output: manual.ps | 36 | Output: manual.ps |
23 | 37 | ||
24 | 38 | ||
diff --git a/Y2K_INFO b/Y2K_INFO deleted file mode 100644 index 55fd56a..0000000 --- a/Y2K_INFO +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | |||
2 | Y2K status of bzip2 and libbzip2, versions 0.1, 0.9.0 and 0.9.5 | ||
3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
4 | |||
5 | Informally speaking: | ||
6 | bzip2 is a compression program built on top of libbzip2, | ||
7 | a library which does the real work of compression and | ||
8 | decompression. As far as I am aware, libbzip2 does not have | ||
9 | any date-related code at all. | ||
10 | |||
11 | bzip2 itself copies dates from source to destination files | ||
12 | when compressing or decompressing, using the 'stat' and 'utime' | ||
13 | UNIX system calls. It doesn't examine, manipulate or store the | ||
14 | dates in any way. So as far as I can see, there shouldn't be any | ||
15 | problem with bzip2 providing 'stat' and 'utime' work correctly | ||
16 | on your system. | ||
17 | |||
18 | On non-unix platforms (those for which BZ_UNIX in bzip2.c is | ||
19 | not set to 1), bzip2 doesn't even do the date copying. | ||
20 | |||
21 | Overall, informally speaking, I don't think bzip2 or libbzip2 | ||
22 | have a Y2K problem. | ||
23 | |||
24 | Formally speaking: | ||
25 | I am not prepared to offer you any assurance whatsoever | ||
26 | regarding Y2K issues in my software. You alone assume the | ||
27 | entire risk of using the software. The disclaimer of liability | ||
28 | in the LICENSE file in the bzip2 source distribution continues | ||
29 | to apply on this issue as with every other issue pertaining | ||
30 | to the software. | ||
31 | |||
32 | Julian Seward | ||
33 | Cambridge, UK | ||
34 | 25 August 1999 | ||
diff --git a/blocksort.c b/blocksort.c index 33ec9f5..8535c93 100644 --- a/blocksort.c +++ b/blocksort.c | |||
@@ -4,66 +4,19 @@ | |||
4 | /*--- blocksort.c ---*/ | 4 | /*--- blocksort.c ---*/ |
5 | /*-------------------------------------------------------------*/ | 5 | /*-------------------------------------------------------------*/ |
6 | 6 | ||
7 | /*-- | 7 | /* ------------------------------------------------------------------ |
8 | This file is a part of bzip2 and/or libbzip2, a program and | 8 | This file is part of bzip2/libbzip2, a program and library for |
9 | library for lossless, block-sorting data compression. | 9 | lossless, block-sorting data compression. |
10 | 10 | ||
11 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | 11 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
12 | 12 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | |
13 | Redistribution and use in source and binary forms, with or without | 13 | |
14 | modification, are permitted provided that the following conditions | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
15 | are met: | 15 | README file. |
16 | 16 | ||
17 | 1. Redistributions of source code must retain the above copyright | 17 | This program is released under the terms of the license contained |
18 | notice, this list of conditions and the following disclaimer. | 18 | in the file LICENSE. |
19 | 19 | ------------------------------------------------------------------ */ | |
20 | 2. The origin of this software must not be misrepresented; you must | ||
21 | not claim that you wrote the original software. If you use this | ||
22 | software in a product, an acknowledgment in the product | ||
23 | documentation would be appreciated but is not required. | ||
24 | |||
25 | 3. Altered source versions must be plainly marked as such, and must | ||
26 | not be misrepresented as being the original software. | ||
27 | |||
28 | 4. The name of the author may not be used to endorse or promote | ||
29 | products derived from this software without specific prior written | ||
30 | permission. | ||
31 | |||
32 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | ||
33 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
34 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
35 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
36 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
37 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
38 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
39 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
40 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
43 | |||
44 | Julian Seward, Cambridge, UK. | ||
45 | jseward@bzip.org | ||
46 | bzip2/libbzip2 version 1.0 of 21 March 2000 | ||
47 | |||
48 | This program is based on (at least) the work of: | ||
49 | Mike Burrows | ||
50 | David Wheeler | ||
51 | Peter Fenwick | ||
52 | Alistair Moffat | ||
53 | Radford Neal | ||
54 | Ian H. Witten | ||
55 | Robert Sedgewick | ||
56 | Jon L. Bentley | ||
57 | |||
58 | For more information on these sources, see the manual. | ||
59 | |||
60 | To get some idea how the block sorting algorithms in this file | ||
61 | work, read my paper | ||
62 | On the Performance of BWT Sorting Algorithms | ||
63 | in Proceedings of the IEEE Data Compression Conference 2000, | ||
64 | Snowbird, Utah, USA, 27-30 March 2000. The main sort in this | ||
65 | file implements the algorithm called cache in the paper. | ||
66 | --*/ | ||
67 | 20 | ||
68 | 21 | ||
69 | #include "bzlib_private.h" | 22 | #include "bzlib_private.h" |
@@ -155,7 +108,7 @@ void fallbackQSort3 ( UInt32* fmap, | |||
155 | 108 | ||
156 | while (sp > 0) { | 109 | while (sp > 0) { |
157 | 110 | ||
158 | AssertH ( sp < FALLBACK_QSORT_STACK_SIZE, 1004 ); | 111 | AssertH ( sp < FALLBACK_QSORT_STACK_SIZE - 1, 1004 ); |
159 | 112 | ||
160 | fpop ( lo, hi ); | 113 | fpop ( lo, hi ); |
161 | if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) { | 114 | if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) { |
@@ -690,7 +643,7 @@ void mainQSort3 ( UInt32* ptr, | |||
690 | 643 | ||
691 | while (sp > 0) { | 644 | while (sp > 0) { |
692 | 645 | ||
693 | AssertH ( sp < MAIN_QSORT_STACK_SIZE, 1001 ); | 646 | AssertH ( sp < MAIN_QSORT_STACK_SIZE - 2, 1001 ); |
694 | 647 | ||
695 | mpop ( lo, hi, d ); | 648 | mpop ( lo, hi, d ); |
696 | if (hi - lo < MAIN_QSORT_SMALL_THRESH || | 649 | if (hi - lo < MAIN_QSORT_SMALL_THRESH || |
@@ -254,4 +254,23 @@ | |||
254 | </xsl:template> | 254 | </xsl:template> |
255 | 255 | ||
256 | 256 | ||
257 | <!-- Bug-fix for Suse 10 PassiveTex version --> | ||
258 | <!-- Precompute attribute values 'cos PassiveTex is too stupid: --> | ||
259 | <xsl:attribute-set name="component.title.properties"> | ||
260 | <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> | ||
261 | <xsl:attribute name="space-before.optimum"> | ||
262 | <xsl:value-of select="concat($body.font.master, 'pt')"/> | ||
263 | </xsl:attribute> | ||
264 | <xsl:attribute name="space-before.minimum"> | ||
265 | <xsl:value-of select="$body.font.master * 0.8"/> | ||
266 | <xsl:text>pt</xsl:text> | ||
267 | </xsl:attribute> | ||
268 | <xsl:attribute name="space-before.maximum"> | ||
269 | <xsl:value-of select="$body.font.master * 1.2"/> | ||
270 | <xsl:text>pt</xsl:text> | ||
271 | </xsl:attribute> | ||
272 | <xsl:attribute name="hyphenate">false</xsl:attribute> | ||
273 | </xsl:attribute-set> | ||
274 | |||
275 | |||
257 | </xsl:stylesheet> | 276 | </xsl:stylesheet> |
@@ -12,7 +12,7 @@ | |||
12 | # necessary) and fed to cmp or diff. The exit status from cmp | 12 | # necessary) and fed to cmp or diff. The exit status from cmp |
13 | # or diff is preserved. | 13 | # or diff is preserved. |
14 | 14 | ||
15 | PATH="/usr/bin:$PATH"; export PATH | 15 | PATH="/usr/bin:/bin:$PATH"; export PATH |
16 | prog=`echo $0 | sed 's|.*/||'` | 16 | prog=`echo $0 | sed 's|.*/||'` |
17 | case "$prog" in | 17 | case "$prog" in |
18 | *cmp) comp=${CMP-cmp} ;; | 18 | *cmp) comp=${CMP-cmp} ;; |
@@ -37,7 +37,7 @@ if test -z "$FILES"; then | |||
37 | echo "Usage: $prog [${comp}_options] file [file]" | 37 | echo "Usage: $prog [${comp}_options] file [file]" |
38 | exit 1 | 38 | exit 1 |
39 | fi | 39 | fi |
40 | tmp=`tempfile -d /tmp -p bz` || { | 40 | tmp=`mktemp ${TMPDIR:-/tmp}/bzdiff.XXXXXXXXXX` || { |
41 | echo 'cannot create a temporary file' >&2 | 41 | echo 'cannot create a temporary file' >&2 |
42 | exit 1 | 42 | exit 1 |
43 | } | 43 | } |
@@ -63,7 +63,11 @@ for i do | |||
63 | bzip2 -cdfq "$i" | $grep $opt "$pat" | 63 | bzip2 -cdfq "$i" | $grep $opt "$pat" |
64 | r=$? | 64 | r=$? |
65 | else | 65 | else |
66 | bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${i}:|" | 66 | j=${i//\\/\\\\} |
67 | j=${j//|/\\|} | ||
68 | j=${j//&/\\&} | ||
69 | j=`printf "%s" "$j" | tr '\n' ' '` | ||
70 | bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|" | ||
67 | r=$? | 71 | r=$? |
68 | fi | 72 | fi |
69 | test "$r" -ne 0 && res="$r" | 73 | test "$r" -ne 0 && res="$r" |
@@ -1,7 +1,7 @@ | |||
1 | .PU | 1 | .PU |
2 | .TH bzip2 1 | 2 | .TH bzip2 1 |
3 | .SH NAME | 3 | .SH NAME |
4 | bzip2, bunzip2 \- a block-sorting file compressor, v1.0.3 | 4 | bzip2, bunzip2 \- a block-sorting file compressor, v1.0.4 |
5 | .br | 5 | .br |
6 | bzcat \- decompresses files to stdout | 6 | bzcat \- decompresses files to stdout |
7 | .br | 7 | .br |
@@ -405,11 +405,11 @@ I/O error messages are not as helpful as they could be. | |||
405 | tries hard to detect I/O errors and exit cleanly, but the details of | 405 | tries hard to detect I/O errors and exit cleanly, but the details of |
406 | what the problem is sometimes seem rather misleading. | 406 | what the problem is sometimes seem rather misleading. |
407 | 407 | ||
408 | This manual page pertains to version 1.0.3 of | 408 | This manual page pertains to version 1.0.4 of |
409 | .I bzip2. | 409 | .I bzip2. |
410 | Compressed data created by this version is entirely forwards and | 410 | Compressed data created by this version is entirely forwards and |
411 | backwards compatible with the previous public releases, versions | 411 | backwards compatible with the previous public releases, versions |
412 | 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1 and 1.0.2, but with the following | 412 | 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and 1.0.3, but with the following |
413 | exception: 0.9.0 and above can correctly decompress multiple | 413 | exception: 0.9.0 and above can correctly decompress multiple |
414 | concatenated compressed files. 0.1pl2 cannot do this; it will stop | 414 | concatenated compressed files. 0.1pl2 cannot do this; it will stop |
415 | after decompressing just the first file in the stream. | 415 | after decompressing just the first file in the stream. |
diff --git a/bzip2.1.preformatted b/bzip2.1.preformatted index 129ca83..15e16e5 100644 --- a/bzip2.1.preformatted +++ b/bzip2.1.preformatted | |||
@@ -3,7 +3,7 @@ bzip2(1) bzip2(1) | |||
3 | 3 | ||
4 | 4 | ||
5 | NNAAMMEE | 5 | NNAAMMEE |
6 | bzip2, bunzip2 − a block‐sorting file compressor, v1.0.3 | 6 | bzip2, bunzip2 − a block‐sorting file compressor, v1.0.4 |
7 | bzcat − decompresses files to stdout | 7 | bzcat − decompresses files to stdout |
8 | bzip2recover − recovers data from damaged bzip2 files | 8 | bzip2recover − recovers data from damaged bzip2 files |
9 | 9 | ||
@@ -348,14 +348,14 @@ CCAAVVEEAATTSS | |||
348 | but the details of what the problem is sometimes seem | 348 | but the details of what the problem is sometimes seem |
349 | rather misleading. | 349 | rather misleading. |
350 | 350 | ||
351 | This manual page pertains to version 1.0.3 of _b_z_i_p_2_. Com | 351 | This manual page pertains to version 1.0.4 of _b_z_i_p_2_. Com |
352 | pressed data created by this version is entirely forwards | 352 | pressed data created by this version is entirely forwards |
353 | and backwards compatible with the previous public | 353 | and backwards compatible with the previous public |
354 | releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1 and | 354 | releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, |
355 | 1.0.2, but with the following exception: 0.9.0 and above | 355 | 1.0.2 and 1.0.3, but with the following exception: 0.9.0 |
356 | can correctly decompress multiple concatenated compressed | 356 | and above can correctly decompress multiple concatenated |
357 | files. 0.1pl2 cannot do this; it will stop after decom | 357 | compressed files. 0.1pl2 cannot do this; it will stop |
358 | pressing just the first file in the stream. | 358 | after decompressing just the first file in the stream. |
359 | 359 | ||
360 | _b_z_i_p_2_r_e_c_o_v_e_r versions prior to 1.0.2 used 32‐bit integers | 360 | _b_z_i_p_2_r_e_c_o_v_e_r versions prior to 1.0.2 used 32‐bit integers |
361 | to represent bit positions in compressed files, so they | 361 | to represent bit positions in compressed files, so they |
@@ -3,118 +3,26 @@ | |||
3 | /*--- A block-sorting, lossless compressor bzip2.c ---*/ | 3 | /*--- A block-sorting, lossless compressor bzip2.c ---*/ |
4 | /*-----------------------------------------------------------*/ | 4 | /*-----------------------------------------------------------*/ |
5 | 5 | ||
6 | /*-- | 6 | /* ------------------------------------------------------------------ |
7 | This file is a part of bzip2 and/or libbzip2, a program and | 7 | This file is part of bzip2/libbzip2, a program and library for |
8 | library for lossless, block-sorting data compression. | 8 | lossless, block-sorting data compression. |
9 | |||
10 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | ||
11 | |||
12 | Redistribution and use in source and binary forms, with or without | ||
13 | modification, are permitted provided that the following conditions | ||
14 | are met: | ||
15 | |||
16 | 1. Redistributions of source code must retain the above copyright | ||
17 | notice, this list of conditions and the following disclaimer. | ||
18 | |||
19 | 2. The origin of this software must not be misrepresented; you must | ||
20 | not claim that you wrote the original software. If you use this | ||
21 | software in a product, an acknowledgment in the product | ||
22 | documentation would be appreciated but is not required. | ||
23 | |||
24 | 3. Altered source versions must be plainly marked as such, and must | ||
25 | not be misrepresented as being the original software. | ||
26 | |||
27 | 4. The name of the author may not be used to endorse or promote | ||
28 | products derived from this software without specific prior written | ||
29 | permission. | ||
30 | |||
31 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | ||
32 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
33 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
34 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
35 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
36 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
37 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
38 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
39 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
40 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
41 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
42 | |||
43 | Julian Seward, Cambridge, UK. | ||
44 | jseward@bzip.org | ||
45 | bzip2/libbzip2 version 1.0 of 21 March 2000 | ||
46 | |||
47 | This program is based on (at least) the work of: | ||
48 | Mike Burrows | ||
49 | David Wheeler | ||
50 | Peter Fenwick | ||
51 | Alistair Moffat | ||
52 | Radford Neal | ||
53 | Ian H. Witten | ||
54 | Robert Sedgewick | ||
55 | Jon L. Bentley | ||
56 | |||
57 | For more information on these sources, see the manual. | ||
58 | --*/ | ||
59 | 9 | ||
10 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
11 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
60 | 12 | ||
61 | /*----------------------------------------------------*/ | 13 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
62 | /*--- IMPORTANT ---*/ | 14 | README file. |
63 | /*----------------------------------------------------*/ | ||
64 | 15 | ||
65 | /*-- | 16 | This program is released under the terms of the license contained |
66 | WARNING: | 17 | in the file LICENSE. |
67 | This program and library (attempts to) compress data by | 18 | ------------------------------------------------------------------ */ |
68 | performing several non-trivial transformations on it. | ||
69 | Unless you are 100% familiar with *all* the algorithms | ||
70 | contained herein, and with the consequences of modifying them, | ||
71 | you should NOT meddle with the compression or decompression | ||
72 | machinery. Incorrect changes can and very likely *will* | ||
73 | lead to disasterous loss of data. | ||
74 | |||
75 | DISCLAIMER: | ||
76 | I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE | ||
77 | USE OF THIS PROGRAM, HOWSOEVER CAUSED. | ||
78 | |||
79 | Every compression of a file implies an assumption that the | ||
80 | compressed file can be decompressed to reproduce the original. | ||
81 | Great efforts in design, coding and testing have been made to | ||
82 | ensure that this program works correctly. However, the | ||
83 | complexity of the algorithms, and, in particular, the presence | ||
84 | of various special cases in the code which occur with very low | ||
85 | but non-zero probability make it impossible to rule out the | ||
86 | possibility of bugs remaining in the program. DO NOT COMPRESS | ||
87 | ANY DATA WITH THIS PROGRAM AND/OR LIBRARY UNLESS YOU ARE PREPARED | ||
88 | TO ACCEPT THE POSSIBILITY, HOWEVER SMALL, THAT THE DATA WILL | ||
89 | NOT BE RECOVERABLE. | ||
90 | |||
91 | That is not to say this program is inherently unreliable. | ||
92 | Indeed, I very much hope the opposite is true. bzip2/libbzip2 | ||
93 | has been carefully constructed and extensively tested. | ||
94 | |||
95 | PATENTS: | ||
96 | To the best of my knowledge, bzip2/libbzip2 does not use any | ||
97 | patented algorithms. However, I do not have the resources | ||
98 | available to carry out a full patent search. Therefore I cannot | ||
99 | give any guarantee of the above statement. | ||
100 | --*/ | ||
101 | 19 | ||
102 | 20 | ||
103 | 21 | /* Place a 1 beside your platform, and 0 elsewhere. | |
104 | /*----------------------------------------------------*/ | 22 | Generic 32-bit Unix. |
105 | /*--- and now for something much more pleasant :-) ---*/ | 23 | Also works on 64-bit Unix boxes. |
106 | /*----------------------------------------------------*/ | 24 | This is the default. |
107 | 25 | */ | |
108 | /*---------------------------------------------*/ | ||
109 | /*-- | ||
110 | Place a 1 beside your platform, and 0 elsewhere. | ||
111 | --*/ | ||
112 | |||
113 | /*-- | ||
114 | Generic 32-bit Unix. | ||
115 | Also works on 64-bit Unix boxes. | ||
116 | This is the default. | ||
117 | --*/ | ||
118 | #define BZ_UNIX 1 | 26 | #define BZ_UNIX 1 |
119 | 27 | ||
120 | /*-- | 28 | /*-- |
@@ -302,16 +210,17 @@ Char progNameReally[FILE_NAME_LEN]; | |||
302 | FILE *outputHandleJustInCase; | 210 | FILE *outputHandleJustInCase; |
303 | Int32 workFactor; | 211 | Int32 workFactor; |
304 | 212 | ||
305 | static void panic ( Char* ) NORETURN; | 213 | static void panic ( const Char* ) NORETURN; |
306 | static void ioError ( void ) NORETURN; | 214 | static void ioError ( void ) NORETURN; |
307 | static void outOfMemory ( void ) NORETURN; | 215 | static void outOfMemory ( void ) NORETURN; |
308 | static void configError ( void ) NORETURN; | 216 | static void configError ( void ) NORETURN; |
309 | static void crcError ( void ) NORETURN; | 217 | static void crcError ( void ) NORETURN; |
310 | static void cleanUpAndFail ( Int32 ) NORETURN; | 218 | static void cleanUpAndFail ( Int32 ) NORETURN; |
311 | static void compressedStreamEOF ( void ) NORETURN; | 219 | static void compressedStreamEOF ( void ) NORETURN; |
312 | 220 | ||
313 | static void copyFileName ( Char*, Char* ); | 221 | static void copyFileName ( Char*, Char* ); |
314 | static void* myMalloc ( Int32 ); | 222 | static void* myMalloc ( Int32 ); |
223 | static void applySavedFileAttrToOutputFile ( IntNative fd ); | ||
315 | 224 | ||
316 | 225 | ||
317 | 226 | ||
@@ -457,6 +366,9 @@ void compressStream ( FILE *stream, FILE *zStream ) | |||
457 | ret = fflush ( zStream ); | 366 | ret = fflush ( zStream ); |
458 | if (ret == EOF) goto errhandler_io; | 367 | if (ret == EOF) goto errhandler_io; |
459 | if (zStream != stdout) { | 368 | if (zStream != stdout) { |
369 | Int32 fd = fileno ( zStream ); | ||
370 | if (fd < 0) goto errhandler_io; | ||
371 | applySavedFileAttrToOutputFile ( fd ); | ||
460 | ret = fclose ( zStream ); | 372 | ret = fclose ( zStream ); |
461 | outputHandleJustInCase = NULL; | 373 | outputHandleJustInCase = NULL; |
462 | if (ret == EOF) goto errhandler_io; | 374 | if (ret == EOF) goto errhandler_io; |
@@ -569,6 +481,11 @@ Bool uncompressStream ( FILE *zStream, FILE *stream ) | |||
569 | 481 | ||
570 | closeok: | 482 | closeok: |
571 | if (ferror(zStream)) goto errhandler_io; | 483 | if (ferror(zStream)) goto errhandler_io; |
484 | if (stream != stdout) { | ||
485 | Int32 fd = fileno ( stream ); | ||
486 | if (fd < 0) goto errhandler_io; | ||
487 | applySavedFileAttrToOutputFile ( fd ); | ||
488 | } | ||
572 | ret = fclose ( zStream ); | 489 | ret = fclose ( zStream ); |
573 | if (ret == EOF) goto errhandler_io; | 490 | if (ret == EOF) goto errhandler_io; |
574 | 491 | ||
@@ -826,7 +743,7 @@ void cleanUpAndFail ( Int32 ec ) | |||
826 | 743 | ||
827 | /*---------------------------------------------*/ | 744 | /*---------------------------------------------*/ |
828 | static | 745 | static |
829 | void panic ( Char* s ) | 746 | void panic ( const Char* s ) |
830 | { | 747 | { |
831 | fprintf ( stderr, | 748 | fprintf ( stderr, |
832 | "\n%s: PANIC -- internal consistency error:\n" | 749 | "\n%s: PANIC -- internal consistency error:\n" |
@@ -1039,6 +956,7 @@ Bool fileExists ( Char* name ) | |||
1039 | For non-Unix platforms, if we are not worrying about | 956 | For non-Unix platforms, if we are not worrying about |
1040 | security issues, simple this simply behaves like fopen. | 957 | security issues, simple this simply behaves like fopen. |
1041 | */ | 958 | */ |
959 | static | ||
1042 | FILE* fopen_output_safely ( Char* name, const char* mode ) | 960 | FILE* fopen_output_safely ( Char* name, const char* mode ) |
1043 | { | 961 | { |
1044 | # if BZ_UNIX | 962 | # if BZ_UNIX |
@@ -1129,7 +1047,7 @@ void saveInputFileMetaInfo ( Char *srcName ) | |||
1129 | 1047 | ||
1130 | 1048 | ||
1131 | static | 1049 | static |
1132 | void applySavedMetaInfoToOutputFile ( Char *dstName ) | 1050 | void applySavedTimeInfoToOutputFile ( Char *dstName ) |
1133 | { | 1051 | { |
1134 | # if BZ_UNIX | 1052 | # if BZ_UNIX |
1135 | IntNative retVal; | 1053 | IntNative retVal; |
@@ -1138,13 +1056,21 @@ void applySavedMetaInfoToOutputFile ( Char *dstName ) | |||
1138 | uTimBuf.actime = fileMetaInfo.st_atime; | 1056 | uTimBuf.actime = fileMetaInfo.st_atime; |
1139 | uTimBuf.modtime = fileMetaInfo.st_mtime; | 1057 | uTimBuf.modtime = fileMetaInfo.st_mtime; |
1140 | 1058 | ||
1141 | retVal = chmod ( dstName, fileMetaInfo.st_mode ); | 1059 | retVal = utime ( dstName, &uTimBuf ); |
1142 | ERROR_IF_NOT_ZERO ( retVal ); | 1060 | ERROR_IF_NOT_ZERO ( retVal ); |
1061 | # endif | ||
1062 | } | ||
1143 | 1063 | ||
1144 | retVal = utime ( dstName, &uTimBuf ); | 1064 | static |
1065 | void applySavedFileAttrToOutputFile ( IntNative fd ) | ||
1066 | { | ||
1067 | # if BZ_UNIX | ||
1068 | IntNative retVal; | ||
1069 | |||
1070 | retVal = fchmod ( fd, fileMetaInfo.st_mode ); | ||
1145 | ERROR_IF_NOT_ZERO ( retVal ); | 1071 | ERROR_IF_NOT_ZERO ( retVal ); |
1146 | 1072 | ||
1147 | retVal = chown ( dstName, fileMetaInfo.st_uid, fileMetaInfo.st_gid ); | 1073 | (void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid ); |
1148 | /* chown() will in many cases return with EPERM, which can | 1074 | /* chown() will in many cases return with EPERM, which can |
1149 | be safely ignored. | 1075 | be safely ignored. |
1150 | */ | 1076 | */ |
@@ -1175,13 +1101,13 @@ Bool containsDubiousChars ( Char* name ) | |||
1175 | /*---------------------------------------------*/ | 1101 | /*---------------------------------------------*/ |
1176 | #define BZ_N_SUFFIX_PAIRS 4 | 1102 | #define BZ_N_SUFFIX_PAIRS 4 |
1177 | 1103 | ||
1178 | Char* zSuffix[BZ_N_SUFFIX_PAIRS] | 1104 | const Char* zSuffix[BZ_N_SUFFIX_PAIRS] |
1179 | = { ".bz2", ".bz", ".tbz2", ".tbz" }; | 1105 | = { ".bz2", ".bz", ".tbz2", ".tbz" }; |
1180 | Char* unzSuffix[BZ_N_SUFFIX_PAIRS] | 1106 | const Char* unzSuffix[BZ_N_SUFFIX_PAIRS] |
1181 | = { "", "", ".tar", ".tar" }; | 1107 | = { "", "", ".tar", ".tar" }; |
1182 | 1108 | ||
1183 | static | 1109 | static |
1184 | Bool hasSuffix ( Char* s, Char* suffix ) | 1110 | Bool hasSuffix ( Char* s, const Char* suffix ) |
1185 | { | 1111 | { |
1186 | Int32 ns = strlen(s); | 1112 | Int32 ns = strlen(s); |
1187 | Int32 nx = strlen(suffix); | 1113 | Int32 nx = strlen(suffix); |
@@ -1192,7 +1118,8 @@ Bool hasSuffix ( Char* s, Char* suffix ) | |||
1192 | 1118 | ||
1193 | static | 1119 | static |
1194 | Bool mapSuffix ( Char* name, | 1120 | Bool mapSuffix ( Char* name, |
1195 | Char* oldSuffix, Char* newSuffix ) | 1121 | const Char* oldSuffix, |
1122 | const Char* newSuffix ) | ||
1196 | { | 1123 | { |
1197 | if (!hasSuffix(name,oldSuffix)) return False; | 1124 | if (!hasSuffix(name,oldSuffix)) return False; |
1198 | name[strlen(name)-strlen(oldSuffix)] = 0; | 1125 | name[strlen(name)-strlen(oldSuffix)] = 0; |
@@ -1217,8 +1144,8 @@ void compress ( Char *name ) | |||
1217 | 1144 | ||
1218 | switch (srcMode) { | 1145 | switch (srcMode) { |
1219 | case SM_I2O: | 1146 | case SM_I2O: |
1220 | copyFileName ( inName, "(stdin)" ); | 1147 | copyFileName ( inName, (Char*)"(stdin)" ); |
1221 | copyFileName ( outName, "(stdout)" ); | 1148 | copyFileName ( outName, (Char*)"(stdout)" ); |
1222 | break; | 1149 | break; |
1223 | case SM_F2F: | 1150 | case SM_F2F: |
1224 | copyFileName ( inName, name ); | 1151 | copyFileName ( inName, name ); |
@@ -1227,7 +1154,7 @@ void compress ( Char *name ) | |||
1227 | break; | 1154 | break; |
1228 | case SM_F2O: | 1155 | case SM_F2O: |
1229 | copyFileName ( inName, name ); | 1156 | copyFileName ( inName, name ); |
1230 | copyFileName ( outName, "(stdout)" ); | 1157 | copyFileName ( outName, (Char*)"(stdout)" ); |
1231 | break; | 1158 | break; |
1232 | } | 1159 | } |
1233 | 1160 | ||
@@ -1370,7 +1297,7 @@ void compress ( Char *name ) | |||
1370 | 1297 | ||
1371 | /*--- If there was an I/O error, we won't get here. ---*/ | 1298 | /*--- If there was an I/O error, we won't get here. ---*/ |
1372 | if ( srcMode == SM_F2F ) { | 1299 | if ( srcMode == SM_F2F ) { |
1373 | applySavedMetaInfoToOutputFile ( outName ); | 1300 | applySavedTimeInfoToOutputFile ( outName ); |
1374 | deleteOutputOnInterrupt = False; | 1301 | deleteOutputOnInterrupt = False; |
1375 | if ( !keepInputFiles ) { | 1302 | if ( !keepInputFiles ) { |
1376 | IntNative retVal = remove ( inName ); | 1303 | IntNative retVal = remove ( inName ); |
@@ -1401,8 +1328,8 @@ void uncompress ( Char *name ) | |||
1401 | cantGuess = False; | 1328 | cantGuess = False; |
1402 | switch (srcMode) { | 1329 | switch (srcMode) { |
1403 | case SM_I2O: | 1330 | case SM_I2O: |
1404 | copyFileName ( inName, "(stdin)" ); | 1331 | copyFileName ( inName, (Char*)"(stdin)" ); |
1405 | copyFileName ( outName, "(stdout)" ); | 1332 | copyFileName ( outName, (Char*)"(stdout)" ); |
1406 | break; | 1333 | break; |
1407 | case SM_F2F: | 1334 | case SM_F2F: |
1408 | copyFileName ( inName, name ); | 1335 | copyFileName ( inName, name ); |
@@ -1415,7 +1342,7 @@ void uncompress ( Char *name ) | |||
1415 | break; | 1342 | break; |
1416 | case SM_F2O: | 1343 | case SM_F2O: |
1417 | copyFileName ( inName, name ); | 1344 | copyFileName ( inName, name ); |
1418 | copyFileName ( outName, "(stdout)" ); | 1345 | copyFileName ( outName, (Char*)"(stdout)" ); |
1419 | break; | 1346 | break; |
1420 | } | 1347 | } |
1421 | 1348 | ||
@@ -1548,7 +1475,7 @@ void uncompress ( Char *name ) | |||
1548 | /*--- If there was an I/O error, we won't get here. ---*/ | 1475 | /*--- If there was an I/O error, we won't get here. ---*/ |
1549 | if ( magicNumberOK ) { | 1476 | if ( magicNumberOK ) { |
1550 | if ( srcMode == SM_F2F ) { | 1477 | if ( srcMode == SM_F2F ) { |
1551 | applySavedMetaInfoToOutputFile ( outName ); | 1478 | applySavedTimeInfoToOutputFile ( outName ); |
1552 | deleteOutputOnInterrupt = False; | 1479 | deleteOutputOnInterrupt = False; |
1553 | if ( !keepInputFiles ) { | 1480 | if ( !keepInputFiles ) { |
1554 | IntNative retVal = remove ( inName ); | 1481 | IntNative retVal = remove ( inName ); |
@@ -1593,9 +1520,9 @@ void testf ( Char *name ) | |||
1593 | if (name == NULL && srcMode != SM_I2O) | 1520 | if (name == NULL && srcMode != SM_I2O) |
1594 | panic ( "testf: bad modes\n" ); | 1521 | panic ( "testf: bad modes\n" ); |
1595 | 1522 | ||
1596 | copyFileName ( outName, "(none)" ); | 1523 | copyFileName ( outName, (Char*)"(none)" ); |
1597 | switch (srcMode) { | 1524 | switch (srcMode) { |
1598 | case SM_I2O: copyFileName ( inName, "(stdin)" ); break; | 1525 | case SM_I2O: copyFileName ( inName, (Char*)"(stdin)" ); break; |
1599 | case SM_F2F: copyFileName ( inName, name ); break; | 1526 | case SM_F2F: copyFileName ( inName, name ); break; |
1600 | case SM_F2O: copyFileName ( inName, name ); break; | 1527 | case SM_F2O: copyFileName ( inName, name ); break; |
1601 | } | 1528 | } |
@@ -1678,11 +1605,11 @@ void license ( void ) | |||
1678 | "bzip2, a block-sorting file compressor. " | 1605 | "bzip2, a block-sorting file compressor. " |
1679 | "Version %s.\n" | 1606 | "Version %s.\n" |
1680 | " \n" | 1607 | " \n" |
1681 | " Copyright (C) 1996-2005 by Julian Seward.\n" | 1608 | " Copyright (C) 1996-2006 by Julian Seward.\n" |
1682 | " \n" | 1609 | " \n" |
1683 | " This program is free software; you can redistribute it and/or modify\n" | 1610 | " This program is free software; you can redistribute it and/or modify\n" |
1684 | " it under the terms set out in the LICENSE file, which is included\n" | 1611 | " it under the terms set out in the LICENSE file, which is included\n" |
1685 | " in the bzip2-1.0 source distribution.\n" | 1612 | " in the bzip2-1.0.4 source distribution.\n" |
1686 | " \n" | 1613 | " \n" |
1687 | " This program is distributed in the hope that it will be useful,\n" | 1614 | " This program is distributed in the hope that it will be useful,\n" |
1688 | " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" | 1615 | " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" |
@@ -1885,8 +1812,8 @@ IntNative main ( IntNative argc, Char *argv[] ) | |||
1885 | # endif | 1812 | # endif |
1886 | # endif | 1813 | # endif |
1887 | 1814 | ||
1888 | copyFileName ( inName, "(none)" ); | 1815 | copyFileName ( inName, (Char*)"(none)" ); |
1889 | copyFileName ( outName, "(none)" ); | 1816 | copyFileName ( outName, (Char*)"(none)" ); |
1890 | 1817 | ||
1891 | copyFileName ( progNameReally, argv[0] ); | 1818 | copyFileName ( progNameReally, argv[0] ); |
1892 | progName = &progNameReally[0]; | 1819 | progName = &progNameReally[0]; |
@@ -1898,8 +1825,8 @@ IntNative main ( IntNative argc, Char *argv[] ) | |||
1898 | expand filename wildcards in arg list. | 1825 | expand filename wildcards in arg list. |
1899 | --*/ | 1826 | --*/ |
1900 | argList = NULL; | 1827 | argList = NULL; |
1901 | addFlagsFromEnvVar ( &argList, "BZIP2" ); | 1828 | addFlagsFromEnvVar ( &argList, (Char*)"BZIP2" ); |
1902 | addFlagsFromEnvVar ( &argList, "BZIP" ); | 1829 | addFlagsFromEnvVar ( &argList, (Char*)"BZIP" ); |
1903 | for (i = 1; i <= argc-1; i++) | 1830 | for (i = 1; i <= argc-1; i++) |
1904 | APPEND_FILESPEC(argList, argv[i]); | 1831 | APPEND_FILESPEC(argList, argv[i]); |
1905 | 1832 | ||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | NAME | 2 | NAME |
3 | bzip2, bunzip2 - a block-sorting file compressor, v1.0.3 | 3 | bzip2, bunzip2 - a block-sorting file compressor, v1.0.4 |
4 | bzcat - decompresses files to stdout | 4 | bzcat - decompresses files to stdout |
5 | bzip2recover - recovers data from damaged bzip2 files | 5 | bzip2recover - recovers data from damaged bzip2 files |
6 | 6 | ||
@@ -345,14 +345,14 @@ CAVEATS | |||
345 | but the details of what the problem is sometimes seem | 345 | but the details of what the problem is sometimes seem |
346 | rather misleading. | 346 | rather misleading. |
347 | 347 | ||
348 | This manual page pertains to version 1.0.3 of bzip2. Com- | 348 | This manual page pertains to version 1.0.4 of bzip2. Com- |
349 | pressed data created by this version is entirely forwards | 349 | pressed data created by this version is entirely forwards |
350 | and backwards compatible with the previous public | 350 | and backwards compatible with the previous public |
351 | releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1 and | 351 | releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, |
352 | 1.0.2, but with the following exception: 0.9.0 and above | 352 | 1.0.2 and 1.0.3, but with the following exception: 0.9.0 |
353 | can correctly decompress multiple concatenated compressed | 353 | and above can correctly decompress multiple concatenated |
354 | files. 0.1pl2 cannot do this; it will stop after decom- | 354 | compressed files. 0.1pl2 cannot do this; it will stop |
355 | pressing just the first file in the stream. | 355 | after decompressing just the first file in the stream. |
356 | 356 | ||
357 | bzip2recover versions prior to 1.0.2 used 32-bit integers | 357 | bzip2recover versions prior to 1.0.2 used 32-bit integers |
358 | to represent bit positions in compressed files, so they | 358 | to represent bit positions in compressed files, so they |
diff --git a/bzip2recover.c b/bzip2recover.c index 5cd405d..ffe60bc 100644 --- a/bzip2recover.c +++ b/bzip2recover.c | |||
@@ -1,56 +1,24 @@ | |||
1 | |||
2 | /*-----------------------------------------------------------*/ | 1 | /*-----------------------------------------------------------*/ |
3 | /*--- Block recoverer program for bzip2 ---*/ | 2 | /*--- Block recoverer program for bzip2 ---*/ |
4 | /*--- bzip2recover.c ---*/ | 3 | /*--- bzip2recover.c ---*/ |
5 | /*-----------------------------------------------------------*/ | 4 | /*-----------------------------------------------------------*/ |
6 | 5 | ||
7 | /*-- | 6 | /* ------------------------------------------------------------------ |
8 | This program is bzip2recover, a program to attempt data | 7 | This file is part of bzip2/libbzip2, a program and library for |
9 | salvage from damaged files created by the accompanying | 8 | lossless, block-sorting data compression. |
10 | bzip2-1.0.3 program. | ||
11 | |||
12 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | ||
13 | |||
14 | Redistribution and use in source and binary forms, with or without | ||
15 | modification, are permitted provided that the following conditions | ||
16 | are met: | ||
17 | |||
18 | 1. Redistributions of source code must retain the above copyright | ||
19 | notice, this list of conditions and the following disclaimer. | ||
20 | |||
21 | 2. The origin of this software must not be misrepresented; you must | ||
22 | not claim that you wrote the original software. If you use this | ||
23 | software in a product, an acknowledgment in the product | ||
24 | documentation would be appreciated but is not required. | ||
25 | |||
26 | 3. Altered source versions must be plainly marked as such, and must | ||
27 | not be misrepresented as being the original software. | ||
28 | |||
29 | 4. The name of the author may not be used to endorse or promote | ||
30 | products derived from this software without specific prior written | ||
31 | permission. | ||
32 | |||
33 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | ||
34 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
35 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
36 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
37 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
38 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
39 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
40 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
41 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
42 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
43 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
44 | |||
45 | Julian Seward, Cambridge, UK. | ||
46 | jseward@bzip.org | ||
47 | bzip2/libbzip2 version 1.0.3 of 15 February 2005 | ||
48 | --*/ | ||
49 | 9 | ||
50 | /*-- | 10 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
51 | This program is a complete hack and should be rewritten | 11 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> |
52 | properly. It isn't very complicated. | 12 | |
53 | --*/ | 13 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
14 | README file. | ||
15 | |||
16 | This program is released under the terms of the license contained | ||
17 | in the file LICENSE. | ||
18 | ------------------------------------------------------------------ */ | ||
19 | |||
20 | /* This program is a complete hack and should be rewritten properly. | ||
21 | It isn't very complicated. */ | ||
54 | 22 | ||
55 | #include <stdio.h> | 23 | #include <stdio.h> |
56 | #include <errno.h> | 24 | #include <errno.h> |
@@ -114,7 +82,7 @@ MaybeUInt64 bytesIn = 0; | |||
114 | /*---------------------------------------------------*/ | 82 | /*---------------------------------------------------*/ |
115 | 83 | ||
116 | /*---------------------------------------------*/ | 84 | /*---------------------------------------------*/ |
117 | void readError ( void ) | 85 | static void readError ( void ) |
118 | { | 86 | { |
119 | fprintf ( stderr, | 87 | fprintf ( stderr, |
120 | "%s: I/O error reading `%s', possible reason follows.\n", | 88 | "%s: I/O error reading `%s', possible reason follows.\n", |
@@ -127,7 +95,7 @@ void readError ( void ) | |||
127 | 95 | ||
128 | 96 | ||
129 | /*---------------------------------------------*/ | 97 | /*---------------------------------------------*/ |
130 | void writeError ( void ) | 98 | static void writeError ( void ) |
131 | { | 99 | { |
132 | fprintf ( stderr, | 100 | fprintf ( stderr, |
133 | "%s: I/O error reading `%s', possible reason follows.\n", | 101 | "%s: I/O error reading `%s', possible reason follows.\n", |
@@ -140,7 +108,7 @@ void writeError ( void ) | |||
140 | 108 | ||
141 | 109 | ||
142 | /*---------------------------------------------*/ | 110 | /*---------------------------------------------*/ |
143 | void mallocFail ( Int32 n ) | 111 | static void mallocFail ( Int32 n ) |
144 | { | 112 | { |
145 | fprintf ( stderr, | 113 | fprintf ( stderr, |
146 | "%s: malloc failed on request for %d bytes.\n", | 114 | "%s: malloc failed on request for %d bytes.\n", |
@@ -152,7 +120,7 @@ void mallocFail ( Int32 n ) | |||
152 | 120 | ||
153 | 121 | ||
154 | /*---------------------------------------------*/ | 122 | /*---------------------------------------------*/ |
155 | void tooManyBlocks ( Int32 max_handled_blocks ) | 123 | static void tooManyBlocks ( Int32 max_handled_blocks ) |
156 | { | 124 | { |
157 | fprintf ( stderr, | 125 | fprintf ( stderr, |
158 | "%s: `%s' appears to contain more than %d blocks\n", | 126 | "%s: `%s' appears to contain more than %d blocks\n", |
@@ -183,7 +151,7 @@ typedef | |||
183 | 151 | ||
184 | 152 | ||
185 | /*---------------------------------------------*/ | 153 | /*---------------------------------------------*/ |
186 | BitStream* bsOpenReadStream ( FILE* stream ) | 154 | static BitStream* bsOpenReadStream ( FILE* stream ) |
187 | { | 155 | { |
188 | BitStream *bs = malloc ( sizeof(BitStream) ); | 156 | BitStream *bs = malloc ( sizeof(BitStream) ); |
189 | if (bs == NULL) mallocFail ( sizeof(BitStream) ); | 157 | if (bs == NULL) mallocFail ( sizeof(BitStream) ); |
@@ -196,7 +164,7 @@ BitStream* bsOpenReadStream ( FILE* stream ) | |||
196 | 164 | ||
197 | 165 | ||
198 | /*---------------------------------------------*/ | 166 | /*---------------------------------------------*/ |
199 | BitStream* bsOpenWriteStream ( FILE* stream ) | 167 | static BitStream* bsOpenWriteStream ( FILE* stream ) |
200 | { | 168 | { |
201 | BitStream *bs = malloc ( sizeof(BitStream) ); | 169 | BitStream *bs = malloc ( sizeof(BitStream) ); |
202 | if (bs == NULL) mallocFail ( sizeof(BitStream) ); | 170 | if (bs == NULL) mallocFail ( sizeof(BitStream) ); |
@@ -209,7 +177,7 @@ BitStream* bsOpenWriteStream ( FILE* stream ) | |||
209 | 177 | ||
210 | 178 | ||
211 | /*---------------------------------------------*/ | 179 | /*---------------------------------------------*/ |
212 | void bsPutBit ( BitStream* bs, Int32 bit ) | 180 | static void bsPutBit ( BitStream* bs, Int32 bit ) |
213 | { | 181 | { |
214 | if (bs->buffLive == 8) { | 182 | if (bs->buffLive == 8) { |
215 | Int32 retVal = putc ( (UChar) bs->buffer, bs->handle ); | 183 | Int32 retVal = putc ( (UChar) bs->buffer, bs->handle ); |
@@ -228,7 +196,7 @@ void bsPutBit ( BitStream* bs, Int32 bit ) | |||
228 | /*-- | 196 | /*-- |
229 | Returns 0 or 1, or 2 to indicate EOF. | 197 | Returns 0 or 1, or 2 to indicate EOF. |
230 | --*/ | 198 | --*/ |
231 | Int32 bsGetBit ( BitStream* bs ) | 199 | static Int32 bsGetBit ( BitStream* bs ) |
232 | { | 200 | { |
233 | if (bs->buffLive > 0) { | 201 | if (bs->buffLive > 0) { |
234 | bs->buffLive --; | 202 | bs->buffLive --; |
@@ -247,7 +215,7 @@ Int32 bsGetBit ( BitStream* bs ) | |||
247 | 215 | ||
248 | 216 | ||
249 | /*---------------------------------------------*/ | 217 | /*---------------------------------------------*/ |
250 | void bsClose ( BitStream* bs ) | 218 | static void bsClose ( BitStream* bs ) |
251 | { | 219 | { |
252 | Int32 retVal; | 220 | Int32 retVal; |
253 | 221 | ||
@@ -271,7 +239,7 @@ void bsClose ( BitStream* bs ) | |||
271 | 239 | ||
272 | 240 | ||
273 | /*---------------------------------------------*/ | 241 | /*---------------------------------------------*/ |
274 | void bsPutUChar ( BitStream* bs, UChar c ) | 242 | static void bsPutUChar ( BitStream* bs, UChar c ) |
275 | { | 243 | { |
276 | Int32 i; | 244 | Int32 i; |
277 | for (i = 7; i >= 0; i--) | 245 | for (i = 7; i >= 0; i--) |
@@ -280,7 +248,7 @@ void bsPutUChar ( BitStream* bs, UChar c ) | |||
280 | 248 | ||
281 | 249 | ||
282 | /*---------------------------------------------*/ | 250 | /*---------------------------------------------*/ |
283 | void bsPutUInt32 ( BitStream* bs, UInt32 c ) | 251 | static void bsPutUInt32 ( BitStream* bs, UInt32 c ) |
284 | { | 252 | { |
285 | Int32 i; | 253 | Int32 i; |
286 | 254 | ||
@@ -290,7 +258,7 @@ void bsPutUInt32 ( BitStream* bs, UInt32 c ) | |||
290 | 258 | ||
291 | 259 | ||
292 | /*---------------------------------------------*/ | 260 | /*---------------------------------------------*/ |
293 | Bool endsInBz2 ( Char* name ) | 261 | static Bool endsInBz2 ( Char* name ) |
294 | { | 262 | { |
295 | Int32 n = strlen ( name ); | 263 | Int32 n = strlen ( name ); |
296 | if (n <= 4) return False; | 264 | if (n <= 4) return False; |
@@ -345,7 +313,7 @@ Int32 main ( Int32 argc, Char** argv ) | |||
345 | inFileName[0] = outFileName[0] = 0; | 313 | inFileName[0] = outFileName[0] = 0; |
346 | 314 | ||
347 | fprintf ( stderr, | 315 | fprintf ( stderr, |
348 | "bzip2recover 1.0.3: extracts blocks from damaged .bz2 files.\n" ); | 316 | "bzip2recover 1.0.4: extracts blocks from damaged .bz2 files.\n" ); |
349 | 317 | ||
350 | if (argc != 2) { | 318 | if (argc != 2) { |
351 | fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", | 319 | fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", |
@@ -4,74 +4,29 @@ | |||
4 | /*--- bzlib.c ---*/ | 4 | /*--- bzlib.c ---*/ |
5 | /*-------------------------------------------------------------*/ | 5 | /*-------------------------------------------------------------*/ |
6 | 6 | ||
7 | /*-- | 7 | /* ------------------------------------------------------------------ |
8 | This file is a part of bzip2 and/or libbzip2, a program and | 8 | This file is part of bzip2/libbzip2, a program and library for |
9 | library for lossless, block-sorting data compression. | 9 | lossless, block-sorting data compression. |
10 | |||
11 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | ||
12 | |||
13 | Redistribution and use in source and binary forms, with or without | ||
14 | modification, are permitted provided that the following conditions | ||
15 | are met: | ||
16 | |||
17 | 1. Redistributions of source code must retain the above copyright | ||
18 | notice, this list of conditions and the following disclaimer. | ||
19 | |||
20 | 2. The origin of this software must not be misrepresented; you must | ||
21 | not claim that you wrote the original software. If you use this | ||
22 | software in a product, an acknowledgment in the product | ||
23 | documentation would be appreciated but is not required. | ||
24 | |||
25 | 3. Altered source versions must be plainly marked as such, and must | ||
26 | not be misrepresented as being the original software. | ||
27 | |||
28 | 4. The name of the author may not be used to endorse or promote | ||
29 | products derived from this software without specific prior written | ||
30 | permission. | ||
31 | |||
32 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | ||
33 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
34 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
35 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
36 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
37 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
38 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
39 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
40 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
43 | |||
44 | Julian Seward, Cambridge, UK. | ||
45 | jseward@bzip.org | ||
46 | bzip2/libbzip2 version 1.0 of 21 March 2000 | ||
47 | |||
48 | This program is based on (at least) the work of: | ||
49 | Mike Burrows | ||
50 | David Wheeler | ||
51 | Peter Fenwick | ||
52 | Alistair Moffat | ||
53 | Radford Neal | ||
54 | Ian H. Witten | ||
55 | Robert Sedgewick | ||
56 | Jon L. Bentley | ||
57 | |||
58 | For more information on these sources, see the manual. | ||
59 | --*/ | ||
60 | 10 | ||
61 | /*-- | 11 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
62 | CHANGES | 12 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> |
63 | ~~~~~~~ | ||
64 | 0.9.0 -- original version. | ||
65 | 13 | ||
66 | 0.9.0a/b -- no changes in this file. | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
15 | README file. | ||
67 | 16 | ||
68 | 0.9.0c | 17 | This program is released under the terms of the license contained |
69 | * made zero-length BZ_FLUSH work correctly in bzCompress(). | 18 | in the file LICENSE. |
70 | * fixed bzWrite/bzRead to ignore zero-length requests. | 19 | ------------------------------------------------------------------ */ |
71 | * fixed bzread to correctly handle read requests after EOF. | 20 | |
72 | * wrong parameter order in call to bzDecompressInit in | 21 | /* CHANGES |
73 | bzBuffToBuffDecompress. Fixed. | 22 | 0.9.0 -- original version. |
74 | --*/ | 23 | 0.9.0a/b -- no changes in this file. |
24 | 0.9.0c -- made zero-length BZ_FLUSH work correctly in bzCompress(). | ||
25 | fixed bzWrite/bzRead to ignore zero-length requests. | ||
26 | fixed bzread to correctly handle read requests after EOF. | ||
27 | wrong parameter order in call to bzDecompressInit in | ||
28 | bzBuffToBuffDecompress. Fixed. | ||
29 | */ | ||
75 | 30 | ||
76 | #include "bzlib_private.h" | 31 | #include "bzlib_private.h" |
77 | 32 | ||
@@ -1394,8 +1349,7 @@ int BZ_API(BZ2_bzBuffToBuffDecompress) | |||
1394 | 1349 | ||
1395 | /*---------------------------------------------------*/ | 1350 | /*---------------------------------------------------*/ |
1396 | /*-- | 1351 | /*-- |
1397 | Code contributed by Yoshioka Tsuneo | 1352 | Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp) |
1398 | (QWF00133@niftyserve.or.jp/tsuneo-y@is.aist-nara.ac.jp), | ||
1399 | to support better zlib compatibility. | 1353 | to support better zlib compatibility. |
1400 | This code is not _officially_ part of libbzip2 (yet); | 1354 | This code is not _officially_ part of libbzip2 (yet); |
1401 | I haven't tested it, documented it, or considered the | 1355 | I haven't tested it, documented it, or considered the |
@@ -1406,7 +1360,7 @@ int BZ_API(BZ2_bzBuffToBuffDecompress) | |||
1406 | 1360 | ||
1407 | /*---------------------------------------------------*/ | 1361 | /*---------------------------------------------------*/ |
1408 | /*-- | 1362 | /*-- |
1409 | return version like "0.9.0c". | 1363 | return version like "0.9.5d, 4-Sept-1999". |
1410 | --*/ | 1364 | --*/ |
1411 | const char * BZ_API(BZ2_bzlibVersion)(void) | 1365 | const char * BZ_API(BZ2_bzlibVersion)(void) |
1412 | { | 1366 | { |
@@ -1559,9 +1513,10 @@ int BZ_API(BZ2_bzflush) (BZFILE *b) | |||
1559 | void BZ_API(BZ2_bzclose) (BZFILE* b) | 1513 | void BZ_API(BZ2_bzclose) (BZFILE* b) |
1560 | { | 1514 | { |
1561 | int bzerr; | 1515 | int bzerr; |
1562 | FILE *fp = ((bzFile *)b)->handle; | 1516 | FILE *fp; |
1563 | 1517 | ||
1564 | if (b==NULL) {return;} | 1518 | if (b==NULL) {return;} |
1519 | fp = ((bzFile *)b)->handle; | ||
1565 | if(((bzFile*)b)->writing){ | 1520 | if(((bzFile*)b)->writing){ |
1566 | BZ2_bzWriteClose(&bzerr,b,0,NULL,NULL); | 1521 | BZ2_bzWriteClose(&bzerr,b,0,NULL,NULL); |
1567 | if(bzerr != BZ_OK){ | 1522 | if(bzerr != BZ_OK){ |
@@ -1580,7 +1535,7 @@ void BZ_API(BZ2_bzclose) (BZFILE* b) | |||
1580 | /*-- | 1535 | /*-- |
1581 | return last error code | 1536 | return last error code |
1582 | --*/ | 1537 | --*/ |
1583 | static char *bzerrorstrings[] = { | 1538 | static const char *bzerrorstrings[] = { |
1584 | "OK" | 1539 | "OK" |
1585 | ,"SEQUENCE_ERROR" | 1540 | ,"SEQUENCE_ERROR" |
1586 | ,"PARAM_ERROR" | 1541 | ,"PARAM_ERROR" |
@@ -4,59 +4,19 @@ | |||
4 | /*--- bzlib.h ---*/ | 4 | /*--- bzlib.h ---*/ |
5 | /*-------------------------------------------------------------*/ | 5 | /*-------------------------------------------------------------*/ |
6 | 6 | ||
7 | /*-- | 7 | /* ------------------------------------------------------------------ |
8 | This file is a part of bzip2 and/or libbzip2, a program and | 8 | This file is part of bzip2/libbzip2, a program and library for |
9 | library for lossless, block-sorting data compression. | 9 | lossless, block-sorting data compression. |
10 | 10 | ||
11 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | 11 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
12 | 12 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | |
13 | Redistribution and use in source and binary forms, with or without | 13 | |
14 | modification, are permitted provided that the following conditions | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
15 | are met: | 15 | README file. |
16 | 16 | ||
17 | 1. Redistributions of source code must retain the above copyright | 17 | This program is released under the terms of the license contained |
18 | notice, this list of conditions and the following disclaimer. | 18 | in the file LICENSE. |
19 | 19 | ------------------------------------------------------------------ */ | |
20 | 2. The origin of this software must not be misrepresented; you must | ||
21 | not claim that you wrote the original software. If you use this | ||
22 | software in a product, an acknowledgment in the product | ||
23 | documentation would be appreciated but is not required. | ||
24 | |||
25 | 3. Altered source versions must be plainly marked as such, and must | ||
26 | not be misrepresented as being the original software. | ||
27 | |||
28 | 4. The name of the author may not be used to endorse or promote | ||
29 | products derived from this software without specific prior written | ||
30 | permission. | ||
31 | |||
32 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | ||
33 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
34 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
35 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
36 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
37 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
38 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
39 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
40 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
43 | |||
44 | Julian Seward, Cambridge, UK. | ||
45 | jseward@bzip.org | ||
46 | bzip2/libbzip2 version 1.0 of 21 March 2000 | ||
47 | |||
48 | This program is based on (at least) the work of: | ||
49 | Mike Burrows | ||
50 | David Wheeler | ||
51 | Peter Fenwick | ||
52 | Alistair Moffat | ||
53 | Radford Neal | ||
54 | Ian H. Witten | ||
55 | Robert Sedgewick | ||
56 | Jon L. Bentley | ||
57 | |||
58 | For more information on these sources, see the manual. | ||
59 | --*/ | ||
60 | 20 | ||
61 | 21 | ||
62 | #ifndef _BZLIB_H | 22 | #ifndef _BZLIB_H |
@@ -262,8 +222,7 @@ BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( | |||
262 | 222 | ||
263 | 223 | ||
264 | /*-- | 224 | /*-- |
265 | Code contributed by Yoshioka Tsuneo | 225 | Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp) |
266 | (QWF00133@niftyserve.or.jp/tsuneo-y@is.aist-nara.ac.jp), | ||
267 | to support better zlib compatibility. | 226 | to support better zlib compatibility. |
268 | This code is not _officially_ part of libbzip2 (yet); | 227 | This code is not _officially_ part of libbzip2 (yet); |
269 | I haven't tested it, documented it, or considered the | 228 | I haven't tested it, documented it, or considered the |
diff --git a/bzlib_private.h b/bzlib_private.h index ca76fe6..d0a0554 100644 --- a/bzlib_private.h +++ b/bzlib_private.h | |||
@@ -4,59 +4,19 @@ | |||
4 | /*--- bzlib_private.h ---*/ | 4 | /*--- bzlib_private.h ---*/ |
5 | /*-------------------------------------------------------------*/ | 5 | /*-------------------------------------------------------------*/ |
6 | 6 | ||
7 | /*-- | 7 | /* ------------------------------------------------------------------ |
8 | This file is a part of bzip2 and/or libbzip2, a program and | 8 | This file is part of bzip2/libbzip2, a program and library for |
9 | library for lossless, block-sorting data compression. | 9 | lossless, block-sorting data compression. |
10 | 10 | ||
11 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | 11 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
12 | 12 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | |
13 | Redistribution and use in source and binary forms, with or without | 13 | |
14 | modification, are permitted provided that the following conditions | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
15 | are met: | 15 | README file. |
16 | 16 | ||
17 | 1. Redistributions of source code must retain the above copyright | 17 | This program is released under the terms of the license contained |
18 | notice, this list of conditions and the following disclaimer. | 18 | in the file LICENSE. |
19 | 19 | ------------------------------------------------------------------ */ | |
20 | 2. The origin of this software must not be misrepresented; you must | ||
21 | not claim that you wrote the original software. If you use this | ||
22 | software in a product, an acknowledgment in the product | ||
23 | documentation would be appreciated but is not required. | ||
24 | |||
25 | 3. Altered source versions must be plainly marked as such, and must | ||
26 | not be misrepresented as being the original software. | ||
27 | |||
28 | 4. The name of the author may not be used to endorse or promote | ||
29 | products derived from this software without specific prior written | ||
30 | permission. | ||
31 | |||
32 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | ||
33 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
34 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
35 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
36 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
37 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
38 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
39 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
40 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
43 | |||
44 | Julian Seward, Cambridge, UK. | ||
45 | jseward@bzip.org | ||
46 | bzip2/libbzip2 version 1.0 of 21 March 2000 | ||
47 | |||
48 | This program is based on (at least) the work of: | ||
49 | Mike Burrows | ||
50 | David Wheeler | ||
51 | Peter Fenwick | ||
52 | Alistair Moffat | ||
53 | Radford Neal | ||
54 | Ian H. Witten | ||
55 | Robert Sedgewick | ||
56 | Jon L. Bentley | ||
57 | |||
58 | For more information on these sources, see the manual. | ||
59 | --*/ | ||
60 | 20 | ||
61 | 21 | ||
62 | #ifndef _BZLIB_PRIVATE_H | 22 | #ifndef _BZLIB_PRIVATE_H |
@@ -76,7 +36,7 @@ | |||
76 | 36 | ||
77 | /*-- General stuff. --*/ | 37 | /*-- General stuff. --*/ |
78 | 38 | ||
79 | #define BZ_VERSION "1.0.3, 15-Feb-2005" | 39 | #define BZ_VERSION "1.0.4, 20-Dec-2006" |
80 | 40 | ||
81 | typedef char Char; | 41 | typedef char Char; |
82 | typedef unsigned char Bool; | 42 | typedef unsigned char Bool; |
@@ -94,9 +54,11 @@ typedef unsigned short UInt16; | |||
94 | #endif | 54 | #endif |
95 | 55 | ||
96 | #ifndef BZ_NO_STDIO | 56 | #ifndef BZ_NO_STDIO |
57 | |||
97 | extern void BZ2_bz__AssertH__fail ( int errcode ); | 58 | extern void BZ2_bz__AssertH__fail ( int errcode ); |
98 | #define AssertH(cond,errcode) \ | 59 | #define AssertH(cond,errcode) \ |
99 | { if (!(cond)) BZ2_bz__AssertH__fail ( errcode ); } | 60 | { if (!(cond)) BZ2_bz__AssertH__fail ( errcode ); } |
61 | |||
100 | #if BZ_DEBUG | 62 | #if BZ_DEBUG |
101 | #define AssertD(cond,msg) \ | 63 | #define AssertD(cond,msg) \ |
102 | { if (!(cond)) { \ | 64 | { if (!(cond)) { \ |
@@ -107,6 +69,7 @@ extern void BZ2_bz__AssertH__fail ( int errcode ); | |||
107 | #else | 69 | #else |
108 | #define AssertD(cond,msg) /* */ | 70 | #define AssertD(cond,msg) /* */ |
109 | #endif | 71 | #endif |
72 | |||
110 | #define VPrintf0(zf) \ | 73 | #define VPrintf0(zf) \ |
111 | fprintf(stderr,zf) | 74 | fprintf(stderr,zf) |
112 | #define VPrintf1(zf,za1) \ | 75 | #define VPrintf1(zf,za1) \ |
@@ -119,17 +82,20 @@ extern void BZ2_bz__AssertH__fail ( int errcode ); | |||
119 | fprintf(stderr,zf,za1,za2,za3,za4) | 82 | fprintf(stderr,zf,za1,za2,za3,za4) |
120 | #define VPrintf5(zf,za1,za2,za3,za4,za5) \ | 83 | #define VPrintf5(zf,za1,za2,za3,za4,za5) \ |
121 | fprintf(stderr,zf,za1,za2,za3,za4,za5) | 84 | fprintf(stderr,zf,za1,za2,za3,za4,za5) |
85 | |||
122 | #else | 86 | #else |
87 | |||
123 | extern void bz_internal_error ( int errcode ); | 88 | extern void bz_internal_error ( int errcode ); |
124 | #define AssertH(cond,errcode) \ | 89 | #define AssertH(cond,errcode) \ |
125 | { if (!(cond)) bz_internal_error ( errcode ); } | 90 | { if (!(cond)) bz_internal_error ( errcode ); } |
126 | #define AssertD(cond,msg) /* */ | 91 | #define AssertD(cond,msg) do { } while (0) |
127 | #define VPrintf0(zf) /* */ | 92 | #define VPrintf0(zf) do { } while (0) |
128 | #define VPrintf1(zf,za1) /* */ | 93 | #define VPrintf1(zf,za1) do { } while (0) |
129 | #define VPrintf2(zf,za1,za2) /* */ | 94 | #define VPrintf2(zf,za1,za2) do { } while (0) |
130 | #define VPrintf3(zf,za1,za2,za3) /* */ | 95 | #define VPrintf3(zf,za1,za2,za3) do { } while (0) |
131 | #define VPrintf4(zf,za1,za2,za3,za4) /* */ | 96 | #define VPrintf4(zf,za1,za2,za3,za4) do { } while (0) |
132 | #define VPrintf5(zf,za1,za2,za3,za4,za5) /* */ | 97 | #define VPrintf5(zf,za1,za2,za3,za4,za5) do { } while (0) |
98 | |||
133 | #endif | 99 | #endif |
134 | 100 | ||
135 | 101 | ||
@@ -4,71 +4,27 @@ | |||
4 | /*--- compress.c ---*/ | 4 | /*--- compress.c ---*/ |
5 | /*-------------------------------------------------------------*/ | 5 | /*-------------------------------------------------------------*/ |
6 | 6 | ||
7 | /*-- | 7 | /* ------------------------------------------------------------------ |
8 | This file is a part of bzip2 and/or libbzip2, a program and | 8 | This file is part of bzip2/libbzip2, a program and library for |
9 | library for lossless, block-sorting data compression. | 9 | lossless, block-sorting data compression. |
10 | 10 | ||
11 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | 11 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
12 | 12 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | |
13 | Redistribution and use in source and binary forms, with or without | 13 | |
14 | modification, are permitted provided that the following conditions | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
15 | are met: | 15 | README file. |
16 | 16 | ||
17 | 1. Redistributions of source code must retain the above copyright | 17 | This program is released under the terms of the license contained |
18 | notice, this list of conditions and the following disclaimer. | 18 | in the file LICENSE. |
19 | 19 | ------------------------------------------------------------------ */ | |
20 | 2. The origin of this software must not be misrepresented; you must | 20 | |
21 | not claim that you wrote the original software. If you use this | 21 | |
22 | software in a product, an acknowledgment in the product | 22 | /* CHANGES |
23 | documentation would be appreciated but is not required. | 23 | 0.9.0 -- original version. |
24 | 24 | 0.9.0a/b -- no changes in this file. | |
25 | 3. Altered source versions must be plainly marked as such, and must | 25 | 0.9.0c -- changed setting of nGroups in sendMTFValues() |
26 | not be misrepresented as being the original software. | 26 | so as to do a bit better on small files |
27 | 27 | */ | |
28 | 4. The name of the author may not be used to endorse or promote | ||
29 | products derived from this software without specific prior written | ||
30 | permission. | ||
31 | |||
32 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | ||
33 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
34 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
35 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
36 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
37 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
38 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
39 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
40 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
43 | |||
44 | Julian Seward, Cambridge, UK. | ||
45 | jseward@bzip.org | ||
46 | bzip2/libbzip2 version 1.0 of 21 March 2000 | ||
47 | |||
48 | This program is based on (at least) the work of: | ||
49 | Mike Burrows | ||
50 | David Wheeler | ||
51 | Peter Fenwick | ||
52 | Alistair Moffat | ||
53 | Radford Neal | ||
54 | Ian H. Witten | ||
55 | Robert Sedgewick | ||
56 | Jon L. Bentley | ||
57 | |||
58 | For more information on these sources, see the manual. | ||
59 | --*/ | ||
60 | |||
61 | /*-- | ||
62 | CHANGES | ||
63 | ~~~~~~~ | ||
64 | 0.9.0 -- original version. | ||
65 | |||
66 | 0.9.0a/b -- no changes in this file. | ||
67 | |||
68 | 0.9.0c | ||
69 | * changed setting of nGroups in sendMTFValues() so as to | ||
70 | do a bit better on small files | ||
71 | --*/ | ||
72 | 28 | ||
73 | #include "bzlib_private.h" | 29 | #include "bzlib_private.h" |
74 | 30 | ||
@@ -4,59 +4,19 @@ | |||
4 | /*--- crctable.c ---*/ | 4 | /*--- crctable.c ---*/ |
5 | /*-------------------------------------------------------------*/ | 5 | /*-------------------------------------------------------------*/ |
6 | 6 | ||
7 | /*-- | 7 | /* ------------------------------------------------------------------ |
8 | This file is a part of bzip2 and/or libbzip2, a program and | 8 | This file is part of bzip2/libbzip2, a program and library for |
9 | library for lossless, block-sorting data compression. | 9 | lossless, block-sorting data compression. |
10 | |||
11 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | ||
12 | |||
13 | Redistribution and use in source and binary forms, with or without | ||
14 | modification, are permitted provided that the following conditions | ||
15 | are met: | ||
16 | |||
17 | 1. Redistributions of source code must retain the above copyright | ||
18 | notice, this list of conditions and the following disclaimer. | ||
19 | |||
20 | 2. The origin of this software must not be misrepresented; you must | ||
21 | not claim that you wrote the original software. If you use this | ||
22 | software in a product, an acknowledgment in the product | ||
23 | documentation would be appreciated but is not required. | ||
24 | 10 | ||
25 | 3. Altered source versions must be plainly marked as such, and must | 11 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
26 | not be misrepresented as being the original software. | 12 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> |
27 | 13 | ||
28 | 4. The name of the author may not be used to endorse or promote | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
29 | products derived from this software without specific prior written | 15 | README file. |
30 | permission. | ||
31 | 16 | ||
32 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | 17 | This program is released under the terms of the license contained |
33 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 18 | in the file LICENSE. |
34 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 19 | ------------------------------------------------------------------ */ |
35 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
36 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
37 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
38 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
39 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
40 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
43 | |||
44 | Julian Seward, Cambridge, UK. | ||
45 | jseward@bzip.org | ||
46 | bzip2/libbzip2 version 1.0 of 21 March 2000 | ||
47 | |||
48 | This program is based on (at least) the work of: | ||
49 | Mike Burrows | ||
50 | David Wheeler | ||
51 | Peter Fenwick | ||
52 | Alistair Moffat | ||
53 | Radford Neal | ||
54 | Ian H. Witten | ||
55 | Robert Sedgewick | ||
56 | Jon L. Bentley | ||
57 | |||
58 | For more information on these sources, see the manual. | ||
59 | --*/ | ||
60 | 20 | ||
61 | 21 | ||
62 | #include "bzlib_private.h" | 22 | #include "bzlib_private.h" |
diff --git a/decompress.c b/decompress.c index 81c3d2c..124cc8d 100644 --- a/decompress.c +++ b/decompress.c | |||
@@ -4,59 +4,19 @@ | |||
4 | /*--- decompress.c ---*/ | 4 | /*--- decompress.c ---*/ |
5 | /*-------------------------------------------------------------*/ | 5 | /*-------------------------------------------------------------*/ |
6 | 6 | ||
7 | /*-- | 7 | /* ------------------------------------------------------------------ |
8 | This file is a part of bzip2 and/or libbzip2, a program and | 8 | This file is part of bzip2/libbzip2, a program and library for |
9 | library for lossless, block-sorting data compression. | 9 | lossless, block-sorting data compression. |
10 | 10 | ||
11 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | 11 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
12 | 12 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | |
13 | Redistribution and use in source and binary forms, with or without | 13 | |
14 | modification, are permitted provided that the following conditions | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
15 | are met: | 15 | README file. |
16 | 16 | ||
17 | 1. Redistributions of source code must retain the above copyright | 17 | This program is released under the terms of the license contained |
18 | notice, this list of conditions and the following disclaimer. | 18 | in the file LICENSE. |
19 | 19 | ------------------------------------------------------------------ */ | |
20 | 2. The origin of this software must not be misrepresented; you must | ||
21 | not claim that you wrote the original software. If you use this | ||
22 | software in a product, an acknowledgment in the product | ||
23 | documentation would be appreciated but is not required. | ||
24 | |||
25 | 3. Altered source versions must be plainly marked as such, and must | ||
26 | not be misrepresented as being the original software. | ||
27 | |||
28 | 4. The name of the author may not be used to endorse or promote | ||
29 | products derived from this software without specific prior written | ||
30 | permission. | ||
31 | |||
32 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | ||
33 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
34 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
35 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
36 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
37 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
38 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
39 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
40 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
43 | |||
44 | Julian Seward, Cambridge, UK. | ||
45 | jseward@bzip.org | ||
46 | bzip2/libbzip2 version 1.0 of 21 March 2000 | ||
47 | |||
48 | This program is based on (at least) the work of: | ||
49 | Mike Burrows | ||
50 | David Wheeler | ||
51 | Peter Fenwick | ||
52 | Alistair Moffat | ||
53 | Radford Neal | ||
54 | Ian H. Witten | ||
55 | Robert Sedgewick | ||
56 | Jon L. Bentley | ||
57 | |||
58 | For more information on these sources, see the manual. | ||
59 | --*/ | ||
60 | 20 | ||
61 | 21 | ||
62 | #include "bzlib_private.h" | 22 | #include "bzlib_private.h" |
@@ -1,9 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | minibz2 | 2 | minibz2 |
3 | libbz2.dll test program. | 3 | libbz2.dll test program. |
4 | by Yoshioka Tsuneo(QWF00133@nifty.ne.jp/tsuneo-y@is.aist-nara.ac.jp) | 4 | by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp) |
5 | This file is Public Domain. | 5 | This file is Public Domain. Welcome any email to me. |
6 | welcome any email to me. | ||
7 | 6 | ||
8 | usage: minibz2 [-d] [-{1,2,..9}] [[srcfilename] destfilename] | 7 | usage: minibz2 [-d] [-{1,2,..9}] [[srcfilename] destfilename] |
9 | */ | 8 | */ |
diff --git a/entities.xml b/entities.xml index 6d0975f..ce2b70d 100644 --- a/entities.xml +++ b/entities.xml | |||
@@ -1,9 +1,9 @@ | |||
1 | <!-- misc. strings --> | 1 | <!-- misc. strings --> |
2 | <!ENTITY bz-url "http://www.bzip.org"> | 2 | <!ENTITY bz-url "http://www.bzip.org"> |
3 | <!ENTITY bz-email "jseward@bzip.org"> | 3 | <!ENTITY bz-email "jseward@bzip.org"> |
4 | <!ENTITY bz-lifespan "1996-2005"> | 4 | <!ENTITY bz-lifespan "1996-2006"> |
5 | 5 | ||
6 | <!ENTITY bz-version "1.0.3"> | 6 | <!ENTITY bz-version "1.0.4"> |
7 | <!ENTITY bz-date "15 February 2005"> | 7 | <!ENTITY bz-date "20 December 2006"> |
8 | 8 | ||
9 | <!ENTITY manual-title "bzip2 Manual"> | 9 | <!ENTITY manual-title "bzip2 Manual"> |
@@ -1,4 +1,19 @@ | |||
1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/perl -w |
2 | # | ||
3 | # ------------------------------------------------------------------ | ||
4 | # This file is part of bzip2/libbzip2, a program and library for | ||
5 | # lossless, block-sorting data compression. | ||
6 | # | ||
7 | # bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
8 | # Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
9 | # | ||
10 | # Please read the WARNING, DISCLAIMER and PATENTS sections in the | ||
11 | # README file. | ||
12 | # | ||
13 | # This program is released under the terms of the license contained | ||
14 | # in the file LICENSE. | ||
15 | # ------------------------------------------------------------------ | ||
16 | # | ||
2 | use strict; | 17 | use strict; |
3 | 18 | ||
4 | # get command line values: | 19 | # get command line values: |
@@ -4,59 +4,19 @@ | |||
4 | /*--- huffman.c ---*/ | 4 | /*--- huffman.c ---*/ |
5 | /*-------------------------------------------------------------*/ | 5 | /*-------------------------------------------------------------*/ |
6 | 6 | ||
7 | /*-- | 7 | /* ------------------------------------------------------------------ |
8 | This file is a part of bzip2 and/or libbzip2, a program and | 8 | This file is part of bzip2/libbzip2, a program and library for |
9 | library for lossless, block-sorting data compression. | 9 | lossless, block-sorting data compression. |
10 | 10 | ||
11 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | 11 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
12 | 12 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | |
13 | Redistribution and use in source and binary forms, with or without | 13 | |
14 | modification, are permitted provided that the following conditions | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
15 | are met: | 15 | README file. |
16 | 16 | ||
17 | 1. Redistributions of source code must retain the above copyright | 17 | This program is released under the terms of the license contained |
18 | notice, this list of conditions and the following disclaimer. | 18 | in the file LICENSE. |
19 | 19 | ------------------------------------------------------------------ */ | |
20 | 2. The origin of this software must not be misrepresented; you must | ||
21 | not claim that you wrote the original software. If you use this | ||
22 | software in a product, an acknowledgment in the product | ||
23 | documentation would be appreciated but is not required. | ||
24 | |||
25 | 3. Altered source versions must be plainly marked as such, and must | ||
26 | not be misrepresented as being the original software. | ||
27 | |||
28 | 4. The name of the author may not be used to endorse or promote | ||
29 | products derived from this software without specific prior written | ||
30 | permission. | ||
31 | |||
32 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | ||
33 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
34 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
35 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
36 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
37 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
38 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
39 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
40 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
43 | |||
44 | Julian Seward, Cambridge, UK. | ||
45 | jseward@bzip.org | ||
46 | bzip2/libbzip2 version 1.0 of 21 March 2000 | ||
47 | |||
48 | This program is based on (at least) the work of: | ||
49 | Mike Burrows | ||
50 | David Wheeler | ||
51 | Peter Fenwick | ||
52 | Alistair Moffat | ||
53 | Radford Neal | ||
54 | Ian H. Witten | ||
55 | Robert Sedgewick | ||
56 | Jon L. Bentley | ||
57 | |||
58 | For more information on these sources, see the manual. | ||
59 | --*/ | ||
60 | 20 | ||
61 | 21 | ||
62 | #include "bzlib_private.h" | 22 | #include "bzlib_private.h" |
@@ -9,7 +9,7 @@ | |||
9 | <book lang="en" id="userman" xreflabel="bzip2 Manual"> | 9 | <book lang="en" id="userman" xreflabel="bzip2 Manual"> |
10 | 10 | ||
11 | <bookinfo> | 11 | <bookinfo> |
12 | <title>bzip2 and libbzip2, version 1.0.3</title> | 12 | <title>bzip2 and libbzip2, version 1.0.4</title> |
13 | <subtitle>A program and library for data compression</subtitle> | 13 | <subtitle>A program and library for data compression</subtitle> |
14 | <copyright> | 14 | <copyright> |
15 | <year>&bz-lifespan;</year> | 15 | <year>&bz-lifespan;</year> |
@@ -139,7 +139,7 @@ else.</para> | |||
139 | 139 | ||
140 | <listitem><para><computeroutput>bzip2</computeroutput>, | 140 | <listitem><para><computeroutput>bzip2</computeroutput>, |
141 | <computeroutput>bunzip2</computeroutput> - a block-sorting file | 141 | <computeroutput>bunzip2</computeroutput> - a block-sorting file |
142 | compressor, v1.0.3</para></listitem> | 142 | compressor, v1.0.4</para></listitem> |
143 | 143 | ||
144 | <listitem><para><computeroutput>bzcat</computeroutput> - | 144 | <listitem><para><computeroutput>bzcat</computeroutput> - |
145 | decompresses files to stdout</para></listitem> | 145 | decompresses files to stdout</para></listitem> |
@@ -625,13 +625,13 @@ errors and exit cleanly, but the details of what the problem is | |||
625 | sometimes seem rather misleading.</para> | 625 | sometimes seem rather misleading.</para> |
626 | 626 | ||
627 | <para>This manual page pertains to version &bz-version; of | 627 | <para>This manual page pertains to version &bz-version; of |
628 | <computeroutput>bzip2</computeroutput>. Compressed data created | 628 | <computeroutput>bzip2</computeroutput>. Compressed data created by |
629 | by this version is entirely forwards and backwards compatible | 629 | this version is entirely forwards and backwards compatible with the |
630 | with the previous public releases, versions 0.1pl2, 0.9.0 and | 630 | previous public releases, versions 0.1pl2, 0.9.0 and 0.9.5, 1.0.0, |
631 | 0.9.5, 1.0.0, 1.0.1 and 1.0.2, but with the following exception: 0.9.0 | 631 | 1.0.1, 1.0.2 and 1.0.3, but with the following exception: 0.9.0 and |
632 | and above can correctly decompress multiple concatenated | 632 | above can correctly decompress multiple concatenated compressed files. |
633 | compressed files. 0.1pl2 cannot do this; it will stop after | 633 | 0.1pl2 cannot do this; it will stop after decompressing just the first |
634 | decompressing just the first file in the stream.</para> | 634 | file in the stream.</para> |
635 | 635 | ||
636 | <para><computeroutput>bzip2recover</computeroutput> versions | 636 | <para><computeroutput>bzip2recover</computeroutput> versions |
637 | prior to 1.0.2 used 32-bit integers to represent bit positions in | 637 | prior to 1.0.2 used 32-bit integers to represent bit positions in |
@@ -819,8 +819,7 @@ understanding the more general but more complex low-level | |||
819 | interface.</para> | 819 | interface.</para> |
820 | 820 | ||
821 | <para>Yoshioka Tsuneo | 821 | <para>Yoshioka Tsuneo |
822 | (<computeroutput>QWF00133@niftyserve.or.jp</computeroutput> / | 822 | (<computeroutput>tsuneo@rr.iij4u.or.jp</computeroutput>) has |
823 | <computeroutput>tsuneo-y@is.aist-nara.ac.jp</computeroutput>) has | ||
824 | contributed some functions to give better | 823 | contributed some functions to give better |
825 | <computeroutput>zlib</computeroutput> compatibility. These | 824 | <computeroutput>zlib</computeroutput> compatibility. These |
826 | functions are <computeroutput>BZ2_bzopen</computeroutput>, | 825 | functions are <computeroutput>BZ2_bzopen</computeroutput>, |
@@ -1352,7 +1351,7 @@ FINISHING/BZ_FINISH | |||
1352 | output has been removed | 1351 | output has been removed |
1353 | Next state = IDLE; Return value = BZ_STREAM_END | 1352 | Next state = IDLE; Return value = BZ_STREAM_END |
1354 | else | 1353 | else |
1355 | Next state = FINISHING; Return value = BZ_FINISHING | 1354 | Next state = FINISHING; Return value = BZ_FINISH_OK |
1356 | 1355 | ||
1357 | FINISHING/other | 1356 | FINISHING/other |
1358 | Illegal. | 1357 | Illegal. |
@@ -2222,7 +2221,7 @@ if ( bzerror != BZ_STREAM_END ) { | |||
2222 | BZ2_bzReadClose ( &bzerror, b ); | 2221 | BZ2_bzReadClose ( &bzerror, b ); |
2223 | /* handle error */ | 2222 | /* handle error */ |
2224 | } else { | 2223 | } else { |
2225 | BZ2_bzReadClose ( &bzerror ); | 2224 | BZ2_bzReadClose ( &bzerror, b ); |
2226 | } | 2225 | } |
2227 | </programlisting> | 2226 | </programlisting> |
2228 | 2227 | ||
@@ -2537,8 +2536,7 @@ recovered from.</para> | |||
2537 | 2536 | ||
2538 | <para>Everything related to Windows has been contributed by | 2537 | <para>Everything related to Windows has been contributed by |
2539 | Yoshioka Tsuneo | 2538 | Yoshioka Tsuneo |
2540 | (<computeroutput>QWF00133@niftyserve.or.jp</computeroutput> / | 2539 | (<computeroutput>tsuneo@rr.iij4u.or.jp</computeroutput>), so |
2541 | <computeroutput>tsuneo-y@is.aist-nara.ac.jp</computeroutput>), so | ||
2542 | you should send your queries to him (but perhaps Cc: me, | 2540 | you should send your queries to him (but perhaps Cc: me, |
2543 | <computeroutput>&bz-email;</computeroutput>).</para> | 2541 | <computeroutput>&bz-email;</computeroutput>).</para> |
2544 | 2542 | ||
@@ -5,6 +5,21 @@ | |||
5 | case, which is fixed in this version (1.0.2) and above. | 5 | case, which is fixed in this version (1.0.2) and above. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | /* ------------------------------------------------------------------ | ||
9 | This file is part of bzip2/libbzip2, a program and library for | ||
10 | lossless, block-sorting data compression. | ||
11 | |||
12 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
13 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
14 | |||
15 | Please read the WARNING, DISCLAIMER and PATENTS sections in the | ||
16 | README file. | ||
17 | |||
18 | This program is released under the terms of the license contained | ||
19 | in the file LICENSE. | ||
20 | ------------------------------------------------------------------ */ | ||
21 | |||
22 | |||
8 | #include <stdio.h> | 23 | #include <stdio.h> |
9 | 24 | ||
10 | int main () | 25 | int main () |
diff --git a/randtable.c b/randtable.c index 940462d..d186335 100644 --- a/randtable.c +++ b/randtable.c | |||
@@ -4,59 +4,19 @@ | |||
4 | /*--- randtable.c ---*/ | 4 | /*--- randtable.c ---*/ |
5 | /*-------------------------------------------------------------*/ | 5 | /*-------------------------------------------------------------*/ |
6 | 6 | ||
7 | /*-- | 7 | /* ------------------------------------------------------------------ |
8 | This file is a part of bzip2 and/or libbzip2, a program and | 8 | This file is part of bzip2/libbzip2, a program and library for |
9 | library for lossless, block-sorting data compression. | 9 | lossless, block-sorting data compression. |
10 | 10 | ||
11 | Copyright (C) 1996-2005 Julian R Seward. All rights reserved. | 11 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
12 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
12 | 13 | ||
13 | Redistribution and use in source and binary forms, with or without | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the |
14 | modification, are permitted provided that the following conditions | 15 | README file. |
15 | are met: | ||
16 | 16 | ||
17 | 1. Redistributions of source code must retain the above copyright | 17 | This program is released under the terms of the license contained |
18 | notice, this list of conditions and the following disclaimer. | 18 | in the file LICENSE. |
19 | 19 | ------------------------------------------------------------------ */ | |
20 | 2. The origin of this software must not be misrepresented; you must | ||
21 | not claim that you wrote the original software. If you use this | ||
22 | software in a product, an acknowledgment in the product | ||
23 | documentation would be appreciated but is not required. | ||
24 | |||
25 | 3. Altered source versions must be plainly marked as such, and must | ||
26 | not be misrepresented as being the original software. | ||
27 | |||
28 | 4. The name of the author may not be used to endorse or promote | ||
29 | products derived from this software without specific prior written | ||
30 | permission. | ||
31 | |||
32 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS | ||
33 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
34 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
35 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
36 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
37 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
38 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
39 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
40 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
43 | |||
44 | Julian Seward, Cambridge, UK. | ||
45 | jseward@bzip.org | ||
46 | bzip2/libbzip2 version 1.0 of 21 March 2000 | ||
47 | |||
48 | This program is based on (at least) the work of: | ||
49 | Mike Burrows | ||
50 | David Wheeler | ||
51 | Peter Fenwick | ||
52 | Alistair Moffat | ||
53 | Radford Neal | ||
54 | Ian H. Witten | ||
55 | Robert Sedgewick | ||
56 | Jon L. Bentley | ||
57 | |||
58 | For more information on these sources, see the manual. | ||
59 | --*/ | ||
60 | 20 | ||
61 | 21 | ||
62 | #include "bzlib_private.h" | 22 | #include "bzlib_private.h" |
@@ -9,6 +9,21 @@ | |||
9 | (but is otherwise harmless). | 9 | (but is otherwise harmless). |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /* ------------------------------------------------------------------ | ||
13 | This file is part of bzip2/libbzip2, a program and library for | ||
14 | lossless, block-sorting data compression. | ||
15 | |||
16 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
17 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
18 | |||
19 | Please read the WARNING, DISCLAIMER and PATENTS sections in the | ||
20 | README file. | ||
21 | |||
22 | This program is released under the terms of the license contained | ||
23 | in the file LICENSE. | ||
24 | ------------------------------------------------------------------ */ | ||
25 | |||
26 | |||
12 | #define _FILE_OFFSET_BITS 64 | 27 | #define _FILE_OFFSET_BITS 64 |
13 | 28 | ||
14 | #include <stdio.h> | 29 | #include <stdio.h> |
@@ -8,11 +8,26 @@ | |||
8 | This should not cause any invalid memory accesses. If it does, | 8 | This should not cause any invalid memory accesses. If it does, |
9 | I want to know about it! | 9 | I want to know about it! |
10 | 10 | ||
11 | p.s. As you can see from the above description, the process is | 11 | PS. As you can see from the above description, the process is |
12 | incredibly slow. A file of size eg 5KB will cause it to run for | 12 | incredibly slow. A file of size eg 5KB will cause it to run for |
13 | many hours. | 13 | many hours. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | /* ------------------------------------------------------------------ | ||
17 | This file is part of bzip2/libbzip2, a program and library for | ||
18 | lossless, block-sorting data compression. | ||
19 | |||
20 | bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
21 | Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
22 | |||
23 | Please read the WARNING, DISCLAIMER and PATENTS sections in the | ||
24 | README file. | ||
25 | |||
26 | This program is released under the terms of the license contained | ||
27 | in the file LICENSE. | ||
28 | ------------------------------------------------------------------ */ | ||
29 | |||
30 | |||
16 | #include <stdio.h> | 31 | #include <stdio.h> |
17 | #include <assert.h> | 32 | #include <assert.h> |
18 | #include "bzlib.h" | 33 | #include "bzlib.h" |
@@ -1,5 +1,9 @@ | |||
1 | 1 | ||
2 | If compilation produces errors, or a large number of warnings, | 2 | If compilation produces errors, or a large number of warnings, |
3 | please read README.COMPILATION.PROBLEMS -- you might be able to | 3 | please read README.COMPILATION.PROBLEMS -- you might be able to |
4 | adjust the flags in this Makefile to improve matters. | 4 | adjust the flags in this Makefile to improve matters. |
5 | 5 | ||
6 | Also in README.COMPILATION.PROBLEMS are some hints that may help | ||
7 | if your build produces an executable which is unable to correctly | ||
8 | handle so-called 'large files' -- files of size 2GB or more. | ||
9 | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | Checking test results. If any of the four "cmp"s which follow | 2 | Checking test results. If any of the four "cmp"s which follow |
3 | report any differences, something is wrong. If you can't easily | 3 | report any differences, something is wrong. If you can't easily |
4 | figure out what, please let me know (jseward@acm.org). | 4 | figure out what, please let me know (jseward@bzip.org). |
5 | 5 | ||
@@ -1,22 +1,29 @@ | |||
1 | 1 | ||
2 | If you got this far and the "cmp"s didn't complain, it looks | 2 | If you got this far and the 'cmp's didn't complain, it looks |
3 | like you're in business. | 3 | like you're in business. |
4 | 4 | ||
5 | To install in /usr/bin, /usr/lib, /usr/man and /usr/include, type | 5 | To install in /usr/local/bin, /usr/local/lib, /usr/local/man and |
6 | /usr/local/include, type | ||
7 | |||
6 | make install | 8 | make install |
9 | |||
7 | To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type | 10 | To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type |
11 | |||
8 | make install PREFIX=/xxx/yyy | 12 | make install PREFIX=/xxx/yyy |
13 | |||
9 | If you are (justifiably) paranoid and want to see what 'make install' | 14 | If you are (justifiably) paranoid and want to see what 'make install' |
10 | is going to do, you can first do | 15 | is going to do, you can first do |
16 | |||
11 | make -n install or | 17 | make -n install or |
12 | make -n install PREFIX=/xxx/yyy respectively. | 18 | make -n install PREFIX=/xxx/yyy respectively. |
19 | |||
13 | The -n instructs make to show the commands it would execute, but | 20 | The -n instructs make to show the commands it would execute, but |
14 | not actually execute them. | 21 | not actually execute them. |
15 | 22 | ||
16 | Instructions for use are in the preformatted manual page, in the file | 23 | Instructions for use are in the preformatted manual page, in the file |
17 | bzip2.txt. For more detailed documentation, read the full manual. | 24 | bzip2.txt. For more detailed documentation, read the full manual. |
18 | It is available in Postscript form (manual.ps), PDF form (manual.pdf), | 25 | It is available in Postscript form (manual.ps), PDF form (manual.pdf), |
19 | and HTML form (manual_toc.html). | 26 | and HTML form (manual.html). |
20 | 27 | ||
21 | You can also do "bzip2 --help" to see some helpful information. | 28 | You can also do "bzip2 --help" to see some helpful information. |
22 | "bzip2 -L" displays the software license. | 29 | "bzip2 -L" displays the software license. |
@@ -1,5 +1,20 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | # see the README in this directory for usage etc. | 2 | # see the README file for usage etc. |
3 | # | ||
4 | # ------------------------------------------------------------------ | ||
5 | # This file is part of bzip2/libbzip2, a program and library for | ||
6 | # lossless, block-sorting data compression. | ||
7 | # | ||
8 | # bzip2/libbzip2 version 1.0.4 of 20 December 2006 | ||
9 | # Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> | ||
10 | # | ||
11 | # Please read the WARNING, DISCLAIMER and PATENTS sections in the | ||
12 | # README file. | ||
13 | # | ||
14 | # This program is released under the terms of the license contained | ||
15 | # in the file LICENSE. | ||
16 | # ---------------------------------------------------------------- | ||
17 | |||
3 | 18 | ||
4 | usage() { | 19 | usage() { |
5 | echo ''; | 20 | echo ''; |
@@ -45,7 +60,7 @@ export XML_CATALOG_FILES=/etc/xml/catalog | |||
45 | 60 | ||
46 | # post-processing tidy up | 61 | # post-processing tidy up |
47 | cleanup() { | 62 | cleanup() { |
48 | echo "Cleaning up: # $@" | 63 | echo "Cleaning up: $@" |
49 | while [ $# != 0 ] | 64 | while [ $# != 0 ] |
50 | do | 65 | do |
51 | arg=$1; shift; | 66 | arg=$1; shift; |