Debian Codegraph @

plugins/wcx/zip/src/fparchive/abdefine.inc

raw
1 (* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1
3 *
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
8 *
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
13 *
14 * The Original Code is TurboPower Abbrevia
15 *
16 * The Initial Developer of the Original Code is
17 * TurboPower Software
18 *
19 * Portions created by the Initial Developer are Copyright (C) 1997-2002
20 * the Initial Developer. All Rights Reserved.
21 *
22 * Contributor(s):
23 *
24 * ***** END LICENSE BLOCK ***** *)
25
26 {*********************************************************}
27 {* ABBREVIA: AbDefine.inc *}
28 {*********************************************************}
29 {* ABBREVIA: Compiler options/directives include file *}
30 {*********************************************************}
31
32 {NOTE: ABDEFINE.INC is included in all ABBREVIA units; hence you can
33 specify global compiler options here. ABDEFINE.INC is included
34 *before* each unit's own required compiler options, so options
35 specified here could be overridden by hardcoded options in the
36 unit source file.}
37
38
39 {====Compiler options that can be changed====}
40 {$A+ Force alignment on word/dword boundaries}
41 {$S- No stack checking}
42
43 {---Global compiler defines for 32-bit OS's---}
44 {====Global fixed compiler options (do NOT change)====}
45
46 {$B- Incomplete boolean evaluation}
47 {$H+ Long string support}
48 {$P- No open string parameters}
49 {$Q- Arithmetic overflow checking} {!! - Needs to be turned on!}
50 {$R- Range checking} {!! - Needs to be turned on!}
51 {$T+ No type-checked pointers}
52 {$V- No var string checking}
53 {$X+ Extended syntax}
54 {$Z1 Enumerations are byte sized}
55
56 {====Platform defines================================================}
57
58 { map Delphi platform defines to FreePascal's (MSWINDOWS/UNIX/LINUX/DARWIN) }
59 {$IFNDEF FPC}
60 {$IF DEFINED(LINUX) AND (CompilerVersion < 15)}
61 {$DEFINE KYLIX}
62 {$DEFINE UNIX}
63 {$IFEND}
64 {$IFDEF MACOS}
65 {$DEFINE DARWIN}
66 {$ENDIF}
67 {$IFDEF POSIX}
68 {$DEFINE UNIX}
69 {$ENDIF}
70 {$ENDIF}
71
72 { Unix API (Kylix/Delphi/FreePascal) }
73 {$IFDEF UNIX}
74 {$IF DEFINED(FPC)}
75 {$DEFINE FPCUnixAPI}
76 {$ELSEIF DEFINED(KYLIX)}
77 {$DEFINE LibcAPI}
78 {$ELSE}
79 {$DEFINE PosixAPI}
80 {$IFEND}
81 {$ENDIF}
82
83 {$IFDEF FPC}
84 {$MODE DELPHI}
85 {$PACKRECORDS C}
86 {$ENDIF}
87
88 {Activate this define to show CLX/LCL dialogs for spanning media requests. The
89 default behavior will abort the operation instead. This define is only safe
90 when using Abbrevia from the foreground thread. If using it from a background
91 thread override OnRequestLastDisk, OnRequestNthDisk, and OnRequestBlankDisk and
92 synchronize to the foreground yourself. The Windows version always MessageBox
93 so it's thread-safe.}
94 {.$DEFINE UnixDialogs}
95
96 {====RTL defines=====================================================}
97
98 {$IFNDEF FPC}
99 {$IF RTLVersion >= 18} // Delphi 2006
100 {$DEFINE HasAdvancedRecords}
101 {$IFEND}
102 {$IF RTLVersion >= 20} // Delphi 2009
103 {$DEFINE HasThreadFinished}
104 {$IFEND}
105 {$IF RTLVersion >= 21} // Delphi 2010
106 {$DEFINE HasThreadStart}
107 {$IFEND}
108 {$IF RTLVersion >= 23} // Delphi XE2
109 {$DEFINE HasPlatformsAttribute}
110 {$IFEND}
111 {$ENDIF}
112
113 {====Widgetset defines===============================================}
114
115 { VCL version specific defines }
116 {$IFNDEF FPC}
117 {$IF RTLVersion >= 17} // Delphi 2005
118 {$DEFINE HasOnMouseActivate}
119 {$IFEND}
120 {$IF RTLVersion >= 18} // Delphi 2006
121 {$DEFINE HasOnMouseEnter}
122 {$IFEND}
123 {$IF RTLVersion >= 20} // Delphi 2009
124 {$DEFINE HasListViewGroups}
125 {$DEFINE HasListViewOnItemChecked}
126 {$DEFINE HasParentDoubleBuffered}
127 {$DEFINE HasTreeViewExpandedImageIndex}
128 {$IFEND}
129 {$IF RTLVersion >= 21} // Delphi 2010
130 {$DEFINE HasGridDrawingStyle}
131 {$DEFINE HasTouch}
132 {$IFEND}
133 {$ENDIF}
134
135 {====General defines=================================================}
136
137 {Activate the following define to include extra code to get rid of all
138 hints and warnings. Parts of ABBREVIA are written in such a way
139 that the hint/warning algorithms of the Delphi compilers are
140 fooled and report things like variables being used before
141 initialisation and so on when in reality the problem does not exist.}
142 {$DEFINE DefeatWarnings}
143
144 { Disable warnings for explicit string casts }
145 {$IFDEF UNICODE}
146 {$WARN EXPLICIT_STRING_CAST OFF}
147 {$WARN EXPLICIT_STRING_CAST_LOSS OFF}
148 {$ENDIF}
149
150 { Disable hints on Delphi XE2/Mac to prevent unexpanded inline messages }
151 {$IFDEF POSIX}
152 {$HINTS OFF}
153 {$ENDIF}
154
155 {====Bzip2 defines===================================================}
156
157 {Activate this define to statically link bzip2 .obj files into the application.
158 Curerntly only supported by Delphi/Win32.}
159 {.$DEFINE Bzip2Static}
160
161 {Activate this define to dynamically link to a libbz2.dll/libbbz2.so.1}
162 {.$DEFINE Bzip2Dynamic}
163
164 {Activate this define to load libbz2.dll/libbz2.so.1 at runtime using LoadLibrary}
165 {.$DEFINE Bzip2Runtime}
166
167 {Pick an appropriate linking method if none of the above are activate}
168 {$IF NOT DEFINED(Bzip2Static) AND NOT DEFINED(Bzip2Dynamic) AND NOT DEFINED(Bzip2Runtime)}
169 {$IFDEF FPC}
170 {$DEFINE Bzip2Runtime}
171 {$ELSE}
172 {$IFDEF MSWINDOWS}
173 {$DEFINE Bzip2Static}
174 {$ELSE}
175 {$DEFINE Bzip2Dynamic}
176 {$ENDIF}
177 {$ENDIF}
178 {$IFEND}
179
180 {====Zip defines=====================================================}
181
182 {Activate the following define when you don't want Visual parts of
183 the VCL library included for a program using a TAbArchive or
184 TAbZipArchive}
185 {.$DEFINE BuildingStub}
186
187 {Activate the following define to include support for extracting files
188 using PKzip compatible unShrink.}
189
190 {.$DEFINE UnzipShrinkSupport}
191
192 {Activate the following define to include support for extracting files
193 using PKZip compatible unReduce.}
194
195 {.$DEFINE UnzipReduceSupport}
196
197 {Activate the following define to include support for extracting files
198 using PKZip compatible unImplode.}
199
200 {.$DEFINE UnzipImplodeSupport}
201
202 {Activate the following to include support for extracting files using
203 all older PKZip compatible methods (Shrink, Reduce, Implode}
204
205 {$DEFINE UnzipBackwardSupport}
206
207 {Activate the following to include support for extracting files using
208 BZIP2 compression. Added in AppNote.txt v4.6. }
209
210 {.$DEFINE UnzipBzip2Support}
211
212 {Activate the following to include support for extracting files using
213 7-zip compatible Lzma compression. Added in AppNote.txt v6.3.}
214
215 {.$DEFINE UnzipLzmaSupport}
216
217 {Activate the following to include support for extracting files using
218 zipx PPMd I compression. Added in AppNote.txt v6.3.}
219
220 {.$DEFINE UnzipPPMdSupport}
221
222 {Activate the following to include support for extracting .wav files
223 using zipx WavPack compression. Requires copyright notice in your
224 documentation. Check "WavPack License.txt" for details.
225 Added in AppNote.txt v6.3. }
226
227 {.$DEFINE UnzipWavPackSupport}
228
229 {Activate the following to include support for extracting files using
230 all newer (zipx) compatible methods (Bzip2, Lzma, PPMd, WavPack)}
231
232 {$DEFINE UnzipZipxSupport}
233
234 {Activate the following to include logging support in the deflate/
235 inflate code. Since this logging support is a by-product of assertion
236 checking, you should only activate it if that is also on: $C+}
237 {$IFOPT C+} //if Assertions are on
238 {.$DEFINE UseLogging}
239 {$ENDIF}
240
241 {
242 According to
243 http://www.gzip.org/zlib/rfc1952.txt
244
245 A compliant gzip compressor should calculate and set the CRC32 and ISIZE.
246 However, a compliant decompressor should not check these values.
247
248 If you want to check the the values of the CRC32 and ISIZE in a GZIP file
249 when decompressing enable the STRICTGZIP define below. }
250
251 {.$DEFINE STRICTGZIP}
252
253 { The following define is ONLY used for Abbrevia Unit Tests.
254 It has no effect on the Abbrevia Library.
255
256 If defined it uses Winzip to create and test archives for compatability.
257 The winzip tests require Systools stSpawn.pas
258 It can be downloaded at http://sf.net/projects/tpsystools }
259
260 {$IFDEF MSWINDOWS}
261 {.$DEFINE WINZIPTESTS}
262 {$ENDIF}
263
264
265 {-------- !! DO NOT CHANGE DEFINES BELOW THIS LINE !! --------}
266
267 {$IFDEF UnzipBackwardSupport}
268 {$DEFINE UnzipShrinkSupport}
269 {$DEFINE UnzipReduceSupport}
270 {$DEFINE UnzipImplodeSupport}
271 {$ENDIF}
272
273 {$IFDEF UnzipZipxSupport}
274 {$DEFINE UnzipXzSupport}
275 {$DEFINE UnzipBzip2Support}
276 {$DEFINE UnzipLzmaSupport}
277 {$DEFINE UnzipPPMdSupport}
278 {$DEFINE UnzipZstdSupport}
279 {$DEFINE UnzipWavPackSupport}
280 {$ENDIF}
281
282 { Linking .obj files isn't currently supported in Kylix or FPC }
283 {$IF DEFINED(FPC) OR NOT DEFINED(MSWINDOWS)}
284 {$UNDEF UnzipPPMdSupport}
285 {$UNDEF UnzipWavPackSupport}
286 {$IFEND}
287