~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to fcl/db/dbase/dbf_common.inc

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// define this if you need more SPEEEEEDDDD!!!
 
2
// useful if you index dbf files over a network
 
3
 
 
4
{.$define USE_CACHE}
 
5
 
 
6
// enables assembler routines, 486+ only
 
7
 
 
8
{$define USE_ASSEMBLER_486_UP}
 
9
 
 
10
// test compatibility
 
11
 
 
12
{.$define TDBF_UPDATE_FIRSTLAST_NODE}
 
13
 
 
14
// use this to enable the lookup function which is still buggy
 
15
 
 
16
{.$define USE_BUGGY_LOOKUP}
 
17
 
 
18
// use this directive to suppress math exceptions,
 
19
// instead NAN is returned.
 
20
// Using this directive is slightly less efficient
 
21
//
 
22
// used in Dbf_PrsDef
 
23
//
 
24
// NAN support needs to be rewritten and is currently absent
 
25
 
 
26
{.$define NAN}
 
27
 
 
28
//------------------------------------------------------
 
29
//--- Define all SUPPORT_xxx; undef if not supported ---
 
30
//------------------------------------------------------
 
31
 
 
32
 
 
33
//------------------------------------------------------
 
34
//--- Delphi versions                                ---
 
35
//------------------------------------------------------
 
36
 
 
37
 
 
38
{$ifdef VER80}          //      Delphi 1.0
 
39
  #ERROR tDbf needs Delphi or C++ Builder 3 minimum.
 
40
{$endif}
 
41
 
 
42
{$ifdef VER90}          //       Delphi 2.0
 
43
  #ERROR tDbf needs Delphi or C++ Builder 3 minimum.
 
44
{$endif}
 
45
 
 
46
{$ifdef VER93}          //       is BCB++ 1.0
 
47
  #ERROR tDbf needs Delphi or C++ Builder 3 minimum.
 
48
{$endif}
 
49
 
 
50
{$ifdef VER100}         // Delphi 3
 
51
  {$define DELPHI_3}
 
52
{$endif}
 
53
 
 
54
{$ifdef VER110}      // CBuilder 3
 
55
  {$define DELPHI_3}
 
56
{$endif}
 
57
 
 
58
{$ifdef VER120}      // Delphi 4
 
59
  {$define DELPHI_4}
 
60
  {$define DELPHI_3}
 
61
{$endif}
 
62
 
 
63
{$ifdef VER125} // C++ BUILDER 4
 
64
  {$define DELPHI_4}
 
65
  {$define DELPHI_3}
 
66
{$endif}
 
67
 
 
68
{$ifdef VER130} // Delphi 5
 
69
  {$define DELPHI_5}
 
70
  {$define DELPHI_4}
 
71
  {$define DELPHI_3}
 
72
{$endif}
 
73
 
 
74
{$ifdef VER135} // C++ Builder 5 ??
 
75
  {$define DELPHI_5}
 
76
  {$define DELPHI_4}
 
77
  {$define DELPHI_3}
 
78
{$endif}
 
79
 
 
80
{$ifdef VER140} // Delphi 6
 
81
  {$define DELPHI_6}
 
82
  {$define DELPHI_5}
 
83
  {$define DELPHI_4}
 
84
  {$define DELPHI_3}
 
85
{$endif}
 
86
 
 
87
{$ifdef VER145} // C++ Builder 6
 
88
  {$define DELPHI_6}
 
89
  {$define DELPHI_5}
 
90
  {$define DELPHI_4}
 
91
  {$define DELPHI_3}
 
92
{$endif}
 
93
 
 
94
{$ifdef VER150} // Delphi 7 :-) For once I am not late (12/07/2001)
 
95
  {$define DELPHI_7}
 
96
  {$define DELPHI_6}
 
97
  {$define DELPHI_5}
 
98
  {$define DELPHI_4}
 
99
  {$define DELPHI_3}
 
100
{$endif}
 
101
 
 
102
{$ifdef VER155} // C++ Builder 7
 
103
  {$define DELPHI_7}
 
104
  {$define DELPHI_6}
 
105
  {$define DELPHI_5}
 
106
  {$define DELPHI_4}
 
107
  {$define DELPHI_3}
 
108
{$endif}
 
109
 
 
110
//-------------------------------------------------------
 
111
//--- Conclude supported features from delphi version ---
 
112
//-------------------------------------------------------
 
113
 
 
114
{$ifdef DELPHI_3}
 
115
 
 
116
  {$define SUPPORT_VARIANTS}
 
117
 
 
118
{$ifdef DELPHI_4}
 
119
 
 
120
  {$define SUPPORT_DEFCHANGED}
 
121
  {$define SUPPORT_DEFAULT_PARAMS}
 
122
  {$define SUPPORT_NEW_TRANSLATE}
 
123
  {$define SUPPORT_INT64}
 
124
  {$define SUPPORT_REINTRODUCE}
 
125
  {$define SUPPORT_FIELDDEFS_UPDATED}
 
126
  {$define SUPPORT_FIELDDEF_ATTRIBUTES}
 
127
  {$define SUPPORT_FIELDDEF_TPERSISTENT}
 
128
  {$define SUPPORT_FIELDDEF_INDEX}
 
129
  {$define SUPPORT_FIELDTYPES_V4}
 
130
  {$define SUPPORT_UINT32_CARDINAL}
 
131
 
 
132
{$ifdef DELPHI_5}
 
133
 
 
134
  {$define SUPPORT_BACKWARD_FIELDDATA}
 
135
  {$define SUPPORT_NEW_FIELDDATA}
 
136
  {$define SUPPORT_INITDEFSFROMFIELDS}
 
137
  {$define SUPPORT_DEF_DELETE}
 
138
  {$define SUPPORT_FREEANDNIL}
 
139
 
 
140
{$ifdef DELPHI_6}
 
141
 
 
142
  {$define SUPPORT_PATHDELIM}
 
143
 
 
144
{$endif}
 
145
{$endif}
 
146
{$endif}
 
147
{$endif}
 
148
 
 
149
//------------------------------------------------------
 
150
//--- Conclude supported features in FreePascal      ---
 
151
//------------------------------------------------------
 
152
 
 
153
{$ifdef FPC_VERSION}
 
154
 
 
155
  {$mode delphi}
 
156
  {$h+}
 
157
 
 
158
{$ifndef CPUI386}
 
159
  {$undef USE_ASSEMBLER_486_UP}
 
160
{$endif}
 
161
 
 
162
{$ifndef FPC_LITTLE_ENDIAN}
 
163
  {$message error TDbf is not compatible with non little-endian CPUs. Please contact the author.}
 
164
{$endif}
 
165
 
 
166
{$ifdef USE_ASSEMBLER_486_UP}
 
167
  {$asmmode intel}
 
168
{$endif}
 
169
 
 
170
  {$define SUPPORT_INT64}
 
171
  {$define SUPPORT_DEFAULT_PARAMS}
 
172
  {$define SUPPORT_NEW_TRANSLATE}
 
173
  {$define SUPPORT_NEW_FIELDDATA}
 
174
  {$define SUPPORT_FIELDDEF_TPERSISTENT}
 
175
  {$define SUPPORT_FIELDTYPES_V4}
 
176
  {$define SUPPORT_UINT32_CARDINAL}
 
177
  {$define SUPPORT_REINTRODUCE}
 
178
 
 
179
  // FPC 1.0.x exceptions: no 0/0 support
 
180
  {$ifdef VER1_0}
 
181
    {$undef NAN}
 
182
    {$undef SUPPORT_DEFAULT_PARAMS}
 
183
    {$undef SUPPORT_NEW_TRANSLATE}
 
184
 
 
185
    {$message error TDbf needs fpc 1.9 minimum.}
 
186
 
 
187
  {$endif}
 
188
 
 
189
{$endif}
 
190
 
 
191
//----------------------------------------------------------
 
192
//--- Conclude supported features in non-Win32 platforms ---
 
193
//----------------------------------------------------------
 
194
 
 
195
{$ifndef WIN32}
 
196
 
 
197
    {$define SUPPORT_PATHDELIM}
 
198
    {$define SUPPORT_INCLUDETRAILPATHDELIM}
 
199
    {$define SUPPORT_INCLUDETRAILBACKSLASH}
 
200
 
 
201
{$endif}
 
202