Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6725 siemargl 1
/*
2
  Copyright (c) 1990-2008 Info-ZIP.  All rights reserved.
3
 
4
  See the accompanying file LICENSE, version 2007-Mar-04 or later
5
  (the contents of which are also included in unzip.h) for terms of use.
6
  If, for some reason, all these files are missing, the Info-ZIP license
7
  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
8
*/
9
/*---------------------------------------------------------------------------
10
 
11
  ubz2err.c
12
 
13
  This file contains the "fatal error" callback routine required by the
14
  "minimal" (silent, non-stdio) setup of the bzip2 compression library.
15
 
16
  The fatal bzip2 error bail-out routine is provided in a separate code
17
  module, so that it can be easily overridden when the UnZip package is
18
  used as a static link library. One example is the WinDLL static library
19
  usage for building a monolythic binary of the Windows application "WiZ"
20
  that supports bzip2 both in compression and decompression operations.
21
 
22
  Contains:  bz_internal_error()      (USE_BZIP2 only)
23
 
24
  ---------------------------------------------------------------------------*/
25
 
26
 
27
#define __UBZ2ERR_C     /* identifies this source module */
28
#define UNZIP_INTERNAL
29
#include "unzip.h"
30
#ifdef WINDLL
31
#  ifdef POCKET_UNZIP
32
#    include "wince/intrface.h"
33
#  else
34
#    include "windll/windll.h"
35
#  endif
36
#endif
37
 
38
#ifdef USE_BZIP2
39
 
40
/**********************************/
41
/*  Function bz_internal_error()  */
42
/**********************************/
43
 
44
/* Call-back function for the bzip2 decompression code (compiled with
45
 * BZ_NO_STDIO), required to handle fatal internal bug-type errors of
46
 * the bzip2 library.
47
 */
48
void bz_internal_error(bzerrcode)
49
    int bzerrcode;
50
{
51
    GETGLOBALS();
52
 
53
    Info(slide, 0x421, ((char *)slide,
54
      "error: internal fatal libbzip2 error number %d\n", bzerrcode));
55
#ifdef WINDLL
56
    longjmp(dll_error_return, 1);
57
#else
58
    DESTROYGLOBALS();
59
    EXIT(PK_BADERR);
60
#endif
61
} /* end function bz_internal_error() */
62
 
63
#endif /* USE_BZIP2 */