aboutsummaryrefslogtreecommitdiff
path: root/bzlib_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'bzlib_private.h')
-rw-r--r--bzlib_private.h88
1 files changed, 27 insertions, 61 deletions
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
81typedef char Char; 41typedef char Char;
82typedef unsigned char Bool; 42typedef 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
97extern void BZ2_bz__AssertH__fail ( int errcode ); 58extern 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
123extern void bz_internal_error ( int errcode ); 88extern 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