diff options
Diffstat (limited to 'archival/bz/bzlib.c')
-rw-r--r-- | archival/bz/bzlib.c | 218 |
1 files changed, 107 insertions, 111 deletions
diff --git a/archival/bz/bzlib.c b/archival/bz/bzlib.c index 3125bb0bf..57a69747e 100644 --- a/archival/bz/bzlib.c +++ b/archival/bz/bzlib.c | |||
@@ -40,25 +40,27 @@ in the file LICENSE. | |||
40 | /*---------------------------------------------------*/ | 40 | /*---------------------------------------------------*/ |
41 | 41 | ||
42 | /*---------------------------------------------------*/ | 42 | /*---------------------------------------------------*/ |
43 | #ifndef BZ_NO_STDIO | 43 | #if BZ_LIGHT_DEBUG |
44 | static void bz_assert_fail(int errcode) | 44 | static |
45 | void bz_assert_fail(int errcode) | ||
45 | { | 46 | { |
46 | /* if (errcode == 1007) bb_error_msg_and_die("probably bad RAM"); */ | 47 | /* if (errcode == 1007) bb_error_msg_and_die("probably bad RAM"); */ |
47 | bb_error_msg_and_die("bzip2 internal error %d", errcode); | 48 | bb_error_msg_and_die("internal error %d", errcode); |
48 | } | 49 | } |
49 | #endif | 50 | #endif |
50 | 51 | ||
51 | |||
52 | /*---------------------------------------------------*/ | 52 | /*---------------------------------------------------*/ |
53 | static | 53 | static |
54 | void prepare_new_block(EState* s) | 54 | void prepare_new_block(EState* s) |
55 | { | 55 | { |
56 | int32_t i; | 56 | int i; |
57 | s->nblock = 0; | 57 | s->nblock = 0; |
58 | s->numZ = 0; | 58 | s->numZ = 0; |
59 | s->state_out_pos = 0; | 59 | s->state_out_pos = 0; |
60 | BZ_INITIALISE_CRC(s->blockCRC); | 60 | BZ_INITIALISE_CRC(s->blockCRC); |
61 | for (i = 0; i < 256; i++) s->inUse[i] = False; | 61 | /* inlined memset would be nice to have here */ |
62 | for (i = 0; i < 256; i++) | ||
63 | s->inUse[i] = 0; | ||
62 | s->blockNo++; | 64 | s->blockNo++; |
63 | } | 65 | } |
64 | 66 | ||
@@ -97,9 +99,11 @@ void BZ2_bzCompressInit(bz_stream *strm, int blockSize100k) | |||
97 | s->mtfv = (uint16_t*)s->arr1; | 99 | s->mtfv = (uint16_t*)s->arr1; |
98 | s->ptr = (uint32_t*)s->arr1; | 100 | s->ptr = (uint32_t*)s->arr1; |
99 | s->arr2 = xmalloc((n + BZ_N_OVERSHOOT) * sizeof(uint32_t)); | 101 | s->arr2 = xmalloc((n + BZ_N_OVERSHOOT) * sizeof(uint32_t)); |
100 | s->block = (UChar*)s->arr2; | 102 | s->block = (uint8_t*)s->arr2; |
101 | s->ftab = xmalloc(65537 * sizeof(uint32_t)); | 103 | s->ftab = xmalloc(65537 * sizeof(uint32_t)); |
102 | 104 | ||
105 | s->crc32table = crc32_filltable(NULL, 1); | ||
106 | |||
103 | s->state = BZ_S_INPUT; | 107 | s->state = BZ_S_INPUT; |
104 | s->mode = BZ_M_RUNNING; | 108 | s->mode = BZ_M_RUNNING; |
105 | s->blockSize100k = blockSize100k; | 109 | s->blockSize100k = blockSize100k; |
@@ -107,7 +111,7 @@ void BZ2_bzCompressInit(bz_stream *strm, int blockSize100k) | |||
107 | 111 | ||
108 | strm->state = s; | 112 | strm->state = s; |
109 | /*strm->total_in = 0;*/ | 113 | /*strm->total_in = 0;*/ |
110 | strm->total_out = 0; | 114 | strm->total_out = 0; |
111 | init_RL(s); | 115 | init_RL(s); |
112 | prepare_new_block(s); | 116 | prepare_new_block(s); |
113 | } | 117 | } |
@@ -118,31 +122,28 @@ static | |||
118 | void add_pair_to_block(EState* s) | 122 | void add_pair_to_block(EState* s) |
119 | { | 123 | { |
120 | int32_t i; | 124 | int32_t i; |
121 | UChar ch = (UChar)(s->state_in_ch); | 125 | uint8_t ch = (uint8_t)(s->state_in_ch); |
122 | for (i = 0; i < s->state_in_len; i++) { | 126 | for (i = 0; i < s->state_in_len; i++) { |
123 | BZ_UPDATE_CRC(s->blockCRC, ch); | 127 | BZ_UPDATE_CRC(s, s->blockCRC, ch); |
124 | } | 128 | } |
125 | s->inUse[s->state_in_ch] = True; | 129 | s->inUse[s->state_in_ch] = 1; |
126 | switch (s->state_in_len) { | 130 | switch (s->state_in_len) { |
127 | case 1: | ||
128 | s->block[s->nblock] = (UChar)ch; s->nblock++; | ||
129 | break; | ||
130 | case 2: | ||
131 | s->block[s->nblock] = (UChar)ch; s->nblock++; | ||
132 | s->block[s->nblock] = (UChar)ch; s->nblock++; | ||
133 | break; | ||
134 | case 3: | 131 | case 3: |
135 | s->block[s->nblock] = (UChar)ch; s->nblock++; | 132 | s->block[s->nblock] = (uint8_t)ch; s->nblock++; |
136 | s->block[s->nblock] = (UChar)ch; s->nblock++; | 133 | /* fall through */ |
137 | s->block[s->nblock] = (UChar)ch; s->nblock++; | 134 | case 2: |
135 | s->block[s->nblock] = (uint8_t)ch; s->nblock++; | ||
136 | /* fall through */ | ||
137 | case 1: | ||
138 | s->block[s->nblock] = (uint8_t)ch; s->nblock++; | ||
138 | break; | 139 | break; |
139 | default: | 140 | default: |
140 | s->inUse[s->state_in_len-4] = True; | 141 | s->inUse[s->state_in_len - 4] = 1; |
141 | s->block[s->nblock] = (UChar)ch; s->nblock++; | 142 | s->block[s->nblock] = (uint8_t)ch; s->nblock++; |
142 | s->block[s->nblock] = (UChar)ch; s->nblock++; | 143 | s->block[s->nblock] = (uint8_t)ch; s->nblock++; |
143 | s->block[s->nblock] = (UChar)ch; s->nblock++; | 144 | s->block[s->nblock] = (uint8_t)ch; s->nblock++; |
144 | s->block[s->nblock] = (UChar)ch; s->nblock++; | 145 | s->block[s->nblock] = (uint8_t)ch; s->nblock++; |
145 | s->block[s->nblock] = ((UChar)(s->state_in_len-4)); | 146 | s->block[s->nblock] = (uint8_t)(s->state_in_len - 4); |
146 | s->nblock++; | 147 | s->nblock++; |
147 | break; | 148 | break; |
148 | } | 149 | } |
@@ -164,17 +165,16 @@ void flush_RL(EState* s) | |||
164 | uint32_t zchh = (uint32_t)(zchh0); \ | 165 | uint32_t zchh = (uint32_t)(zchh0); \ |
165 | /*-- fast track the common case --*/ \ | 166 | /*-- fast track the common case --*/ \ |
166 | if (zchh != zs->state_in_ch && zs->state_in_len == 1) { \ | 167 | if (zchh != zs->state_in_ch && zs->state_in_len == 1) { \ |
167 | UChar ch = (UChar)(zs->state_in_ch); \ | 168 | uint8_t ch = (uint8_t)(zs->state_in_ch); \ |
168 | BZ_UPDATE_CRC(zs->blockCRC, ch); \ | 169 | BZ_UPDATE_CRC(zs, zs->blockCRC, ch); \ |
169 | zs->inUse[zs->state_in_ch] = True; \ | 170 | zs->inUse[zs->state_in_ch] = 1; \ |
170 | zs->block[zs->nblock] = (UChar)ch; \ | 171 | zs->block[zs->nblock] = (uint8_t)ch; \ |
171 | zs->nblock++; \ | 172 | zs->nblock++; \ |
172 | zs->state_in_ch = zchh; \ | 173 | zs->state_in_ch = zchh; \ |
173 | } \ | 174 | } \ |
174 | else \ | 175 | else \ |
175 | /*-- general, uncommon cases --*/ \ | 176 | /*-- general, uncommon cases --*/ \ |
176 | if (zchh != zs->state_in_ch || \ | 177 | if (zchh != zs->state_in_ch || zs->state_in_len == 255) { \ |
177 | zs->state_in_len == 255) { \ | ||
178 | if (zs->state_in_ch < 256) \ | 178 | if (zs->state_in_ch < 256) \ |
179 | add_pair_to_block(zs); \ | 179 | add_pair_to_block(zs); \ |
180 | zs->state_in_ch = zchh; \ | 180 | zs->state_in_ch = zchh; \ |
@@ -187,114 +187,117 @@ void flush_RL(EState* s) | |||
187 | 187 | ||
188 | /*---------------------------------------------------*/ | 188 | /*---------------------------------------------------*/ |
189 | static | 189 | static |
190 | Bool copy_input_until_stop(EState* s) | 190 | void /*Bool*/ copy_input_until_stop(EState* s) |
191 | { | 191 | { |
192 | Bool progress_in = False; | 192 | /*Bool progress_in = False;*/ |
193 | 193 | ||
194 | //vda: cannot simplify this until avail_in_expect is removed | 194 | #ifdef SAME_CODE_AS_BELOW |
195 | if (s->mode == BZ_M_RUNNING) { | 195 | if (s->mode == BZ_M_RUNNING) { |
196 | /*-- fast track the common case --*/ | 196 | /*-- fast track the common case --*/ |
197 | while (1) { | 197 | while (1) { |
198 | /*-- block full? --*/ | ||
199 | if (s->nblock >= s->nblockMAX) break; | ||
200 | /*-- no input? --*/ | 198 | /*-- no input? --*/ |
201 | if (s->strm->avail_in == 0) break; | 199 | if (s->strm->avail_in == 0) break; |
202 | progress_in = True; | 200 | /*-- block full? --*/ |
203 | ADD_CHAR_TO_BLOCK(s, (uint32_t)(*((UChar*)(s->strm->next_in)))); | 201 | if (s->nblock >= s->nblockMAX) break; |
202 | /*progress_in = True;*/ | ||
203 | ADD_CHAR_TO_BLOCK(s, (uint32_t)(*(uint8_t*)(s->strm->next_in))); | ||
204 | s->strm->next_in++; | 204 | s->strm->next_in++; |
205 | s->strm->avail_in--; | 205 | s->strm->avail_in--; |
206 | /*s->strm->total_in++;*/ | 206 | /*s->strm->total_in++;*/ |
207 | } | 207 | } |
208 | } else { | 208 | } else |
209 | #endif | ||
210 | { | ||
209 | /*-- general, uncommon case --*/ | 211 | /*-- general, uncommon case --*/ |
210 | while (1) { | 212 | while (1) { |
211 | /*-- block full? --*/ | ||
212 | if (s->nblock >= s->nblockMAX) break; | ||
213 | /*-- no input? --*/ | 213 | /*-- no input? --*/ |
214 | if (s->strm->avail_in == 0) break; | 214 | if (s->strm->avail_in == 0) break; |
215 | /*-- flush/finish end? --*/ | 215 | /*-- block full? --*/ |
216 | if (s->avail_in_expect == 0) break; | 216 | if (s->nblock >= s->nblockMAX) break; |
217 | progress_in = True; | 217 | //# /*-- flush/finish end? --*/ |
218 | ADD_CHAR_TO_BLOCK(s, (uint32_t)(*((UChar*)(s->strm->next_in)))); | 218 | //# if (s->avail_in_expect == 0) break; |
219 | /*progress_in = True;*/ | ||
220 | ADD_CHAR_TO_BLOCK(s, *(uint8_t*)(s->strm->next_in)); | ||
219 | s->strm->next_in++; | 221 | s->strm->next_in++; |
220 | s->strm->avail_in--; | 222 | s->strm->avail_in--; |
221 | /*s->strm->total_in++;*/ | 223 | /*s->strm->total_in++;*/ |
222 | s->avail_in_expect--; | 224 | //# s->avail_in_expect--; |
223 | } | 225 | } |
224 | } | 226 | } |
225 | return progress_in; | 227 | /*return progress_in;*/ |
226 | } | 228 | } |
227 | 229 | ||
228 | 230 | ||
229 | /*---------------------------------------------------*/ | 231 | /*---------------------------------------------------*/ |
230 | static | 232 | static |
231 | Bool copy_output_until_stop(EState* s) | 233 | void /*Bool*/ copy_output_until_stop(EState* s) |
232 | { | 234 | { |
233 | Bool progress_out = False; | 235 | /*Bool progress_out = False;*/ |
234 | 236 | ||
235 | while (1) { | 237 | while (1) { |
236 | |||
237 | /*-- no output space? --*/ | 238 | /*-- no output space? --*/ |
238 | if (s->strm->avail_out == 0) break; | 239 | if (s->strm->avail_out == 0) break; |
239 | 240 | ||
240 | /*-- block done? --*/ | 241 | /*-- block done? --*/ |
241 | if (s->state_out_pos >= s->numZ) break; | 242 | if (s->state_out_pos >= s->numZ) break; |
242 | 243 | ||
243 | progress_out = True; | 244 | /*progress_out = True;*/ |
244 | *(s->strm->next_out) = s->zbits[s->state_out_pos]; | 245 | *(s->strm->next_out) = s->zbits[s->state_out_pos]; |
245 | s->state_out_pos++; | 246 | s->state_out_pos++; |
246 | s->strm->avail_out--; | 247 | s->strm->avail_out--; |
247 | s->strm->next_out++; | 248 | s->strm->next_out++; |
248 | s->strm->total_out++; | 249 | s->strm->total_out++; |
249 | } | 250 | } |
250 | 251 | /*return progress_out;*/ | |
251 | return progress_out; | ||
252 | } | 252 | } |
253 | 253 | ||
254 | 254 | ||
255 | /*---------------------------------------------------*/ | 255 | /*---------------------------------------------------*/ |
256 | static | 256 | static |
257 | Bool handle_compress(bz_stream *strm) | 257 | void /*Bool*/ handle_compress(bz_stream *strm) |
258 | { | 258 | { |
259 | Bool progress_in = False; | 259 | /*Bool progress_in = False;*/ |
260 | Bool progress_out = False; | 260 | /*Bool progress_out = False;*/ |
261 | EState* s = strm->state; | 261 | EState* s = strm->state; |
262 | 262 | ||
263 | while (1) { | 263 | while (1) { |
264 | if (s->state == BZ_S_OUTPUT) { | 264 | if (s->state == BZ_S_OUTPUT) { |
265 | progress_out |= copy_output_until_stop(s); | 265 | /*progress_out |=*/ copy_output_until_stop(s); |
266 | if (s->state_out_pos < s->numZ) break; | 266 | if (s->state_out_pos < s->numZ) break; |
267 | if (s->mode == BZ_M_FINISHING | 267 | if (s->mode == BZ_M_FINISHING |
268 | && s->avail_in_expect == 0 | 268 | //# && s->avail_in_expect == 0 |
269 | && s->strm->avail_in == 0 | ||
269 | && isempty_RL(s)) | 270 | && isempty_RL(s)) |
270 | break; | 271 | break; |
271 | prepare_new_block(s); | 272 | prepare_new_block(s); |
272 | s->state = BZ_S_INPUT; | 273 | s->state = BZ_S_INPUT; |
274 | #ifdef FLUSH_IS_UNUSED | ||
273 | if (s->mode == BZ_M_FLUSHING | 275 | if (s->mode == BZ_M_FLUSHING |
274 | && s->avail_in_expect == 0 | 276 | && s->avail_in_expect == 0 |
275 | && isempty_RL(s)) | 277 | && isempty_RL(s)) |
276 | break; | 278 | break; |
279 | #endif | ||
277 | } | 280 | } |
278 | 281 | ||
279 | if (s->state == BZ_S_INPUT) { | 282 | if (s->state == BZ_S_INPUT) { |
280 | progress_in |= copy_input_until_stop(s); | 283 | /*progress_in |=*/ copy_input_until_stop(s); |
281 | if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) { | 284 | //#if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) { |
285 | if (s->mode != BZ_M_RUNNING && s->strm->avail_in == 0) { | ||
282 | flush_RL(s); | 286 | flush_RL(s); |
283 | BZ2_compressBlock(s, (Bool)(s->mode == BZ_M_FINISHING)); | 287 | BZ2_compressBlock(s, (s->mode == BZ_M_FINISHING)); |
284 | s->state = BZ_S_OUTPUT; | 288 | s->state = BZ_S_OUTPUT; |
285 | } else | 289 | } else |
286 | if (s->nblock >= s->nblockMAX) { | 290 | if (s->nblock >= s->nblockMAX) { |
287 | BZ2_compressBlock(s, False); | 291 | BZ2_compressBlock(s, 0); |
288 | s->state = BZ_S_OUTPUT; | 292 | s->state = BZ_S_OUTPUT; |
289 | } else | 293 | } else |
290 | if (s->strm->avail_in == 0) { | 294 | if (s->strm->avail_in == 0) { |
291 | break; | 295 | break; |
292 | } | 296 | } |
293 | } | 297 | } |
294 | |||
295 | } | 298 | } |
296 | 299 | ||
297 | return progress_in || progress_out; | 300 | /*return progress_in || progress_out;*/ |
298 | } | 301 | } |
299 | 302 | ||
300 | 303 | ||
@@ -302,82 +305,75 @@ Bool handle_compress(bz_stream *strm) | |||
302 | static | 305 | static |
303 | int BZ2_bzCompress(bz_stream *strm, int action) | 306 | int BZ2_bzCompress(bz_stream *strm, int action) |
304 | { | 307 | { |
305 | Bool progress; | 308 | /*Bool progress;*/ |
306 | EState* s; | 309 | EState* s; |
307 | if (strm == NULL) return BZ_PARAM_ERROR; | 310 | |
308 | s = strm->state; | 311 | s = strm->state; |
309 | if (s == NULL) return BZ_PARAM_ERROR; | ||
310 | if (s->strm != strm) return BZ_PARAM_ERROR; | ||
311 | 312 | ||
312 | preswitch: | ||
313 | switch (s->mode) { | 313 | switch (s->mode) { |
314 | |||
315 | case BZ_M_IDLE: | ||
316 | return BZ_SEQUENCE_ERROR; | ||
317 | |||
318 | case BZ_M_RUNNING: | 314 | case BZ_M_RUNNING: |
319 | if (action == BZ_RUN) { | 315 | if (action == BZ_RUN) { |
320 | progress = handle_compress(strm); | 316 | /*progress =*/ handle_compress(strm); |
321 | return progress ? BZ_RUN_OK : BZ_PARAM_ERROR; | 317 | /*return progress ? BZ_RUN_OK : BZ_PARAM_ERROR;*/ |
318 | return BZ_RUN_OK; | ||
322 | } | 319 | } |
320 | #ifdef FLUSH_IS_UNUSED | ||
323 | else | 321 | else |
324 | if (action == BZ_FLUSH) { | 322 | if (action == BZ_FLUSH) { |
325 | s->avail_in_expect = strm->avail_in; | 323 | //#s->avail_in_expect = strm->avail_in; |
326 | s->mode = BZ_M_FLUSHING; | 324 | s->mode = BZ_M_FLUSHING; |
327 | goto preswitch; | 325 | goto case_BZ_M_FLUSHING; |
328 | } | 326 | } |
327 | #endif | ||
329 | else | 328 | else |
330 | if (action == BZ_FINISH) { | 329 | /*if (action == BZ_FINISH)*/ { |
331 | s->avail_in_expect = strm->avail_in; | 330 | //#s->avail_in_expect = strm->avail_in; |
332 | s->mode = BZ_M_FINISHING; | 331 | s->mode = BZ_M_FINISHING; |
333 | goto preswitch; | 332 | goto case_BZ_M_FINISHING; |
334 | } | 333 | } |
335 | else | ||
336 | return BZ_PARAM_ERROR; | ||
337 | 334 | ||
335 | #ifdef FLUSH_IS_UNUSED | ||
336 | case_BZ_M_FLUSHING: | ||
338 | case BZ_M_FLUSHING: | 337 | case BZ_M_FLUSHING: |
339 | if (action != BZ_FLUSH) return BZ_SEQUENCE_ERROR; | 338 | /*if (s->avail_in_expect != s->strm->avail_in) |
340 | if (s->avail_in_expect != s->strm->avail_in) | 339 | return BZ_SEQUENCE_ERROR;*/ |
341 | return BZ_SEQUENCE_ERROR; | 340 | /*progress =*/ handle_compress(strm); |
342 | progress = handle_compress(strm); | ||
343 | if (s->avail_in_expect > 0 || !isempty_RL(s) || s->state_out_pos < s->numZ) | 341 | if (s->avail_in_expect > 0 || !isempty_RL(s) || s->state_out_pos < s->numZ) |
344 | return BZ_FLUSH_OK; | 342 | return BZ_FLUSH_OK; |
345 | s->mode = BZ_M_RUNNING; | 343 | s->mode = BZ_M_RUNNING; |
346 | return BZ_RUN_OK; | 344 | return BZ_RUN_OK; |
345 | #endif | ||
347 | 346 | ||
348 | case BZ_M_FINISHING: | 347 | case_BZ_M_FINISHING: |
349 | if (action != BZ_FINISH) return BZ_SEQUENCE_ERROR; | 348 | /*case BZ_M_FINISHING:*/ |
350 | if (s->avail_in_expect != s->strm->avail_in) | 349 | default: |
351 | return BZ_SEQUENCE_ERROR; | 350 | /*if (s->avail_in_expect != s->strm->avail_in) |
352 | progress = handle_compress(strm); | 351 | return BZ_SEQUENCE_ERROR;*/ |
353 | if (!progress) return BZ_SEQUENCE_ERROR; | 352 | /*progress =*/ handle_compress(strm); |
354 | if (s->avail_in_expect > 0 || !isempty_RL(s) || s->state_out_pos < s->numZ) | 353 | /*if (!progress) return BZ_SEQUENCE_ERROR;*/ |
354 | //#if (s->avail_in_expect > 0 || !isempty_RL(s) || s->state_out_pos < s->numZ) | ||
355 | //# return BZ_FINISH_OK; | ||
356 | if (s->strm->avail_in > 0 || !isempty_RL(s) || s->state_out_pos < s->numZ) | ||
355 | return BZ_FINISH_OK; | 357 | return BZ_FINISH_OK; |
356 | s->mode = BZ_M_IDLE; | 358 | /*s->mode = BZ_M_IDLE;*/ |
357 | return BZ_STREAM_END; | 359 | return BZ_STREAM_END; |
358 | } | 360 | } |
359 | return BZ_OK; /*--not reached--*/ | 361 | /* return BZ_OK; --not reached--*/ |
360 | } | 362 | } |
361 | 363 | ||
362 | 364 | ||
363 | /*---------------------------------------------------*/ | 365 | /*---------------------------------------------------*/ |
364 | static | 366 | static |
365 | int BZ2_bzCompressEnd(bz_stream *strm) | 367 | void BZ2_bzCompressEnd(bz_stream *strm) |
366 | { | 368 | { |
367 | EState* s; | 369 | EState* s; |
368 | if (strm == NULL) return BZ_PARAM_ERROR; | ||
369 | s = strm->state; | ||
370 | if (s == NULL) return BZ_PARAM_ERROR; | ||
371 | if (s->strm != strm) return BZ_PARAM_ERROR; | ||
372 | 370 | ||
373 | if (s->arr1 != NULL) free(s->arr1); | 371 | s = strm->state; |
374 | if (s->arr2 != NULL) free(s->arr2); | 372 | free(s->arr1); |
375 | if (s->ftab != NULL) free(s->ftab); | 373 | free(s->arr2); |
374 | free(s->ftab); | ||
375 | free(s->crc32table); | ||
376 | free(strm->state); | 376 | free(strm->state); |
377 | |||
378 | strm->state = NULL; | ||
379 | |||
380 | return BZ_OK; | ||
381 | } | 377 | } |
382 | 378 | ||
383 | 379 | ||
@@ -418,11 +414,11 @@ int BZ2_bzBuffToBuffCompress(char* dest, | |||
418 | BZ2_bzCompressEnd(&strm); | 414 | BZ2_bzCompressEnd(&strm); |
419 | return BZ_OK; | 415 | return BZ_OK; |
420 | 416 | ||
421 | output_overflow: | 417 | output_overflow: |
422 | BZ2_bzCompressEnd(&strm); | 418 | BZ2_bzCompressEnd(&strm); |
423 | return BZ_OUTBUFF_FULL; | 419 | return BZ_OUTBUFF_FULL; |
424 | 420 | ||
425 | errhandler: | 421 | errhandler: |
426 | BZ2_bzCompressEnd(&strm); | 422 | BZ2_bzCompressEnd(&strm); |
427 | return ret; | 423 | return ret; |
428 | } | 424 | } |