]> git.saurik.com Git - wxWidgets.git/blob - utils/Install/sfxace/globals.c
attempts to fix recursive mutex initialized detection under RedHat 7.1 (new glibc)
[wxWidgets.git] / utils / Install / sfxace / globals.c
1 /* ------------------------------------------------------------------------ */
2 /* */
3 /* Global variable declarations */
4 /* */
5 /* ------------------------------------------------------------------------ */
6
7 #include "os.h"
8
9 #if defined(__CYGWIN__)
10 #include <Windows32/Base.h>
11 #endif
12 #include "acestruc.h"
13 #include "unace.h"
14 #include <string.h>
15 #include <stdio.h>
16
17 //-------- Ace sign
18 const char *acesign = "**ACE**";
19
20 //-------- Version string for program
21 const char *version="UNACE v1.1 public version\n";
22
23 #ifdef AMIGA
24 //-------- Version string for VERSION program
25 static char *_version="$VER: Unace Amiga 1.1 "__AMIGADATE__"\n\n";
26 #endif
27
28 //-------- header buffer and pointers
29 thead head;
30
31 tmhead *t_mhead = (tmhead *) & head;
32 tfhead *t_fhead = (tfhead *) & head;
33
34 //-------- buffers
35 ULONG *buf_rd =0;
36 CHAR *buf =0;
37 CHAR *buf_wr =0;
38 UCHAR *readbuf =0;
39
40 //-------- decompressor variables
41 SHORT rpos =0,
42 dcpr_do =0,
43 dcpr_do_max =0,
44 blocksize =0,
45 dcpr_dic =0,
46 dcpr_oldnum =0,
47 bits_rd =0,
48 dcpr_frst_file =0;
49 USHORT dcpr_code_mn[1 << maxwd_mn],
50 dcpr_code_lg[1 << maxwd_lg];
51 UCHAR dcpr_wd_mn[maxcode + 2],
52 dcpr_wd_lg[maxcode + 2],
53 wd_svwd[svwd_cnt];
54 ULONG dcpr_dpos =0,
55 cpr_dpos2 =0,
56 dcpr_dicsiz =0,
57 dcpr_dican =0,
58 dcpr_size =0,
59 dcpr_olddist[4]={0,0,0,0},
60 code_rd =0;
61
62 CHAR *dcpr_text =0;
63
64 //-------- quicksort
65 USHORT sort_org[maxcode + 2];
66 UCHAR sort_freq[(maxcode + 2) * 2];
67
68 //-------- file handling
69 CHAR aname[PATH_MAX];
70 INT archan,
71 wrhan;
72 #if !defined(__EMX__) && !defined(__OS2__)
73 FILE *farchan = NULL;
74 #endif
75
76 LONG skipsize=0;
77
78 //-------- structures for archive handling
79 struct tadat adat;
80
81 //-------- flags
82 INT f_err =0,
83 f_ovrall =0,
84 f_allvol_pr=0,
85 f_curpas =0,
86 f_criterr =0;
87
88
89 void resetglobals(void)
90 {
91 t_mhead = (tmhead *) & head;
92 t_fhead = (tfhead *) & head;
93
94 buf_rd =0;
95 buf =0;
96 buf_wr =0;
97 readbuf =0;
98
99 rpos =0;
100 dcpr_do =0;
101 dcpr_do_max =0;
102 blocksize =0;
103 dcpr_dic =0;
104 dcpr_oldnum =0;
105 bits_rd =0;
106 dcpr_frst_file =0;
107
108 memset(&dcpr_code_mn, 0, sizeof(dcpr_code_mn));
109 memset(&dcpr_code_lg, 0, sizeof(dcpr_code_lg));
110 memset(&dcpr_wd_mn, 0, sizeof(dcpr_wd_mn));
111 memset(&dcpr_wd_lg, 0, sizeof(dcpr_wd_lg));
112 memset(&wd_svwd, 0, sizeof(wd_svwd));
113 dcpr_dpos =0;
114 cpr_dpos2 =0;
115 dcpr_dicsiz =0;
116 dcpr_dican =0;
117 dcpr_size =0;
118
119 memset(&dcpr_olddist, 0, sizeof(dcpr_olddist));
120
121 code_rd =0;
122 dcpr_text =0;
123
124 memset(&sort_org, 0, sizeof(sort_org));
125 memset(&sort_freq, 0, sizeof(sort_freq));
126
127 archan=0;
128 wrhan=0;
129 skipsize=0;
130
131 f_err =0;
132 f_ovrall =0;
133 f_allvol_pr=0;
134 f_curpas =0;
135 f_criterr =0;
136
137 }