1
0
mirror of synced 2024-12-22 01:03:07 +01:00

Changed: compiler defines use "PLUS" postfix to indicate "this version or higher", regular Delphi version defines now indicate only that version

This commit is contained in:
Mark van Renswoude 2009-02-25 10:51:58 +00:00
parent 8c2549eda0
commit ec1474ee14
8 changed files with 120 additions and 97 deletions

View File

@ -31,9 +31,9 @@
-M
-$M16384,1048576
-K$00400000
-N"P:\Algemeen\lib"
-LE"c:\program files\borland\delphi7\Projects\Bpl"
-LN"c:\program files\borland\delphi7\Projects\Bpl"
-N"P:\algemeen\lib\D7"
-LE"P:\algemeen\bin\D7"
-LN"P:\algemeen\bin\D7"
-w-SYMBOL_PLATFORM
-w-UNIT_PLATFORM
-w-UNSAFE_TYPE

View File

@ -91,9 +91,9 @@ ImageBase=4194304
ExeDescription=X2Utils
[Directories]
OutputDir=
UnitOutputDir=P:\Algemeen\lib
PackageDLLOutputDir=
PackageDCPOutputDir=
UnitOutputDir=$(DELPHILIB)
PackageDLLOutputDir=$(DELPHIBIN)
PackageDCPOutputDir=$(DELPHIBIN)
SearchPath=
Packages=vcl;rtl;dbrtl;vcldb;vclx;dss;dsnapcrba;dsnapcon;inetdb;webdsnap;websnap;dbxcds;Irc;parsdpk;hotspotter
Conditionals=
@ -105,10 +105,6 @@ HostApplication=
Launcher=
UseLauncher=0
DebugCWD=
[Language]
ActiveLang=
ProjectLang=
RootDir=
[Version Info]
IncludeVerInfo=1
AutoIncBuild=0
@ -135,7 +131,9 @@ ProductName=
ProductVersion=1.0.0.0
Comments=
[Excluded Packages]
C:\Program Files\Borland\Indy\D7\dclIndy70.bpl=Internet Direct (Indy) for D7 Property and Component Editors
P:\Algemeen\bin\xtx_d7.bpl=(untitled)
P:\Algemeen\bin\xdevice9.bpl=(untitled)
P:\algemeen\bin\VirtualTreesD7D.bpl=(untitled)
[HistoryLists\hlUnitAliases]
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
@ -144,14 +142,19 @@ Count=2
Item0=..\..
Item1=F:\Development\VDarts\Packages
[HistoryLists\hlUnitOutputDirectory]
Count=5
Item0=P:\Algemeen\lib
Item1=..\..\Lib\D7
Item2=..\..\Dcu
Item3=..\..\..\Dcu
Item4=Dcu
Count=6
Item0=$(DELPHILIB)
Item1=P:\Algemeen\lib
Item2=..\..\Lib\D7
Item3=..\..\Dcu
Item4=..\..\..\Dcu
Item5=Dcu
[HistoryLists\hlBPLOutput]
Count=3
Item0=..\..\Lib\D7
Item1=Lib\D7
Item2=..\Lib\D7
Count=4
Item0=$(DELPHIBIN)
Item1=..\..\Lib\D7
Item2=Lib\D7
Item3=..\Lib\D7
[HistoryLists\hlDCPOutput]
Count=1
Item0=$(DELPHIBIN)

View File

@ -147,7 +147,7 @@ var
sKey: String;
begin
{$IFDEF D2006}
{$IFDEF D2006PLUS}
FillTestItems();
FillChar(aPresent, SizeOf(aPresent), #0);
@ -249,7 +249,7 @@ var
pKey: Pointer;
begin
{$IFDEF D2006}
{$IFDEF D2006PLUS}
FillTestItems();
FillChar(aPresent, SizeOf(aPresent), #0);

View File

@ -409,7 +409,7 @@ end;
procedure TX2App.GetPath();
function FixPath(const APath: String): String;
begin
Result := {$IFDEF D6}IncludeTrailingPathDelimiter
Result := {$IFDEF D6PLUS}IncludeTrailingPathDelimiter
{$ELSE}IncludeTrailingBackslash{$ENDIF}
(APath);
end;
@ -461,4 +461,4 @@ finalization
FreeAndNil(GApp);
end.

View File

@ -9,7 +9,7 @@
unit X2UtBits;
{$I X2UtCompilerVersion.inc}
{$IFDEF D7}
{$IFDEF D7PLUS}
{$WARN UNSAFE_CODE OFF}
{$ENDIF}

View File

@ -1,99 +1,119 @@
// This makes it easier to check which compiler version is
// being used...
{$DEFINE DUNKNOWN}
{$UNDEF D2006}
{$UNDEF D2005}
{$UNDEF D8}
{$UNDEF D7}
{$UNDEF D6}
{$UNDEF D5}
{$UNDEF D4}
{$UNDEF D3}
{$UNDEF D2}
{$UNDEF D1}
{$IFDEF VER180}
{$DEFINE D2006}
{$DEFINE D2005}
{$DEFINE D8}
{$DEFINE D7}
{$DEFINE D6}
{$DEFINE D5}
{$DEFINE D4}
{$DEFINE D3}
{$DEFINE D2}
{$DEFINE D1}
{$DEFINE D2006PLUS}
{$DEFINE D2005PLUS}
{$DEFINE D8PLUS}
{$DEFINE D7PLUS}
{$DEFINE D6PLUS}
{$DEFINE D5PLUS}
{$DEFINE D4PLUS}
{$DEFINE D3PLUS}
{$DEFINE D2PLUS}
{$DEFINE D1PLUS}
{$UNDEF DUNKNOWN}
{$ENDIF}
{$IFDEF VER170}
{$DEFINE D2005}
{$DEFINE D8}
{$DEFINE D7}
{$DEFINE D6}
{$DEFINE D5}
{$DEFINE D4}
{$DEFINE D3}
{$DEFINE D2}
{$DEFINE D1}
{$DEFINE D2005PLUS}
{$DEFINE D8PLUS}
{$DEFINE D7PLUS}
{$DEFINE D6PLUS}
{$DEFINE D5PLUS}
{$DEFINE D4PLUS}
{$DEFINE D3PLUS}
{$DEFINE D2PLUS}
{$DEFINE D1PLUS}
{$UNDEF DUNKNOWN}
{$ENDIF}
{$IFDEF VER160}
{$DEFINE D8}
{$DEFINE D7}
{$DEFINE D6}
{$DEFINE D5}
{$DEFINE D4}
{$DEFINE D3}
{$DEFINE D2}
{$DEFINE D1}
{$DEFINE D8PLUS}
{$DEFINE D7PLUS}
{$DEFINE D6PLUS}
{$DEFINE D5PLUS}
{$DEFINE D4PLUS}
{$DEFINE D3PLUS}
{$DEFINE D2PLUS}
{$DEFINE D1PLUS}
{$UNDEF DUNKNOWN}
{$ENDIF}
{$IFDEF VER150}
{$DEFINE D7}
{$DEFINE D6}
{$DEFINE D5}
{$DEFINE D4}
{$DEFINE D3}
{$DEFINE D2}
{$DEFINE D1}
{$DEFINE D7PLUS}
{$DEFINE D6PLUS}
{$DEFINE D5PLUS}
{$DEFINE D4PLUS}
{$DEFINE D3PLUS}
{$DEFINE D2PLUS}
{$DEFINE D1PLUS}
{$UNDEF DUNKNOWN}
{$ENDIF}
{$IFDEF VER140}
{$DEFINE D6}
{$DEFINE D5}
{$DEFINE D4}
{$DEFINE D3}
{$DEFINE D2}
{$DEFINE D1}
{$DEFINE D6PLUS}
{$DEFINE D5PLUS}
{$DEFINE D4PLUS}
{$DEFINE D3PLUS}
{$DEFINE D2PLUS}
{$DEFINE D1PLUS}
{$UNDEF DUNKNOWN}
{$ENDIF}
{$IFDEF VER130}
{$DEFINE D5}
{$DEFINE D4}
{$DEFINE D3}
{$DEFINE D2}
{$DEFINE D1}
{$DEFINE D5PLUS}
{$DEFINE D4PLUS}
{$DEFINE D3PLUS}
{$DEFINE D2PLUS}
{$DEFINE D1PLUS}
{$UNDEF DUNKNOWN}
{$ENDIF}
{$IFDEF VER120}
{$DEFINE D4}
{$DEFINE D3}
{$DEFINE D2}
{$DEFINE D1}
{$DEFINE D4PLUS}
{$DEFINE D3PLUS}
{$DEFINE D2PLUS}
{$DEFINE D1PLUS}
{$UNDEF DUNKNOWN}
{$ENDIF}
{$IFDEF VER100}
{$DEFINE D3}
{$DEFINE D2}
{$DEFINE D1}
{$DEFINE D3PLUS}
{$DEFINE D2PLUS}
{$DEFINE D1PLUS}
{$UNDEF DUNKNOWN}
{$ENDIF}
{$IFDEF VER90}
{$DEFINE D2}
{$DEFINE D1}
{$DEFINE D2PLUS}
{$DEFINE D1PLUS}
{$UNDEF DUNKNOWN}
{$ENDIF}
{$IFDEF VER80}
{$DEFINE D1}
{$DEFINE D1PLUS}
{$UNDEF DUNKNOWN}
{$ENDIF}
@ -102,14 +122,14 @@
// so I don't know what defines they have... if you do know,
// feel free to send me any changes...
{$IFDEF DUNKNOWN}
{$DEFINE D2006}
{$DEFINE D2005}
{$DEFINE D8}
{$DEFINE D7}
{$DEFINE D6}
{$DEFINE D5}
{$DEFINE D4}
{$DEFINE D3}
{$DEFINE D2}
{$DEFINE D1}
{$DEFINE D2006PLUS}
{$DEFINE D2005PLUS}
{$DEFINE D8PLUS}
{$DEFINE D7PLUS}
{$DEFINE D6PLUS}
{$DEFINE D5PLUS}
{$DEFINE D4PLUS}
{$DEFINE D3PLUS}
{$DEFINE D2PLUS}
{$DEFINE D1PLUS}
{$ENDIF}

View File

@ -46,7 +46,7 @@ type
TX2CustomHash = class;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$REGION 'Internal hash structures'}
{$ENDIF}
{
@ -97,7 +97,7 @@ type
property Current: PX2HashValue read GetCurrent;
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
{$REGION 'Internal value managers'}
@ -168,7 +168,7 @@ type
function Compare(const AData: Pointer; const AValue: Pointer;
const ASize: Cardinal): Boolean; override;
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
{$REGION 'Delphi 2006 enumerator support'}
@ -233,7 +233,7 @@ type
public
property Current: String read GetCurrent;
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
{$REGION 'Abstract hash implementation'}
@ -288,7 +288,7 @@ type
property Count: Integer read FCount;
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
{$REGION 'Base hash classes'}
@ -368,7 +368,7 @@ type
property CurrentKey: String read GetCurrentKey;
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
{$REGION 'Concrete hash classes'}
@ -632,7 +632,7 @@ type
property CurrentValue: String read GetCurrentValue;
property Values[Key: String]: String read GetValue write SetValue; default;
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
{$ENDIF}
@ -689,7 +689,7 @@ begin
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$REGION 'Internal hash structures'}
{$ENDIF}
{========================================
@ -793,7 +793,7 @@ begin
break;
until False;
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
@ -969,7 +969,7 @@ begin
Result := CompareMem(pSource, AValue, ASize);
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
@ -1308,7 +1308,7 @@ begin
Result := Cursor.Next();
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
@ -1377,7 +1377,7 @@ function TX2HashStringEnumerator.GetCurrent(): String;
begin
Result := TX2HashStringManager(Manager).ToValue(Cursor);
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
@ -1526,7 +1526,7 @@ function TX2CustomStringHash.Delete(const AKey: String): Boolean;
begin
Result := inherited Delete(PChar(AKey), Length(AKey));
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
@ -2087,7 +2087,7 @@ begin
inherited SetValue(Find(Key, True),
TX2HashStringManager(ValueManager).ToPointer(Value));
end;
{$IFDEF D2005}
{$IFDEF D2005PLUS}
{$ENDREGION}
{$ENDIF}

View File

@ -56,10 +56,10 @@ uses
function InRange(const AValue, AMin, AMax: Int64): Int64; overload;
//:$ Returns the width of a rectangle
function RectWidth(const ARect: TRect): Integer; {$IFDEF VER180}inline;{$ENDIF}
function RectWidth(const ARect: TRect): Integer; {$IFDEF D2006PLUS}inline;{$ENDIF}
//:$ Returns the height of a rectangle
function RectHeight(const ARect: TRect): Integer; {$IFDEF VER180}inline;{$ENDIF}
function RectHeight(const ARect: TRect): Integer; {$IFDEF D2006PLUS}inline;{$ENDIF}
implementation