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