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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
/*
Copyright 1990-2008 Light Infocon Tecnologia S/A
Este arquivo é parte do programa LightBase - Banco de Dados Textual Documental
O LightBase é um software livre; você pode redistribui-lo e/ou modifica-lo dentro
dos termos da Licença Pública Geral GNU como publicada pela Fundação do Software
Livre (FSF); na versão 2 da Licença.
Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO
EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes.
Você deve ter recebido uma cópia da Licença Pública Geral GNU versao 2, sob o
título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do
Software Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//
// void * ALCopyEngine::operator new( size_t size )
//
// ARGUMENTS:
//
// size : The amount of storage that needs to be allocated for
// this object.
//
// RETURNS
//
// A pointer to the storage.
//
// DESCRIPTION
//
// When using the DLL version of ArchiveLib, it is a good idea to
// allocate the storage for objects from inside the DLL, since they
// will be freed inside the DLL. If we don't have the new operator
// for a class, its storage will be allocated from the EXE before
// the constructor code is called. Then, when it is time to free
// the storage, the delete operator will be called inside the DLL.
// Not good, right?
//
// By providing our own version of operator new inside this class, we
// ensure that all memory allocation for the class will be done from
// inside the DLL, not the EXE calling the DLL.
//
// REVISION HISTORY
//
// May 21, 1994 1.0A : First release
//
void AL_DLL_FAR * AL_PROTO ALCopyEngine::operator new
//
// ALCopyEngine::ALCopyEngine()
//
// ARGUMENTS:
//
// None, constructor.
//
// RETURNS
//
// Nothing, this is a constructor.
//
// DESCRIPTION
//
// The copy engine doesn't have to store any data, because it just
// performs a straight binary copy, without any frills. Because of
// this simplicity, it doesn't have any data members to initialize.
// The only thing it does initialize is the base class, with the
// appropriate enum value and string identifier.
//
// REVISION HISTORY
//
// May 22, 1994 1.0A : First release
//
AL_PROTO :
//
// ALCopyEngine::~ALCopyEngine()
//
// ARGUMENTS:
//
// None, destructor.
//
// RETURNS
//
// Nothing, destructor.
//
// DESCRIPTION
//
// The destructor has absolutely nothing to do. In the debug
// versions of the library, the dtor checks to be sure that it
// is operating on the right type of object.
//
// REVISION HISTORY
//
// May 22, 1994 1.0A : First release
//
AL_PROTO ALCopyEngine::~
//
// int ALCopyEngine::Compress( ALStorage &input, ALStorage &output )
//
// ARGUMENTS:
//
// input : A reference to the input storage object.
//
// output : A reference to the output storage object.
//
// RETURNS
//
// AL_SUCCESS, or < AL_SUCCESS if something bad happens.
//
// DESCRIPTION
//
// This is ostensibly a compression engine, but really all it does
// is copy input directly to the output. The most exciting thing it
// does during the entire process is initialize CRC checking.
//
// REVISION HISTORY
//
// May 22, 1994 1.0A : First release
//
int AL_PROTO
//
// int ALCopyEngine::Decompress( ALStorage &input,
// ALStorage &output,
// long length )
//
// ARGUMENTS:
//
// input : A reference to the storage object containing the
// compressed data.
//
// output : A reference to the storage object that is going to receive
// the uncompressed data.
//
// length : The number of byte in the uncompressed image.
//
// RETURNS
//
// AL_SUCCESS if things went properly, error code < AL_SUCCESS if
// a problem occurred.
//
// DESCRIPTION
//
// This is a decompression routine, but really it just performs a
// straight binary copy of input to output. This is the copy engine you
// use when you just want to copy/archive files, and aren't worried
// about saving disk space.
//
// REVISION HISTORY
//
// May 22, 1994 1.0A : First release
//
int AL_PROTO