1
0
mirror of synced 2024-10-18 05:09:15 +00: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 -M
-$M16384,1048576 -$M16384,1048576
-K$00400000 -K$00400000
-N"P:\Algemeen\lib" -N"P:\algemeen\lib\D7"
-LE"c:\program files\borland\delphi7\Projects\Bpl" -LE"P:\algemeen\bin\D7"
-LN"c:\program files\borland\delphi7\Projects\Bpl" -LN"P:\algemeen\bin\D7"
-w-SYMBOL_PLATFORM -w-SYMBOL_PLATFORM
-w-UNIT_PLATFORM -w-UNIT_PLATFORM
-w-UNSAFE_TYPE -w-UNSAFE_TYPE

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -56,10 +56,10 @@ uses
function InRange(const AValue, AMin, AMax: Int64): Int64; overload; function InRange(const AValue, AMin, AMax: Int64): Int64; overload;
//:$ Returns the width of a rectangle //:$ 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 //:$ 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 implementation