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
/*
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 * ALCompressionEngine::operator new( size_t size )
//
// ARGUMENTS:
//
// size : The number of bytes needed to create a new ALCompressionEngine
// object.
//
// RETURNS
//
// A pointer to the newly allocated storage area, or 0 if no storage
// was available.
//
// DESCRIPTION
//
// When using a DLL, it is easy to get into a dangerous situation when
// creating objects whose ctor and dtor are both in the DLL. The problem
// arises because when you create an object using new, the memory for
// the object will be allocated from the EXE. However, when you destroy
// the object using delete, the memory is freed inside the DLL. Since
// the DLL doesn't really own that memory, bad things can happen.
//
// But, you say, won't the space just go back to the Windows heap regardless
// of who tries to free it? Maybe, but maybe not. If the DLL is using
// a subsegment allocation scheme, it might do some sort of local free
// before returning the space to the windows heap. That is the point where
// you could conceivably cook your heap.
//
// 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 23, 1994 1.0A : First release
//
void AL_DLL_FAR * AL_PROTO ALCompressionEngine::operator new
//
// ALCompressionEngine::
// ALCompressionEngine( ALCompressionType compression_type_int,
// const char *compression_type_string )
//
// ARGUMENTS:
//
// compression_type_int : The enumerated constant for the compression
// type supported by this compression engine.
//
// compression_type_string : The string describing the compression engine.
//
// RETURNS
//
// None.
//
// DESCRIPTION
//
// This constructor can only be called by derived classes, and all they
// do with it is call it to set up the compression type and integer
// members. This class has a couple of pure virtual functions, so
// you can't instantiate a freestanding object.
//
// REVISION HISTORY
//
// May 23, 1994 1.0A : First release
//
: ,
//
// int ALCompressionEngine::WriteEngineData( ALStorage *archive )
//
// ARGUMENTS:
//
// archive : The storage object where the engine specific data is
// going to be written.
//
// RETURNS
//
// AL_SUCCESS, or < AL_SUCCESS if something bad happens.
//
// DESCRIPTION
//
// Compression engines can write private data out to the archive
// directory to provide customization information. For example, the
// Greenleaf compression engine writes its compression level
// using this function. By default, there is no data, which is what
// this function writes out, a 0 length string.
//
// REVISION HISTORY
//
// May 23, 1994 1.0A : First release
//
int AL_PROTO
//
// int ALCompressionEngine::ReadEngineData( ALStorage * archive )
//
// ARGUMENTS:
//
// archive : The storage object where the engine specific data is
// going to be read in from.
//
// RETURNS
//
// AL_SUCCESS, or < AL_SUCCESS if something bad happened.
//
// DESCRIPTION
//
// Compression engines can write private data out to the archive
// directory to provide customization information. For example, the
// Greenleaf compression engine writes its compression level
// using this function. By default, no data is written out. This
// function expects to find a zero length string, and complains
// with a fatal error if it doesn't.
//
// REVISION HISTORY
//
// May 23, 1994 1.0A : First release
//
int AL_PROTO
//
// ALCompressionEngine::~ALCompressionEngine()
//
// ARGUMENTS:
//
// None.
//
// RETURNS
//
// None, destructor.
//
// DESCRIPTION
//
// This guy doesn't have anything to do. In the debug version of
// the library, it at least checks to be sure the object type is correct.
//
// REVISION HISTORY
//
// May 23, 1994 1.0A : First release
//
AL_PROTO ALCompressionEngine::~