1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
--- generic/bz2.c 2008-12-05 16:00:23.000000000 -0500
+++ generic/bz2.c 2008-12-23 15:31:04.000000000 -0500
@@ -28,4 +28,5 @@
*/
+#include <bzlib.h>
#include "transformInt.h"
@@ -223,5 +224,5 @@
}
- res = bz.bcompressInit (&c->state, o->level, 0, 0);
+ res = BZ2_bzCompressInit (&c->state, o->level, 0, 0);
if (res != BZ_OK) {
@@ -265,5 +266,5 @@
/* release conversion specific items here (BZ2) */
- bz.bcompressEnd (&c->state);
+ BZ2_bzCompressEnd (&c->state);
Tcl_Free ((char*) c->output_buffer);
Tcl_Free ((char*) c);
@@ -305,12 +306,12 @@
in = character;
- c->state.next_in = (unsigned char*) (Bytef*) ∈
+ c->state.next_in = ∈
c->state.avail_in = 1;
for (;;) {
- c->state.next_out = (unsigned char*) (Bytef*) c->output_buffer;
+ c->state.next_out = c->output_buffer;
c->state.avail_out = OUT_SIZE;
- res = bz.bcompress (&c->state, BZ_RUN);
+ res = BZ2_bzCompress (&c->state, BZ_RUN);
if (res < BZ_OK) {
@@ -373,12 +374,12 @@
int res;
- c->state.next_in = (unsigned char*) (Bytef*) buffer;
+ c->state.next_in = (char *)buffer;
c->state.avail_in = bufLen;
for (;;) {
- c->state.next_out = (unsigned char*) (Bytef*) c->output_buffer;
+ c->state.next_out = c->output_buffer;
c->state.avail_out = OUT_SIZE;
- res = bz.bcompress (&c->state, BZ_RUN);
+ res = BZ2_bzCompress (&c->state, BZ_RUN);
if (res < BZ_OK) {
@@ -439,12 +440,12 @@
int res;
- c->state.next_in = (unsigned char*) (Bytef*) NULL;
+ c->state.next_in = NULL;
c->state.avail_in = 0;
for (;;) {
- c->state.next_out = (unsigned char*) (Bytef*) c->output_buffer;
+ c->state.next_out = c->output_buffer;
c->state.avail_out = OUT_SIZE;
- res = bz.bcompress (&c->state, BZ_FINISH);
+ res = BZ2_bzCompress (&c->state, BZ_FINISH);
if (res < BZ_OK) {
@@ -499,5 +500,5 @@
/* execute conversion specific code here (BZ2) */
- /* bz.bcompressReset (&c->state); */
+ /* BZ2_bzCompressReset (&c->state); */
}
@@ -549,5 +550,5 @@
}
- res = bz.bdecompressInit (&c->state, 0, 0);
+ res = BZ2_bzDecompressInit (&c->state, 0, 0);
if (res != BZ_OK) {
@@ -593,5 +594,5 @@
/* release conversion specific items here (BZ2) */
- bz.bdecompressEnd (&c->state);
+ BZ2_bzDecompressEnd (&c->state);
Tcl_Free ((char*) c->output_buffer);
@@ -633,12 +634,12 @@
in = character;
- c->state.next_in = (unsigned char*) (Bytef*) ∈
+ c->state.next_in = ∈
c->state.avail_in = 1;
for (;;) {
- c->state.next_out = (unsigned char*) (Bytef*) c->output_buffer;
+ c->state.next_out = c->output_buffer;
c->state.avail_out = OUT_SIZE;
- res = bz.bdecompress (&c->state);
+ res = BZ2_bzDecompress (&c->state);
c->lastRes = res;
@@ -702,12 +703,12 @@
int res;
- c->state.next_in = (unsigned char*) (Bytef*) buffer;
+ c->state.next_in = (char *)buffer;
c->state.avail_in = bufLen;
for (;;) {
- c->state.next_out = (unsigned char*) (Bytef*) c->output_buffer;
+ c->state.next_out = c->output_buffer;
c->state.avail_out = OUT_SIZE;
- res = bz.bdecompress (&c->state);
+ res = BZ2_bzDecompress (&c->state);
c->lastRes = res;
@@ -774,14 +775,14 @@
}
- c->state.next_in = (unsigned char*) (Bytef*) c->output_buffer; /* fake out
- * 'inflate'
- */
+ c->state.next_in = c->output_buffer; /* fake out
+ * 'inflate'
+ */
c->state.avail_in = 0;
for (;;) {
- c->state.next_out = (unsigned char*) (Bytef*) c->output_buffer;
+ c->state.next_out = c->output_buffer;
c->state.avail_out = OUT_SIZE;
- res = bz.bdecompress (&c->state);
+ res = BZ2_bzDecompress (&c->state);
if ((res < BZ_OK) && (res != BZ_STREAM_END)) {
@@ -836,5 +837,5 @@
/* execute conversion specific code here (BZ2) */
- /* bz.bdecompressReset (&c->state); */
+ /* BZ2_bzDecompressReset (&c->state); */
}
--- generic/bz2_opt.c 2008-12-05 16:00:23.000000000 -0500
+++ generic/bz2_opt.c 2008-12-23 15:45:52.000000000 -0500
@@ -182,13 +182,4 @@
/*
- * 'bz2' is used, therefore load the required library.
- * And bail out if it is not available.
- */
-
- if (TCL_OK != TrfLoadBZ2lib (interp)) {
- return TCL_ERROR;
- }
-
- /*
* Now perform the real option check.
*/
|