You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(20) |
May
(48) |
Jun
(8) |
Jul
(23) |
Aug
(41) |
Sep
(42) |
Oct
(22) |
Nov
(17) |
Dec
(36) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(43) |
Feb
(42) |
Mar
(17) |
Apr
(39) |
May
(16) |
Jun
(35) |
Jul
(37) |
Aug
(47) |
Sep
(49) |
Oct
(9) |
Nov
(52) |
Dec
(37) |
| 2008 |
Jan
(48) |
Feb
(21) |
Mar
(7) |
Apr
(2) |
May
(5) |
Jun
(17) |
Jul
(17) |
Aug
(40) |
Sep
(58) |
Oct
(38) |
Nov
(19) |
Dec
(32) |
| 2009 |
Jan
(67) |
Feb
(46) |
Mar
(54) |
Apr
(34) |
May
(37) |
Jun
(52) |
Jul
(67) |
Aug
(72) |
Sep
(48) |
Oct
(35) |
Nov
(27) |
Dec
(12) |
| 2010 |
Jan
(56) |
Feb
(46) |
Mar
(19) |
Apr
(14) |
May
(21) |
Jun
(3) |
Jul
(13) |
Aug
(48) |
Sep
(34) |
Oct
(51) |
Nov
(16) |
Dec
(32) |
| 2011 |
Jan
(36) |
Feb
(14) |
Mar
(12) |
Apr
(3) |
May
(5) |
Jun
(24) |
Jul
(15) |
Aug
(30) |
Sep
(21) |
Oct
(4) |
Nov
(25) |
Dec
(23) |
| 2012 |
Jan
(45) |
Feb
(42) |
Mar
(19) |
Apr
(14) |
May
(13) |
Jun
(7) |
Jul
(3) |
Aug
(46) |
Sep
(21) |
Oct
(10) |
Nov
(2) |
Dec
|
| 2013 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ah...@us...> - 2012-03-10 18:22:16
|
Revision: 3767
http://jcl.svn.sourceforge.net/jcl/?rev=3767&view=rev
Author: ahuser
Date: 2012-03-10 18:22:09 +0000 (Sat, 10 Mar 2012)
Log Message:
-----------
Fixed: Items, Properties and Matadata are case-insensitive
Fixed: ParseItemMetaData was broken
Fixed: User defined metadata wasn't replaced in EvaluateTransform
Modified Paths:
--------------
trunk/jcl/source/windows/JclMsBuild.pas
Modified: trunk/jcl/source/windows/JclMsBuild.pas
===================================================================
--- trunk/jcl/source/windows/JclMsBuild.pas 2012-03-09 12:43:15 UTC (rev 3766)
+++ trunk/jcl/source/windows/JclMsBuild.pas 2012-03-10 18:22:09 UTC (rev 3767)
@@ -329,6 +329,8 @@
function FindItemDefinition(const ItemName: string): TJclMsBuildItem;
function FindTarget(const TargetName: string): TJclMsBuildTarget;
+ class function SameItemName(const ItemName1, ItemName2: string): Boolean;
+
procedure Init;
procedure InitEnvironmentProperties;
procedure InitReservedProperties;
@@ -1033,7 +1035,8 @@
if Start > 0 then
begin
Position := Start;
- FindClosingBrace(Result, Position);
+ if not FindClosingBrace(Result, Position) then
+ raise EJclMsBuildError.CreateResFmt(@RsEEndOfString, [Result]);
PropertyName := Copy(Result, Start + 2, Position - Start - 2);
PropertyValue := EvaluateList(PropertyName);
@@ -1054,21 +1057,41 @@
function TJclMsBuildParser.EvaluateTransform(ItemList: TStrings; const Transform: string): string;
type
TVarRecArray = array of TVarRec;
+const
+ WellKnownItemMetadataCount = 11;
+var
+ UserDefinedMetadataNames: TStrings;
function GetTransformPattern(const Transform: string): string;
+ var
+ Index, EndIndex, Num: Integer;
+ MetaDataName: string;
begin
Result := Transform;
- StrReplace(Result, '%(FullPath)', '%0:s', [rfReplaceAll]);
- StrReplace(Result, '%(RootDir)', '%1:s', [rfReplaceAll]);
- StrReplace(Result, '%(Filename)', '%2:s', [rfReplaceAll]);
- StrReplace(Result, '%(Extension)', '%3:s', [rfReplaceAll]);
- StrReplace(Result, '%(RelativeDir)', '%4:s', [rfReplaceAll]);
- StrReplace(Result, '%(Directory)', '%5:s', [rfReplaceAll]);
- StrReplace(Result, '%(RecursiveDir)', '%6:s', [rfReplaceAll]);
- StrReplace(Result, '%(Identity)', '%7:s', [rfReplaceAll]);
- StrReplace(Result, '%(ModifiedTime)', '%8:s', [rfReplaceAll]);
- StrReplace(Result, '%(CreatedTime)', '%9:s', [rfReplaceAll]);
- StrReplace(Result, '%(AccessedTime)', '%10:s', [rfReplaceAll]);
+ StrReplace(Result, '%(FullPath)', '%0:s', [rfReplaceAll, rfIgnoreCase]);
+ StrReplace(Result, '%(RootDir)', '%1:s', [rfReplaceAll, rfIgnoreCase]);
+ StrReplace(Result, '%(Filename)', '%2:s', [rfReplaceAll, rfIgnoreCase]);
+ StrReplace(Result, '%(Extension)', '%3:s', [rfReplaceAll, rfIgnoreCase]);
+ StrReplace(Result, '%(RelativeDir)', '%4:s', [rfReplaceAll, rfIgnoreCase]);
+ StrReplace(Result, '%(Directory)', '%5:s', [rfReplaceAll, rfIgnoreCase]);
+ StrReplace(Result, '%(RecursiveDir)', '%6:s', [rfReplaceAll, rfIgnoreCase]);
+ StrReplace(Result, '%(Identity)', '%7:s', [rfReplaceAll, rfIgnoreCase]);
+ StrReplace(Result, '%(ModifiedTime)', '%8:s', [rfReplaceAll, rfIgnoreCase]);
+ StrReplace(Result, '%(CreatedTime)', '%9:s', [rfReplaceAll, rfIgnoreCase]);
+ StrReplace(Result, '%(AccessedTime)', '%10:s', [rfReplaceAll, rfIgnoreCase]);
+
+ // replace user defined metadata
+ Num := WellKnownItemMetadataCount;
+ Index := Pos('%(', Result);
+ while Index <> 0 do
+ begin
+ EndIndex := StrSearch(')', Result, Index + 2);
+ MetaDataName := Copy(Result, Index + 2, EndIndex - Index - 2);
+ UserDefinedMetadataNames.Add(MetaDataName);
+ StrReplace(Result, '%(' + MetaDataName + ')', '%' + IntToStr(Num) + ':s', [rfReplaceAll]);
+ Inc(Num);
+ Index := StrSearch('%(', Result, Index);
+ end;
end;
procedure GetTransformParameters(Item: TJclMsBuildItem; var Storage: TDynStringArray;
@@ -1076,13 +1099,13 @@
const
DateTimeFormat = 'yyyy-mm-dd hh:nn:ss.zzz';
var
- Index: Integer;
+ Index, DotIdx: Integer;
ItemFullInclude: string;
LocalDateTime: TDateTime;
begin
- if Length(Formats) <> 11 then
+ if Length(Formats) <> WellKnownItemMetadataCount + UserDefinedMetadataNames.Count then
begin
- SetLength(Formats, 11);
+ SetLength(Formats, WellKnownItemMetadataCount + UserDefinedMetadataNames.Count);
for Index := Low(Formats) to High(Formats) do
begin
{$IFDEF SUPPORTS_UNICODE}
@@ -1095,11 +1118,11 @@
end;
end;
- if Length(Storage) <> 11 then
- SetLength(Storage, 11);
+ if Length(Storage) <> WellKnownItemMetadataCount + UserDefinedMetadataNames.Count then
+ SetLength(Storage, WellKnownItemMetadataCount + UserDefinedMetadataNames.Count);
ItemFullInclude := Item.ItemFullInclude;
-
+
// %(FullPath) Contains the full path of the item. For example:
Storage[0] := ItemFullInclude;
@@ -1153,6 +1176,17 @@
else
Storage[10] := '';
+ for Index := 0 to UserDefinedMetadataNames.Count - 1 do
+ begin
+ DotIdx := Pos('.', UserDefinedMetadataNames[Index]);
+ if DotIdx <> 0 then // references different item => batch
+ begin
+ Storage[WellKnownItemMetadataCount + Index] := ''; // not implemented yet. Outer loop must iterator over this item
+ end
+ else
+ Storage[WellKnownItemMetadataCount + Index] := Item.ItemMetaData.Values[UserDefinedMetadataNames[Index]];
+ end;
+
for Index := Low(Formats) to High(Formats) do
{$IFDEF SUPPORTS_UNICODE}
Formats[Index].VPWideChar := PChar(Storage[Index]);
@@ -1160,23 +1194,29 @@
Formats[Index].VPChar := PChar(Storage[Index]);
{$ENDIF ~SUPPORTS_UNICODE}
end;
+
var
Index: Integer;
TransformPattern, TransformResult: string;
TransformParameters: TVarRecArray;
TransformStorage: TDynStringArray;
begin
- TransformPattern := GetTransformPattern(Transform);
+ UserDefinedMetadataNames := TStringList.Create;
+ try
+ TransformPattern := GetTransformPattern(Transform);
- Result := '';
- for Index := 0 to ItemList.Count - 1 do
- begin
- GetTransformParameters(TJclMsBuildItem(ItemList.Objects[Index]), TransformStorage, TransformParameters);
- TransformResult := Format(TransformPattern, TransformParameters);
- if Result <> '' then
- Result := Result + ';' + TransformResult
- else
- Result := TransformResult;
+ Result := '';
+ for Index := 0 to ItemList.Count - 1 do
+ begin
+ GetTransformParameters(TJclMsBuildItem(ItemList.Objects[Index]), TransformStorage, TransformParameters);
+ TransformResult := Format(TransformPattern, TransformParameters);
+ if Result <> '' then
+ Result := Result + ';' + TransformResult
+ else
+ Result := TransformResult;
+ end;
+ finally
+ UserDefinedMetadataNames.Free;
end;
end;
@@ -1234,7 +1274,7 @@
for Index := 0 to FItemDefinitions.Count - 1 do
begin
Result := TJclMsBuildItem(FItemDefinitions.Items[Index]);
- if Result.ItemName = ItemName then
+ if SameItemName(Result.ItemName, ItemName) then
Exit;
end;
Result := nil;
@@ -1251,7 +1291,7 @@
for Index := 0 to FItems.Count - 1 do
begin
Item := TJclMsBuildItem(FItems.Items[Index]);
- if Item.ItemName = ItemName then
+ if SameItemName(Item.ItemName, ItemName) then
List.AddObject(Item.ItemInclude, Item);
end;
finally
@@ -1272,6 +1312,11 @@
Result := nil;
end;
+class function TJclMsBuildParser.SameItemName(const ItemName1, ItemName2: string): Boolean;
+begin
+ Result := SameText(ItemName1, ItemName2);
+end;
+
function TJclMsBuildParser.GetItem(Index: Integer): TJclMsBuildItem;
begin
Result := TJclMsBuildItem(FItems.Items[Index]);
@@ -1954,10 +1999,10 @@
if Condition then
for Index := 0 to XmlElem.ItemCount - 1 do
- begin
- SubElem := XmlElem.Items.Item[Index];
- ParseItem(SubElem, True);
- end;
+ begin
+ SubElem := XmlElem.Items.Item[Index];
+ ParseItem(SubElem, True);
+ end;
end;
procedure TJclMsBuildParser.ParseItemGroup(XmlElem: TJclSimpleXmlElem);
@@ -1980,17 +2025,16 @@
if Condition then
for Index := 0 to XmlElem.ItemCount - 1 do
- begin
- SubElem := XmlElem.Items.Item[Index];
- ParseItem(SubElem, False);
- end;
+ begin
+ SubElem := XmlElem.Items.Item[Index];
+ ParseItem(SubElem, False);
+ end;
end;
procedure TJclMsBuildParser.ParseItemMetaData(XmlElem: TJclSimpleXmlElem; ItemMetaData: TStrings);
var
Index: Integer;
Prop: TJclSimpleXMLProp;
- SubElem: TJclSimpleXmlElem;
Condition: Boolean;
begin
Condition := True;
@@ -2005,11 +2049,7 @@
end;
if Condition then
- for Index := 0 to XmlElem.ItemCount - 1 do
- begin
- SubElem := XmlElem.Items.Item[Index];
- ItemMetaData.Values[SubElem.Name] := EvaluateString(SubElem.Value);
- end;
+ ItemMetaData.Values[XmlElem.Name] := EvaluateString(XmlElem.Value);
end;
procedure TJclMsBuildParser.ParseOnError(XmlElem: TJclSimpleXMLElem; Target: TJclMsBuildTarget);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ah...@us...> - 2012-03-09 12:43:21
|
Revision: 3766
http://jcl.svn.sourceforge.net/jcl/?rev=3766&view=rev
Author: ahuser
Date: 2012-03-09 12:43:15 +0000 (Fri, 09 Mar 2012)
Log Message:
-----------
Fixed deadlock when starting the Installers on a SSD.
CreatePipe doesn't create a pipe that supports overlapping, but the code assumed it. So if the sub-process started and terminated before the "Error-Out" data was read, the ReadFile() call would never return. I have now changed the Windows code to create a named pipe with FILE_FLAG_OVERLAPPED and fixed all the exceptions that were thrown due to not handling ERROR_IO_PENDING and ERROR_PIPE_BROKEN correctly.
Modified Paths:
--------------
trunk/jcl/source/common/JclSysUtils.pas
Modified: trunk/jcl/source/common/JclSysUtils.pas
===================================================================
--- trunk/jcl/source/common/JclSysUtils.pas 2012-03-09 10:29:12 UTC (rev 3765)
+++ trunk/jcl/source/common/JclSysUtils.pas 2012-03-09 12:43:15 UTC (rev 3766)
@@ -2751,20 +2751,44 @@
if not ReadFile(PipeInfo.PipeRead, PipeInfo.Buffer[0], BufferSize, NullDWORD^, @Overlapped) then
begin
Res := GetLastError;
- if Res = ERROR_BROKEN_PIPE then
- begin
- CloseHandle(PipeInfo.PipeRead);
- PipeInfo.PipeRead := 0;
- end
+ case Res of
+ ERROR_BROKEN_PIPE:
+ begin
+ CloseHandle(PipeInfo.PipeRead);
+ PipeInfo.PipeRead := 0;
+ end;
+ ERROR_IO_PENDING:
+ ;
else
{$IFDEF DELPHI11_UP}
RaiseLastOSError(Res);
{$ELSE}
RaiseLastOSError;
{$ENDIF DELPHI11_UP}
+ end;
end;
end;
+procedure InternalExecuteHandlePipeEvent(var PipeInfo: TPipeInfo; var Overlapped: TOverlapped);
+var
+ PipeBytesRead: DWORD;
+begin
+ if GetOverlappedResult(PipeInfo.PipeRead, Overlapped, PipeBytesRead, False) then
+ begin
+ InternalExecuteProcessBuffer(PipeInfo, PipeBytesRead);
+ // automatically launch the next read
+ InternalExecuteReadPipe(PipeInfo, Overlapped);
+ end
+ else
+ if GetLastError = ERROR_BROKEN_PIPE then
+ begin
+ CloseHandle(PipeInfo.PipeRead);
+ PipeInfo.PipeRead := 0;
+ end
+ else
+ RaiseLastOSError;
+end;
+
procedure InternalExecuteFlushPipe(var PipeInfo: TPipeInfo; var Overlapped: TOverlapped);
var
PipeBytesRead: DWORD;
@@ -2783,12 +2807,58 @@
end;
end;
+var
+ AsyncPipeCounter: Integer;
+
+// CreateAsyncPipe creates a pipe that uses overlapped reading.
+function CreateAsyncPipe(var hReadPipe, hWritePipe: THandle;
+ lpPipeAttributes: PSecurityAttributes; nSize: DWORD): BOOL;
+var
+ PipeName: string;
+ Error: DWORD;
+ PipeReadHandle, PipeWriteHandle: THandle;
+begin
+ Result := False;
+
+ if (@hReadPipe = nil) or (@hWritePipe = nil) then
+ begin
+ SetLastError(ERROR_INVALID_PARAMETER);
+ Exit;
+ end;
+
+ if nSize = 0 then
+ nSize := 4096;
+
+ InterlockedIncrement(AsyncPipeCounter);
+ PipeName := Format('\\.\Pipe\AsyncAnonPipe.%.8x.%.8x', [GetCurrentProcessId, AsyncPipeCounter]);
+
+ PipeReadHandle := CreateNamedPipe(PChar(PipeName), PIPE_ACCESS_INBOUND or FILE_FLAG_OVERLAPPED,
+ PIPE_TYPE_BYTE or PIPE_WAIT, 1, nSize, nSize, 120 * 1000, lpPipeAttributes);
+ if PipeReadHandle = 0 then
+ Exit;
+
+ PipeWriteHandle := CreateFile(PChar(PipeName), GENERIC_WRITE, 0, lpPipeAttributes, OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL {or FILE_FLAG_OVERLAPPED}, 0);
+ if PipeWriteHandle = INVALID_HANDLE_VALUE then
+ begin
+ Error := GetLastError;
+ CloseHandle(PipeReadHandle);
+ SetLastError(Error);
+ Exit;
+ end;
+
+ hReadPipe := PipeReadHandle;
+ hWritePipe := PipeWriteHandle;
+
+ Result := True;
+end;
+
function InternalExecute(CommandLine: string; AbortPtr: PBoolean; AbortEvent: TJclEvent;
var Output: string; OutputLineCallback: TTextHandler; RawOutput: Boolean;
MergeError: Boolean; var Error: string; ErrorLineCallback: TTextHandler; RawError: Boolean): Cardinal;
var
OutPipeInfo, ErrorPipeInfo: TPipeInfo;
- Index, PipeBytesRead: Cardinal;
+ Index: Cardinal;
{$IFDEF MSWINDOWS}
var
StartupInfo: TStartupInfo;
@@ -2804,10 +2874,11 @@
SecurityAttr.nLength := SizeOf(SecurityAttr);
SecurityAttr.lpSecurityDescriptor := nil;
SecurityAttr.bInheritHandle := True;
+
ResetMemory(OutPipeInfo, SizeOf(OutPipeInfo));
OutPipeInfo.TextHandler := OutputLineCallback;
OutPipeInfo.RawOutput := RawOutput;
- if not CreatePipe(OutPipeInfo.PipeRead, OutPipeInfo.PipeWrite, @SecurityAttr, 0) then
+ if not CreateAsyncPipe(OutPipeInfo.PipeRead, OutPipeInfo.PipeWrite, @SecurityAttr, 0) then
begin
Result := GetLastError;
Exit;
@@ -2818,13 +2889,17 @@
begin
ErrorPipeInfo.TextHandler := ErrorLineCallback;
ErrorPipeInfo.RawOutput := RawError;
- if not CreatePipe(ErrorPipeInfo.PipeRead, ErrorPipeInfo.PipeWrite, @SecurityAttr, 0) then
+ if not CreateAsyncPipe(ErrorPipeInfo.PipeRead, ErrorPipeInfo.PipeWrite, @SecurityAttr, 0) then
begin
Result := GetLastError;
+ CloseHandle(OutPipeInfo.PipeWrite);
+ CloseHandle(OutPipeInfo.PipeRead);
+ OutPipeInfo.Event.Free;
Exit;
end;
ErrorPipeInfo.Event := TJclEvent.Create(@SecurityAttr, False {automatic reset}, False {not flagged}, '' {anonymous});
end;
+
ResetMemory(StartupInfo, SizeOf(TStartupInfo));
StartupInfo.cb := SizeOf(TStartupInfo);
StartupInfo.dwFlags := STARTF_USESHOWWINDOW or STARTF_USESTDHANDLES;
@@ -2878,18 +2953,12 @@
WaitEvents[Index] := AbortEvent;
end;
// init the asynchronous reads
- OutOverlapped.Internal := 0;
- OutOverlapped.InternalHigh := 0;
- OutOverlapped.Offset := 0;
- OutOverlapped.OffsetHigh := 0;
+ ResetMemory(OutOverlapped, SizeOf(OutOverlapped));
OutOverlapped.hEvent := OutPipeInfo.Event.Handle;
InternalExecuteReadPipe(OutPipeInfo, OutOverlapped);
if not MergeError then
begin
- ErrorOverlapped.Internal := 0;
- ErrorOverlapped.InternalHigh := 0;
- ErrorOverlapped.Offset := 0;
- ErrorOverlapped.OffsetHigh := 0;
+ ResetMemory(ErrorOverlapped, SizeOf(ErrorOverlapped));
ErrorOverlapped.hEvent := ErrorPipeInfo.Event.Handle;
InternalExecuteReadPipe(ErrorPipeInfo, ErrorOverlapped);
end;
@@ -2904,21 +2973,13 @@
if Index = (WAIT_OBJECT_0 + 1) then
begin
// event on output
- if not GetOverlappedResult(OutPipeInfo.PipeRead, OutOverlapped, PipeBytesRead, False) then
- RaiseLastOSError;
- InternalExecuteProcessBuffer(OutPipeInfo, PipeBytesRead);
- // automatically launch the next read
- InternalExecuteReadPipe(OutpipeInfo, OutOverlapped);
+ InternalExecuteHandlePipeEvent(OutPipeInfo, OutOverlapped);
end
else
if (Index = (WAIT_OBJECT_0 + 2)) and not MergeError then
begin
// event on error
- if not GetOverlappedResult(ErrorPipeInfo.PipeRead, ErrorOverlapped, PipeBytesRead, False) then
- RaiseLastOSError;
- InternalExecuteProcessBuffer(ErrorPipeInfo, PipeBytesRead);
- // automatically launch the next read
- InternalExecuteReadPipe(ErrorPipeInfo, ErrorOverlapped);
+ InternalExecuteHandlePipeEvent(ErrorPipeInfo, ErrorOverlapped);
end
else
if ((Index = (WAIT_OBJECT_0 + 2)) and MergeError) or
@@ -2941,7 +3002,7 @@
if OutPipeInfo.PipeRead <> 0 then
// read data remaining in output pipe
InternalExecuteFlushPipe(OutPipeinfo, OutOverlapped);
- if (not MergeError) and (ErrorPipeInfo.PipeRead <> 0) then
+ if not MergeError and (ErrorPipeInfo.PipeRead <> 0) then
// read data remaining in error pipe
InternalExecuteFlushPipe(ErrorPipeInfo, ErrorOverlapped);
end;
@@ -2970,6 +3031,7 @@
{$ENDIF MSWINDOWS}
{$IFDEF UNIX}
var
+ PipeBytesRead: Cardinal;
Pipe: PIOFile;
Cmd: string;
begin
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ah...@us...> - 2012-03-09 10:29:22
|
Revision: 3765
http://jcl.svn.sourceforge.net/jcl/?rev=3765&view=rev
Author: ahuser
Date: 2012-03-09 10:29:12 +0000 (Fri, 09 Mar 2012)
Log Message:
-----------
Fixed exception when parsing Delphi XE's CodeGear.Delphi.Targets file.
Modified Paths:
--------------
trunk/jcl/source/windows/JclMsBuild.pas
Modified: trunk/jcl/source/windows/JclMsBuild.pas
===================================================================
--- trunk/jcl/source/windows/JclMsBuild.pas 2012-03-07 22:07:32 UTC (rev 3764)
+++ trunk/jcl/source/windows/JclMsBuild.pas 2012-03-09 10:29:12 UTC (rev 3765)
@@ -904,7 +904,8 @@
end;
function TJclMsBuildParser.EvaluateString(const S: string): string;
- procedure FindClosingBrace(const R: string; var Position: Integer);
+
+ function FindClosingBrace(const R: string; var Position: Integer): Boolean;
var
Index, Len, BraceCount: Integer;
Quotes: string;
@@ -956,9 +957,16 @@
end;
Inc(Position);
end;
- if Position > Len then
- raise EJclMsBuildError.CreateResFmt(@RsEEndOfString, [S]);
+ Result := Position <= Len;
+
+// Delphi XE's CodeGear.Delphi.Targets has a bug where the closing paran is missing
+// "'$(DelphiWin32DebugDCUPath'!=''". But it is still a valid string and not worth
+// an exception.
+//
+// if Position > Len then
+// raise EJclMsBuildError.CreateResFmt(@RsEEndOfString, [S]);
end;
+
var
Start, Position, Index: Integer;
PropertyName, PropertyValue, Path, Name: string;
@@ -975,7 +983,8 @@
if Start > 0 then
begin
Position := Start;
- FindClosingBrace(Result, Position);
+ if not FindClosingBrace(Result, Position) then
+ Break;
PropertyName := Copy(Result, Start + 2, Position - Start - 2);
Prop := True;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-03-07 22:07:44
|
Revision: 3764
http://jcl.svn.sourceforge.net/jcl/?rev=3764&view=rev
Author: outchy
Date: 2012-03-07 22:07:32 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
rework the handling of RsVars.bat:
- merge TJclBDSInstallation.RsVars variables directly into TJclBorRADToolInstallation.EnvironmentVariables;
- TJclDCC32 now dynamically queries installation environment variables for parsing MsBuild projects.
Modified Paths:
--------------
trunk/jcl/source/common/JclCompilerUtils.pas
trunk/jcl/source/common/JclIDEUtils.pas
Modified: trunk/jcl/source/common/JclCompilerUtils.pas
===================================================================
--- trunk/jcl/source/common/JclCompilerUtils.pas 2012-03-05 21:09:26 UTC (rev 3763)
+++ trunk/jcl/source/common/JclCompilerUtils.pas 2012-03-07 22:07:32 UTC (rev 3764)
@@ -117,6 +117,8 @@
Namespace: string;
end;
+ TJclStringsGetterFunction = function: TStrings of object;
+
TJclDCC32 = class(TJclBorlandCommandLineTool)
private
FDCPSearchPath: string;
@@ -125,8 +127,7 @@
FCppSearchPath: string;
FSupportsNoConfig: Boolean;
FSupportsPlatform: Boolean;
- FRsVars: TStrings;
- procedure SetRsVars(const Value: TStrings);
+ FOnEnvironmentVariables: TJclStringsGetterFunction;
protected
procedure AddProjectOptions(const ProjectFileName, DCPPath: string);
function Compile(const ProjectFileName: string): Boolean;
@@ -135,7 +136,6 @@
constructor Create(const ABinDirectory: string; ALongPathBug: Boolean;
ACompilerSettingsFormat: TJclCompilerSettingsFormat; ASupportsNoConfig, ASupportsPlatform: Boolean;
const ADCPSearchPath, ALibrarySearchPath, ALibraryDebugSearchPath, ACppSearchPath: string);
- destructor Destroy; override;
function GetExeName: string; override;
function Execute(const CommandLine: string): Boolean; override;
function MakePackage(const PackageName, BPLPath, DCPPath: string;
@@ -150,7 +150,7 @@
property DCPSearchPath: string read FDCPSearchPath;
property LibrarySearchPath: string read FLibrarySearchPath;
property LibraryDebugSearchPath: string read FLibraryDebugSearchPath;
- property RsVars: TStrings read FRsVars write SetRsVars;
+ property OnEnvironmentVariables: TJclStringsGetterFunction read FOnEnvironmentVariables write FOnEnvironmentVariables;
property SupportsNoConfig: Boolean read FSupportsNoConfig;
property SupportsPlatform: Boolean read FSupportsPlatform;
end;
@@ -817,8 +817,7 @@
function TJclDCC32.AddDProjOptions(const ProjectFileName: string; var ProjectOptions: TProjectOptions): Boolean;
var
- Index: Integer;
- DProjFileName, PersonalityName, Name: string;
+ DProjFileName, PersonalityName: string;
MsBuildOptions: TJclMsBuildParser;
ProjectExtensionsNode, PersonalityNode: TJclSimpleXMLElem;
begin
@@ -831,11 +830,10 @@
MsBuildOptions.Init;
if SupportsPlatform then
MsBuildOptions.Properties.GlobalProperties.Values['Platform'] := GetPlatform;
- for Index := 0 to RsVars.Count - 1 do
- begin
- Name := RsVars.Names[Index];
- MsBuildOptions.Properties.EnvironmentProperties.Values[Name] := RsVars.Values[Name];
- end;
+
+ if Assigned(FOnEnvironmentVariables) then
+ MsBuildOptions.Properties.EnvironmentProperties.Assign(FOnEnvironmentVariables);
+
MsBuildOptions.Parse;
PersonalityName := '';
@@ -1018,16 +1016,9 @@
FLibrarySearchPath := ALibrarySearchPath;
FLibraryDebugSearchPath := ALibraryDebugSearchPath;
FCppSearchPath := ACppSearchPath;
- FRsVars := TStringList.Create;
SetDefaultOptions(False); // in case $(DELPHI)\bin\dcc32.cfg (replace as appropriate) is invalid
end;
-destructor TJclDCC32.Destroy;
-begin
- FRsVars.Free;
- inherited Destroy;
-end;
-
function TJclDCC32.Execute(const CommandLine: string): Boolean;
function IsPathOption(const S: string; out Len: Integer): Boolean;
begin
@@ -1197,11 +1188,6 @@
end;
end;
-procedure TJclDCC32.SetRsVars(const Value: TStrings);
-begin
- FRsVars.Assign(Value);
-end;
-
//=== { TJclDCC64 } ==========================================================
class function TJclDCC64.GetPlatform: string;
Modified: trunk/jcl/source/common/JclIDEUtils.pas
===================================================================
--- trunk/jcl/source/common/JclIDEUtils.pas 2012-03-05 21:09:26 UTC (rev 3763)
+++ trunk/jcl/source/common/JclIDEUtils.pas 2012-03-07 22:07:32 UTC (rev 3764)
@@ -588,7 +588,6 @@
FDCCIL: TJclDCCIL;
FDCC64: TJclDCC64;
FPdbCreate: Boolean;
- FRsVars: TStrings;
procedure SetDualPackageInstallation(const Value: Boolean);
function GetCppPathsKeyName: string;
function GetCppBrowsingPath(APlatform: TJclBDSPlatform): TJclBorRADToolPath;
@@ -612,7 +611,6 @@
function GetMsBuildEnvOption(const OptionName: string; APlatform: TJclBDSPlatform; Raw: Boolean): string;
procedure SetMsBuildEnvOption(const OptionName, Value: string; APlatform: TJclBDSPlatform);
function GetBDSPlatformStr(APlatform: TJclBDSPlatform): string;
- function GetRsVars: TStrings; overload;
protected
function GetDCPOutputPath(APlatform: TJclBDSPlatform): string; override;
function GetBPLOutputPath(APlatform: TJclBDSPlatform): string; override;
@@ -648,7 +646,8 @@
function GetCommonProjectsDir: string; override;
class function GetDefaultProjectsDirectory(const RootDir: string; IDEVersionNumber: Integer): string;
class function GetCommonProjectsDirectory(const RootDir: string; IDEVersionNumber: Integer): string;
- class procedure GetRADStudioVars(const RootDir: string; IDEVersionNumber: Integer; Variables: TStrings); overload;
+ class procedure GetRADStudioVars(const RootDir: string; IDEVersionNumber: Integer; Variables: TStrings);
+ class function GetRADStudioVarsFileName(const RootDir: string; IDEVersionNumber: Integer): TFileName;
{class }function RadToolName: string; overload; override;
class function RadToolName(IDEVersionNumber: Integer): string; reintroduce; overload;
@@ -684,7 +683,6 @@
property DCCIL: TJclDCCIL read GetDCCIL;
property MaxDelphiCLRVersion: string read GetMaxDelphiCLRVersion;
property PdbCreate: Boolean read FPdbCreate write FPdbCreate;
- property RsVars: TStrings read GetRsVars;
end;
{$ENDIF MSWINDOWS}
@@ -1990,6 +1988,7 @@
raise EJclBorRadException.CreateResFmt(@RsENotFound, [Dcc32ExeName]);
FDCC32 := TJclDCC32.Create(BinFolderName, LongPathBug, CompilerSettingsFormat,
SupportsNoConfig, SupportsPlatform, DCPOutputPath[bpWin32], LibFolderName[bpWin32], LibDebugFolderName[bpWin32], ObjFolderName[bpWin32]);
+ FDCC32.OnEnvironmentVariables := GetEnvironmentVariables;
end;
Result := FDCC32;
end;
@@ -3213,7 +3212,6 @@
destructor TJclBDSInstallation.Destroy;
begin
- FreeAndNil(FRsVars);
FreeAndNil(FDCCIL);
FreeAndNil(FHelp2Manager);
inherited Destroy;
@@ -3634,18 +3632,42 @@
end;
function TJclBDSInstallation.GetEnvironmentVariables: TStrings;
+var
+ RsVars: TStrings;
+ Index: Integer;
+ EnvOptionName: string;
begin
- Result := inherited GetEnvironmentVariables;
- if Assigned(Result) then
+ if not Assigned(FEnvironmentVariables) then
begin
- // adding default values
- if Result.Values[EnvVariableBDSValueName] = '' then
- Result.Values[EnvVariableBDSValueName] := PathRemoveSeparator(RootDir);
- if Result.Values[EnvVariableBDSPROJDIRValueName] = '' then
- Result.Values[EnvVariableBDSPROJDIRValueName] := DefaultProjectsDir;
- if Result.Values[EnvVariableBDSCOMDIRValueName] = '' then
- Result.Values[EnvVariableBDSCOMDIRValueName] := CommonProjectsDir;
- end;
+ Result := inherited GetEnvironmentVariables;
+ if Assigned(Result) and (IDEVersionNumber >= 5) then
+ begin
+ RsVars := TStringList.Create;
+ try
+ GetRADStudioVars(RootDir, IDEVersionNumber, RsVars);
+ for Index := 0 to RsVars.Count - 1 do
+ begin
+ EnvOptionName := RsVars.Names[Index];
+ Result.Values[EnvOptionName] := RsVars.Values[EnvOptionName];
+ end;
+ finally
+ RsVars.Free;
+ end;
+ end
+ else
+ if Assigned(Result) then
+ begin
+ // adding default values
+ if Result.Values[EnvVariableBDSValueName] = '' then
+ Result.Values[EnvVariableBDSValueName] := PathRemoveSeparator(RootDir);
+ if Result.Values[EnvVariableBDSPROJDIRValueName] = '' then
+ Result.Values[EnvVariableBDSPROJDIRValueName] := DefaultProjectsDir;
+ if Result.Values[EnvVariableBDSCOMDIRValueName] = '' then
+ Result.Values[EnvVariableBDSCOMDIRValueName] := CommonProjectsDir;
+ end;
+ end
+ else
+ Result := FEnvironmentVariables;
end;
class function TJclBDSInstallation.GetLatestUpdatePackForVersion(Version: Integer): Integer;
@@ -3696,27 +3718,27 @@
begin
RsVarsOutput := '';
RsVarsError := '';
- if GetEnvironmentVar('COMSPEC', ComSpec) and (JclSysUtils.Execute(Format('%s /C "%s%sbin%srsvars.bat && set"',
- [ComSpec, ExtractShortPathName(RootDir), DirDelimiter, DirDelimiter]), RsVarsOutput, RsVarsError) = 0) then
+ if GetEnvironmentVar('COMSPEC', ComSpec) and (JclSysUtils.Execute(Format('%s /C "%s && set"',
+ [ComSpec, GetRADStudioVarsFileName(RootDir, IDEVersionNumber)]), RsVarsOutput, RsVarsError) = 0) then
Variables.Text := RsVarsOutput
else
raise EJclBorRADException.CreateResFmt(@RsERsVars, [RadToolName(IDEVersionNumber), IDEVersionNumber, RsVarsError]);
end;
end;
-function TJclBDSInstallation.GetRsVars: TStrings;
+class function TJclBDSInstallation.GetRADStudioVarsFileName(const RootDir: string; IDEVersionNumber: Integer): TFileName;
begin
- if not Assigned(FRsVars) or (FRsVars.Count = 0) then
- begin
- FRsVars := TStringList.Create;
- GetRADStudioVars(RootDir, IDEVersionNumber, FRsVars);
- end;
- Result := FRsVars;
+ if IDEVersionNumber >= 5 then
+ Result := Format('%s%sbin%srsvars.bat', [ExtractShortPathName(RootDir), DirDelimiter, DirDelimiter])
+ else
+ raise EJclBorRADException.CreateResFmt(@RsERsVars, [RadToolName(IDEVersionNumber), IDEVersionNumber, LoadResString(@RsMsBuildNotSupported)]);
end;
function TJclBDSInstallation.GetValid: Boolean;
begin
- Result := (inherited GetValid) and ((IDEVersionNumber < 5) or FileExists(GetMsBuildEnvOptionsFileName));
+ Result := inherited GetValid;
+ if Result and (IDEVersionNumber >= 5) then
+ Result := FileExists(GetMsBuildEnvOptionsFileName) and FileExists(GetRADStudioVarsFileName(RootDir, IDEVersionNumber));
end;
function TJclBDSInstallation.GetLibraryBrowsingPath(APlatform: TJclBDSPlatform): TJclBorRADToolPath;
@@ -3783,12 +3805,13 @@
function TJclBDSInstallation.GetMsBuildEnvOption(const OptionName: string; APlatform: TJclBDSPlatform; Raw: Boolean): string;
var
EnvOptions: TJclMsBuildParser;
- MsBuildEnvironmentFileName, EnvOptionName: string;
- Variables: TStrings;
- Index: Integer;
+ MsBuildEnvironmentFileName: string;
begin
Result := '';
+ if IDEVersionNumber < 5 then
+ raise EJclBorRADException.CreateResFmt(@RsERsVars, [RadToolName(IDEVersionNumber), IDEVersionNumber, LoadResString(@RsMsBuildNotSupported)]);
+
MsBuildEnvironmentFileName := GetMsBuildEnvironmentFileName;
if FileExists(MsBuildEnvironmentFileName) then
@@ -3799,12 +3822,7 @@
EnvOptions.Init;
// add custom "environment" variables
- Variables := RsVars;
- for Index := 0 to Variables.Count - 1 do
- begin
- EnvOptionName := Variables.Names[Index];
- EnvOptions.Properties.EnvironmentProperties.Values[EnvOptionName] := Variables.Values[EnvOptionName];
- end;
+ EnvOptions.Properties.EnvironmentProperties.Assign(EnvironmentVariables);
if SupportsPlatform then
EnvOptions.Properties.GlobalProperties.Values['Platform'] := GetBDSPlatformStr(APlatform);
@@ -4081,23 +4099,19 @@
procedure TJclBDSInstallation.SetMsBuildEnvOption(const OptionName, Value: string; APlatform: TJclBDSPlatform);
var
- EnvOptionsFileName, BakEnvOptionsFileName, EnvOptionName: string;
+ EnvOptionsFileName, BakEnvOptionsFileName: string;
EnvOptions: TJclMsBuildParser;
- Variables: TStrings;
- Index: Integer;
begin
+ if IDEVersionNumber < 5 then
+ raise EJclBorRADException.CreateResFmt(@RsERsVars, [RadToolName(IDEVersionNumber), IDEVersionNumber, LoadResString(@RsMsBuildNotSupported)]);
+
EnvOptionsFileName := GetMsBuildEnvOptionsFileName;
EnvOptions := TJclMsBuildParser.Create(EnvOptionsFileName);
try
EnvOptions.Init;
// add custom "environment" variables
- Variables := RsVars;
- for Index := 0 to Variables.Count - 1 do
- begin
- EnvOptionName := Variables.Names[Index];
- EnvOptions.Properties.EnvironmentProperties.Values[EnvOptionName] := Variables.Values[EnvOptionName];
- end;
+ EnvOptions.Properties.EnvironmentProperties.Assign(EnvironmentVariables);
if SupportsPlatform then
EnvOptions.Properties.GlobalProperties.Values['Platform'] := GetBDSPlatformStr(APlatform);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-03-05 21:09:33
|
Revision: 3763
http://jcl.svn.sourceforge.net/jcl/?rev=3763&view=rev
Author: outchy
Date: 2012-03-05 21:09:26 +0000 (Mon, 05 Mar 2012)
Log Message:
-----------
IoAPI.h is not distributed with Delphi 2007. Remove this include.
Modified Paths:
--------------
trunk/jcl/source/prototypes/JclWin32.pas
trunk/jcl/source/windows/JclWin32.pas
Modified: trunk/jcl/source/prototypes/JclWin32.pas
===================================================================
--- trunk/jcl/source/prototypes/JclWin32.pas 2012-03-05 21:08:10 UTC (rev 3762)
+++ trunk/jcl/source/prototypes/JclWin32.pas 2012-03-05 21:09:26 UTC (rev 3763)
@@ -78,7 +78,6 @@
{$HPPEMIT '#include <WinBase.h>'}
{$HPPEMIT '#include <BaseTsd.h>'}
{$HPPEMIT '#include <ImageHlp.h>'}
-{$HPPEMIT '#include <IoAPI.h>'}
{$HPPEMIT '#include <lm.h>'}
{$HPPEMIT '#include <Nb30.h>'}
{$HPPEMIT '#include <RasDlg.h>'}
Modified: trunk/jcl/source/windows/JclWin32.pas
===================================================================
--- trunk/jcl/source/windows/JclWin32.pas 2012-03-05 21:08:10 UTC (rev 3762)
+++ trunk/jcl/source/windows/JclWin32.pas 2012-03-05 21:09:26 UTC (rev 3763)
@@ -82,7 +82,6 @@
{$HPPEMIT '#include <WinBase.h>'}
{$HPPEMIT '#include <BaseTsd.h>'}
{$HPPEMIT '#include <ImageHlp.h>'}
-{$HPPEMIT '#include <IoAPI.h>'}
{$HPPEMIT '#include <lm.h>'}
{$HPPEMIT '#include <Nb30.h>'}
{$HPPEMIT '#include <RasDlg.h>'}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-03-05 21:08:16
|
Revision: 3762
http://jcl.svn.sourceforge.net/jcl/?rev=3762&view=rev
Author: outchy
Date: 2012-03-05 21:08:10 +0000 (Mon, 05 Mar 2012)
Log Message:
-----------
Mantis 5809: Unsafe code in JclMsBuild.pas.
TJclDCC32 now takes care of RsVars.bat for parsing project options.
Modified Paths:
--------------
trunk/jcl/source/common/JclCompilerUtils.pas
trunk/jcl/source/common/JclIDEUtils.pas
Modified: trunk/jcl/source/common/JclCompilerUtils.pas
===================================================================
--- trunk/jcl/source/common/JclCompilerUtils.pas 2012-03-04 21:21:40 UTC (rev 3761)
+++ trunk/jcl/source/common/JclCompilerUtils.pas 2012-03-05 21:08:10 UTC (rev 3762)
@@ -125,6 +125,8 @@
FCppSearchPath: string;
FSupportsNoConfig: Boolean;
FSupportsPlatform: Boolean;
+ FRsVars: TStrings;
+ procedure SetRsVars(const Value: TStrings);
protected
procedure AddProjectOptions(const ProjectFileName, DCPPath: string);
function Compile(const ProjectFileName: string): Boolean;
@@ -133,6 +135,7 @@
constructor Create(const ABinDirectory: string; ALongPathBug: Boolean;
ACompilerSettingsFormat: TJclCompilerSettingsFormat; ASupportsNoConfig, ASupportsPlatform: Boolean;
const ADCPSearchPath, ALibrarySearchPath, ALibraryDebugSearchPath, ACppSearchPath: string);
+ destructor Destroy; override;
function GetExeName: string; override;
function Execute(const CommandLine: string): Boolean; override;
function MakePackage(const PackageName, BPLPath, DCPPath: string;
@@ -147,6 +150,7 @@
property DCPSearchPath: string read FDCPSearchPath;
property LibrarySearchPath: string read FLibrarySearchPath;
property LibraryDebugSearchPath: string read FLibraryDebugSearchPath;
+ property RsVars: TStrings read FRsVars write SetRsVars;
property SupportsNoConfig: Boolean read FSupportsNoConfig;
property SupportsPlatform: Boolean read FSupportsPlatform;
end;
@@ -813,7 +817,8 @@
function TJclDCC32.AddDProjOptions(const ProjectFileName: string; var ProjectOptions: TProjectOptions): Boolean;
var
- DProjFileName, PersonalityName: string;
+ Index: Integer;
+ DProjFileName, PersonalityName, Name: string;
MsBuildOptions: TJclMsBuildParser;
ProjectExtensionsNode, PersonalityNode: TJclSimpleXMLElem;
begin
@@ -826,6 +831,11 @@
MsBuildOptions.Init;
if SupportsPlatform then
MsBuildOptions.Properties.GlobalProperties.Values['Platform'] := GetPlatform;
+ for Index := 0 to RsVars.Count - 1 do
+ begin
+ Name := RsVars.Names[Index];
+ MsBuildOptions.Properties.EnvironmentProperties.Values[Name] := RsVars.Values[Name];
+ end;
MsBuildOptions.Parse;
PersonalityName := '';
@@ -1008,9 +1018,16 @@
FLibrarySearchPath := ALibrarySearchPath;
FLibraryDebugSearchPath := ALibraryDebugSearchPath;
FCppSearchPath := ACppSearchPath;
+ FRsVars := TStringList.Create;
SetDefaultOptions(False); // in case $(DELPHI)\bin\dcc32.cfg (replace as appropriate) is invalid
end;
+destructor TJclDCC32.Destroy;
+begin
+ FRsVars.Free;
+ inherited Destroy;
+end;
+
function TJclDCC32.Execute(const CommandLine: string): Boolean;
function IsPathOption(const S: string; out Len: Integer): Boolean;
begin
@@ -1180,6 +1197,11 @@
end;
end;
+procedure TJclDCC32.SetRsVars(const Value: TStrings);
+begin
+ FRsVars.Assign(Value);
+end;
+
//=== { TJclDCC64 } ==========================================================
class function TJclDCC64.GetPlatform: string;
Modified: trunk/jcl/source/common/JclIDEUtils.pas
===================================================================
--- trunk/jcl/source/common/JclIDEUtils.pas 2012-03-04 21:21:40 UTC (rev 3761)
+++ trunk/jcl/source/common/JclIDEUtils.pas 2012-03-05 21:08:10 UTC (rev 3762)
@@ -588,6 +588,7 @@
FDCCIL: TJclDCCIL;
FDCC64: TJclDCC64;
FPdbCreate: Boolean;
+ FRsVars: TStrings;
procedure SetDualPackageInstallation(const Value: Boolean);
function GetCppPathsKeyName: string;
function GetCppBrowsingPath(APlatform: TJclBDSPlatform): TJclBorRADToolPath;
@@ -611,6 +612,7 @@
function GetMsBuildEnvOption(const OptionName: string; APlatform: TJclBDSPlatform; Raw: Boolean): string;
procedure SetMsBuildEnvOption(const OptionName, Value: string; APlatform: TJclBDSPlatform);
function GetBDSPlatformStr(APlatform: TJclBDSPlatform): string;
+ function GetRsVars: TStrings; overload;
protected
function GetDCPOutputPath(APlatform: TJclBDSPlatform): string; override;
function GetBPLOutputPath(APlatform: TJclBDSPlatform): string; override;
@@ -646,7 +648,7 @@
function GetCommonProjectsDir: string; override;
class function GetDefaultProjectsDirectory(const RootDir: string; IDEVersionNumber: Integer): string;
class function GetCommonProjectsDirectory(const RootDir: string; IDEVersionNumber: Integer): string;
- class procedure GetRsVars(const RootDir: string; IDEVersionNumber: Integer; Variables: TStrings);
+ class procedure GetRADStudioVars(const RootDir: string; IDEVersionNumber: Integer; Variables: TStrings); overload;
{class }function RadToolName: string; overload; override;
class function RadToolName(IDEVersionNumber: Integer): string; reintroduce; overload;
@@ -682,6 +684,7 @@
property DCCIL: TJclDCCIL read GetDCCIL;
property MaxDelphiCLRVersion: string read GetMaxDelphiCLRVersion;
property PdbCreate: Boolean read FPdbCreate write FPdbCreate;
+ property RsVars: TStrings read GetRsVars;
end;
{$ENDIF MSWINDOWS}
@@ -3210,6 +3213,7 @@
destructor TJclBDSInstallation.Destroy;
begin
+ FreeAndNil(FRsVars);
FreeAndNil(FDCCIL);
FreeAndNil(FHelp2Manager);
inherited Destroy;
@@ -3465,7 +3469,7 @@
Variables := TStringList.Create;
try
- GetRsVars(RootDir, IDEVersionNumber, Variables);
+ GetRADStudioVars(RootDir, IDEVersionNumber, Variables);
Result := Variables.Values[EnvVariableBDSCOMDIRValueName];
finally
Variables.Free;
@@ -3684,7 +3688,7 @@
end;
end;
-class procedure TJclBDSInstallation.GetRsVars(const RootDir: string; IDEVersionNumber: Integer; Variables: TStrings);
+class procedure TJclBDSInstallation.GetRADStudioVars(const RootDir: string; IDEVersionNumber: Integer; Variables: TStrings);
var
RsVarsOutput, ComSpec, RsVarsError: string;
begin
@@ -3700,6 +3704,16 @@
end;
end;
+function TJclBDSInstallation.GetRsVars: TStrings;
+begin
+ if not Assigned(FRsVars) or (FRsVars.Count = 0) then
+ begin
+ FRsVars := TStringList.Create;
+ GetRADStudioVars(RootDir, IDEVersionNumber, FRsVars);
+ end;
+ Result := FRsVars;
+end;
+
function TJclBDSInstallation.GetValid: Boolean;
begin
Result := (inherited GetValid) and ((IDEVersionNumber < 5) or FileExists(GetMsBuildEnvOptionsFileName));
@@ -3785,16 +3799,11 @@
EnvOptions.Init;
// add custom "environment" variables
- Variables := TStringList.Create;
- try
- GetRsVars(RootDir, IDEVersionNumber, Variables);
- for Index := 0 to Variables.Count - 1 do
- begin
- EnvOptionName := Variables.Names[Index];
- EnvOptions.Properties.EnvironmentProperties.Values[EnvOptionName] := Variables.Values[EnvOptionName];
- end;
- finally
- Variables.Free;
+ Variables := RsVars;
+ for Index := 0 to Variables.Count - 1 do
+ begin
+ EnvOptionName := Variables.Names[Index];
+ EnvOptions.Properties.EnvironmentProperties.Values[EnvOptionName] := Variables.Values[EnvOptionName];
end;
if SupportsPlatform then
@@ -4083,16 +4092,11 @@
EnvOptions.Init;
// add custom "environment" variables
- Variables := TStringList.Create;
- try
- GetRsVars(RootDir, IDEVersionNumber, Variables);
- for Index := 0 to Variables.Count - 1 do
- begin
- EnvOptionName := Variables.Names[Index];
- EnvOptions.Properties.EnvironmentProperties.Values[EnvOptionName] := Variables.Values[EnvOptionName];
- end;
- finally
- Variables.Free;
+ Variables := RsVars;
+ for Index := 0 to Variables.Count - 1 do
+ begin
+ EnvOptionName := Variables.Names[Index];
+ EnvOptions.Properties.EnvironmentProperties.Values[EnvOptionName] := Variables.Values[EnvOptionName];
end;
if SupportsPlatform then
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-03-04 21:21:49
|
Revision: 3761
http://jcl.svn.sourceforge.net/jcl/?rev=3761&view=rev
Author: outchy
Date: 2012-03-04 21:21:40 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
More FPC compatibility fixes:
- JclDeveloperTools
- JclVcl
Modified Paths:
--------------
trunk/jcl/packages/cs1/JclDeveloperTools.dpk
trunk/jcl/packages/d8/JclDeveloperTools.dpk
trunk/jcl/packages/fpc/JclDeveloperTools.lpk
trunk/jcl/packages/fpc/JclDeveloperTools.pas
trunk/jcl/packages/resources.mak
trunk/jcl/packages/xml/JclDeveloperTools-R.xml
trunk/jcl/packages/xml/JclVcl-R.xml
trunk/jcl/source/vcl/JclFont.pas
trunk/jcl/source/vcl/JclGraphUtils.pas
trunk/jcl/source/vcl/JclGraphics.pas
trunk/jcl/source/vcl/JclVersionControl.pas
trunk/jcl/source/windows/JclMsBuild.pas
Added Paths:
-----------
trunk/jcl/packages/cs1/JclVcl.bdsproj
trunk/jcl/packages/cs1/JclVcl.dpk
trunk/jcl/packages/cs1/JclVcl.rc
trunk/jcl/packages/cs1/JclVcl.res
trunk/jcl/packages/d8/JclVcl.bdsproj
trunk/jcl/packages/d8/JclVcl.dpk
trunk/jcl/packages/d8/JclVcl.rc
trunk/jcl/packages/d8/JclVcl.res
trunk/jcl/packages/fpc/JclVcl.lpk
trunk/jcl/packages/fpc/JclVcl.pas
Modified: trunk/jcl/packages/cs1/JclDeveloperTools.dpk
===================================================================
--- trunk/jcl/packages/cs1/JclDeveloperTools.dpk 2012-03-04 18:46:03 UTC (rev 3760)
+++ trunk/jcl/packages/cs1/JclDeveloperTools.dpk 2012-03-04 21:21:40 UTC (rev 3761)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (JclDeveloperTools-R.xml)
- Last generated: 23-02-2012 21:07:35 UTC
+ Last generated: 04-03-2012 21:02:28 UTC
-----------------------------------------------------------------------------
}
@@ -49,29 +49,6 @@
JclCompilerUtils in '..\..\source\common\JclCompilerUtils.pas' ,
JclDevToolsResources in '..\..\source\common\JclDevToolsResources.pas' ,
JclIDEUtils in '..\..\source\common\JclIDEUtils.pas' ,
- JclPreProcessorAlgorithmsTemplates in '..\..\source\common\JclPreProcessorAlgorithmsTemplates.pas' ,
- JclPreProcessorArrayListsTemplates in '..\..\source\common\JclPreProcessorArrayListsTemplates.pas' ,
- JclPreProcessorArraySetsTemplates in '..\..\source\common\JclPreProcessorArraySetsTemplates.pas' ,
- JclPreProcessorBinaryTreesTemplates in '..\..\source\common\JclPreProcessorBinaryTreesTemplates.pas' ,
- JclPreProcessorContainer1DTemplates in '..\..\source\common\JclPreProcessorContainer1DTemplates.pas' ,
- JclPreProcessorContainer2DTemplates in '..\..\source\common\JclPreProcessorContainer2DTemplates.pas' ,
- JclPreProcessorContainerIntfTemplates in '..\..\source\common\JclPreProcessorContainerIntfTemplates.pas' ,
- JclPreProcessorContainerKnownMaps in '..\..\source\common\JclPreProcessorContainerKnownMaps.pas' ,
- JclPreProcessorContainerKnownTypes in '..\..\source\common\JclPreProcessorContainerKnownTypes.pas' ,
- JclPreProcessorContainerTemplates in '..\..\source\common\JclPreProcessorContainerTemplates.pas' ,
- JclPreProcessorContainerTypes in '..\..\source\common\JclPreProcessorContainerTypes.pas' ,
- JclPreProcessorExcDlgTemplates in '..\..\source\common\JclPreProcessorExcDlgTemplates.pas' ,
- JclPreProcessorHashMapsTemplates in '..\..\source\common\JclPreProcessorHashMapsTemplates.pas' ,
- JclPreProcessorHashSetsTemplates in '..\..\source\common\JclPreProcessorHashSetsTemplates.pas' ,
- JclPreProcessorLexer in '..\..\source\common\JclPreProcessorLexer.pas' ,
- JclPreProcessorLinkedListsTemplates in '..\..\source\common\JclPreProcessorLinkedListsTemplates.pas' ,
- JclPreProcessorParser in '..\..\source\common\JclPreProcessorParser.pas' ,
- JclPreProcessorQueuesTemplates in '..\..\source\common\JclPreProcessorQueuesTemplates.pas' ,
- JclPreProcessorSortedMapsTemplates in '..\..\source\common\JclPreProcessorSortedMapsTemplates.pas' ,
- JclPreProcessorStacksTemplates in '..\..\source\common\JclPreProcessorStacksTemplates.pas' ,
- JclPreProcessorTemplates in '..\..\source\common\JclPreProcessorTemplates.pas' ,
- JclPreProcessorTreesTemplates in '..\..\source\common\JclPreProcessorTreesTemplates.pas' ,
- JclPreProcessorVectorsTemplates in '..\..\source\common\JclPreProcessorVectorsTemplates.pas' ,
JclUsesUtils in '..\..\source\common\JclUsesUtils.pas'
;
Added: trunk/jcl/packages/cs1/JclVcl.bdsproj
===================================================================
--- trunk/jcl/packages/cs1/JclVcl.bdsproj (rev 0)
+++ trunk/jcl/packages/cs1/JclVcl.bdsproj 2012-03-04 21:21:40 UTC (rev 3761)
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="utf-8"?>
+<BorlandProject>
+ <PersonalityInfo>
+ <Option>
+ <Option Name="Personality">Delphi.Personality</Option>
+ <Option Name="ProjectType"></Option>
+ <Option Name="Version">1.0</Option>
+ <Option Name="GUID">{EB88BAFD-FD11-4F14-A6F6-9036D67B1F8F}</Option>
+ </Option>
+ </PersonalityInfo>
+ <Delphi.Personality>
+ <Source>
+ <Source Name="MainSource">JclVcl.dpk</Source>
+ </Source>
+ <FileVersion>
+ <FileVersion Name="Version">7.0</FileVersion>
+ </FileVersion>
+ <Compiler>
+ <Compiler Name="A">8</Compiler>
+ <Compiler Name="B">0</Compiler>
+ <Compiler Name="C">0</Compiler>
+ <Compiler Name="D">0</Compiler>
+ <Compiler Name="E">0</Compiler>
+ <Compiler Name="F">0</Compiler>
+ <Compiler Name="G">1</Compiler>
+ <Compiler Name="H">1</Compiler>
+ <Compiler Name="I">1</Compiler>
+ <Compiler Name="J">1</Compiler>
+ <Compiler Name="K">0</Compiler>
+ <Compiler Name="L">0</Compiler>
+ <Compiler Name="M">0</Compiler>
+ <Compiler Name="N">1</Compiler>
+ <Compiler Name="O">1</Compiler>
+ <Compiler Name="P">1</Compiler>
+ <Compiler Name="Q">0</Compiler>
+ <Compiler Name="R">1</Compiler>
+ <Compiler Name="S">0</Compiler>
+ <Compiler Name="T">0</Compiler>
+ <Compiler Name="U">0</Compiler>
+ <Compiler Name="V">1</Compiler>
+ <Compiler Name="W">0</Compiler>
+ <Compiler Name="X">1</Compiler>
+ <Compiler Name="Y">0</Compiler>
+ <Compiler Name="Z">1</Compiler>
+ <Compiler Name="ShowHints">True</Compiler>
+ <Compiler Name="ShowWarnings">True</Compiler>
+ <Compiler Name="UnitAliases"></Compiler>
+ <Compiler Name="NamespacePrefix"></Compiler>
+ <Compiler Name="GenerateDocumentation">False</Compiler>
+ <Compiler Name="DefaultNamespace"></Compiler>
+ <Compiler Name="SymbolDeprecated">True</Compiler>
+ <Compiler Name="SymbolLibrary">True</Compiler>
+ <Compiler Name="SymbolPlatform">True</Compiler>
+ <Compiler Name="SymbolExperimental">True</Compiler>
+ <Compiler Name="UnitLibrary">True</Compiler>
+ <Compiler Name="UnitPlatform">True</Compiler>
+ <Compiler Name="UnitDeprecated">True</Compiler>
+ <Compiler Name="UnitExperimental">True</Compiler>
+ <Compiler Name="HResultCompat">True</Compiler>
+ <Compiler Name="HidingMember">True</Compiler>
+ <Compiler Name="HiddenVirtual">True</Compiler>
+ <Compiler Name="Garbage">True</Compiler>
+ <Compiler Name="BoundsError">True</Compiler>
+ <Compiler Name="ZeroNilCompat">True</Compiler>
+ <Compiler Name="StringConstTruncated">True</Compiler>
+ <Compiler Name="ForLoopVarVarPar">True</Compiler>
+ <Compiler Name="TypedConstVarPar">True</Compiler>
+ <Compiler Name="AsgToTypedConst">True</Compiler>
+ <Compiler Name="CaseLabelRange">True</Compiler>
+ <Compiler Name="ForVariable">True</Compiler>
+ <Compiler Name="ConstructingAbstract">True</Compiler>
+ <Compiler Name="ComparisonFalse">True</Compiler>
+ <Compiler Name="ComparisonTrue">True</Compiler>
+ <Compiler Name="ComparingSignedUnsigned">True</Compiler>
+ <Compiler Name="CombiningSignedUnsigned">True</Compiler>
+ <Compiler Name="UnsupportedConstruct">True</Compiler>
+ <Compiler Name="FileOpen">True</Compiler>
+ <Compiler Name="FileOpenUnitSrc">True</Compiler>
+ <Compiler Name="BadGlobalSymbol">True</Compiler>
+ <Compiler Name="DuplicateConstructorDestructor">True</Compiler>
+ <Compiler Name="InvalidDirective">True</Compiler>
+ <Compiler Name="PackageNoLink">True</Compiler>
+ <Compiler Name="PackageThreadVar">True</Compiler>
+ <Compiler Name="ImplicitImport">True</Compiler>
+ <Compiler Name="HPPEMITIgnored">True</Compiler>
+ <Compiler Name="NoRetVal">True</Compiler>
+ <Compiler Name="UseBeforeDef">True</Compiler>
+ <Compiler Name="ForLoopVarUndef">True</Compiler>
+ <Compiler Name="UnitNameMismatch">True</Compiler>
+ <Compiler Name="NoCFGFileFound">True</Compiler>
+ <Compiler Name="MessageDirective">True</Compiler>
+ <Compiler Name="ImplicitVariants">True</Compiler>
+ <Compiler Name="UnicodeToLocale">True</Compiler>
+ <Compiler Name="LocaleToUnicode">True</Compiler>
+ <Compiler Name="ImagebaseMultiple">True</Compiler>
+ <Compiler Name="SuspiciousTypecast">True</Compiler>
+ <Compiler Name="PrivatePropAccessor">True</Compiler>
+ <Compiler Name="UnsafeType">True</Compiler>
+ <Compiler Name="UnsafeCode">True</Compiler>
+ <Compiler Name="UnsafeCast">True</Compiler>
+ <Compiler Name="OptionTruncated">True</Compiler>
+ <Compiler Name="WideCharReduced">True</Compiler>
+ <Compiler Name="DuplicatesIgnored">True</Compiler>
+ <Compiler Name="UnitInitSeq">True</Compiler>
+ <Compiler Name="LocalPInvoke">True</Compiler>
+ </Compiler>
+ <Linker>
+ <Linker Name="MapFile">0</Linker>
+ <Linker Name="OutputObjs">0</Linker>
+ <Linker Name="ConsoleApp">1</Linker>
+ <Linker Name="DebugInfo">False</Linker>
+ <Linker Name="RemoteSymbols">False</Linker>
+ <Linker Name="GenerateDRC">False</Linker>
+ <Linker Name="MinStackSize">16384</Linker>
+ <Linker Name="MaxStackSize">1048576</Linker>
+ <Linker Name="ImageBase">$48480000</Linker>
+ <Linker Name="ExeDescription">JEDI Code Library VCL package</Linker>
+ </Linker>
+ <Directories>
+ <Directories Name="OutputDir"></Directories>
+ <Directories Name="UnitOutputDir">..\..\lib\cs1</Directories>
+ <Directories Name="PackageDLLOutputDir"></Directories>
+ <Directories Name="PackageDCPOutputDir">..\..\lib\cs1</Directories>
+ <Directories Name="SearchPath">..\..\lib\cs1;..\..\source\include</Directories>
+ <Directories Name="Packages">rtl;vcl;vcljpg;Jcl</Directories>
+ <Directories Name="Conditionals">WIN32;CONDITIONALEXPRESSIONS;RELEASE</Directories>
+ <Directories Name="DebugSourceDirs"></Directories>
+ <Directories Name="UsePackages">True</Directories>
+ </Directories>
+ <Parameters>
+ <Parameters Name="RunParams"></Parameters>
+ <Parameters Name="HostApplication"></Parameters>
+ <Parameters Name="Launcher"></Parameters>
+ <Parameters Name="UseLauncher">False</Parameters>
+ <Parameters Name="DebugCWD"></Parameters>
+ <Parameters Name="RemoteHost"></Parameters>
+ <Parameters Name="RemotePath"></Parameters>
+ <Parameters Name="RemoteLauncher"></Parameters>
+ <Parameters Name="RemoteCWD"></Parameters>
+ <Parameters Name="RemoteDebug">False</Parameters>
+ </Parameters>
+ <Language>
+ <Language Name="ActiveLang"></Language>
+ <Language Name="ProjectLang">$00000000</Language>
+ <Language Name="RootDir"></Language>
+ </Language>
+ <VersionInfo>
+ <VersionInfo Name="IncludeVerInfo">True</VersionInfo>
+ <VersionInfo Name="AutoIncBuild">False</VersionInfo>
+ <VersionInfo Name="MajorVer">2</VersionInfo>
+ <VersionInfo Name="MinorVer">4</VersionInfo>
+ <VersionInfo Name="Release">0</VersionInfo>
+ <VersionInfo Name="Build">4198</VersionInfo>
+ <VersionInfo Name="Debug">False</VersionInfo>
+ <VersionInfo Name="PreRelease">False</VersionInfo>
+ <VersionInfo Name="Special">False</VersionInfo>
+ <VersionInfo Name="Private">False</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
+ <VersionInfo Name="Locale">1053</VersionInfo>
+ <VersionInfo Name="CodePage">1252</VersionInfo>
+ </VersionInfo>
+ <VersionInfoKeys>
+ <VersionInfoKeys Name="CompanyName">Project JEDI</VersionInfoKeys>
+ <VersionInfoKeys Name="FileDescription">JEDI Code Library VCL package</VersionInfoKeys>
+ <VersionInfoKeys Name="FileVersion">2.4.0.4198</VersionInfoKeys>
+ <VersionInfoKeys Name="InternalName">JclVcl</VersionInfoKeys>
+ <VersionInfoKeys Name="LegalCopyright">Copyright (C) 1999, 2011 Project JEDI</VersionInfoKeys>
+ <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
+ <VersionInfoKeys Name="OriginalFilename">JclVcl71.bpl</VersionInfoKeys>
+ <VersionInfoKeys Name="ProductName">JEDI Code Library</VersionInfoKeys>
+ <VersionInfoKeys Name="ProductVersion">2.4 Build 4198</VersionInfoKeys>
+ </VersionInfoKeys>
+ </Delphi.Personality>
+</BorlandProject>
Property changes on: trunk/jcl/packages/cs1/JclVcl.bdsproj
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ native
Added: trunk/jcl/packages/cs1/JclVcl.dpk
===================================================================
--- trunk/jcl/packages/cs1/JclVcl.dpk (rev 0)
+++ trunk/jcl/packages/cs1/JclVcl.dpk 2012-03-04 21:21:40 UTC (rev 3761)
@@ -0,0 +1,60 @@
+package JclVcl;
+{
+-----------------------------------------------------------------------------
+ DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
+ ALWAYS EDIT THE RELATED XML FILE (JclVcl-R.xml)
+
+ Last generated: 04-03-2012 21:02:28 UTC
+-----------------------------------------------------------------------------
+}
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO OFF}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS OFF}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO OFF}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $48480000}
+{$DESCRIPTION 'JEDI Code Library VCL package'}
+{$LIBSUFFIX '71'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+{$DEFINE WIN32}
+{$DEFINE CONDITIONALEXPRESSIONS}
+{$DEFINE RELEASE}
+
+requires
+ rtl,
+ vcl,
+ vcljpg,
+ Jcl
+ ;
+
+contains
+ JclGraphUtils in '..\..\source\vcl\JclGraphUtils.pas' ,
+ JclGraphics in '..\..\source\vcl\JclGraphics.pas' ,
+ JclFont in '..\..\source\vcl\JclFont.pas' ,
+ JclVclResources in '..\..\source\vcl\JclVclResources.pas' ,
+ JclVersionControl in '..\..\source\vcl\JclVersionControl.pas' ,
+ JclVersionCtrlCVSImpl in '..\..\source\vcl\JclVersionCtrlCVSImpl.pas' ,
+ JclVersionCtrlGITImpl in '..\..\source\vcl\JclVersionCtrlGITImpl.pas' ,
+ JclVersionCtrlSVNImpl in '..\..\source\vcl\JclVersionCtrlSVNImpl.pas'
+ ;
+
+end.
Property changes on: trunk/jcl/packages/cs1/JclVcl.dpk
___________________________________________________________________
Added: svn:keywords
+ URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id
Added: svn:eol-style
+ native
Added: trunk/jcl/packages/cs1/JclVcl.rc
===================================================================
--- trunk/jcl/packages/cs1/JclVcl.rc (rev 0)
+++ trunk/jcl/packages/cs1/JclVcl.rc 2012-03-04 21:21:40 UTC (rev 3761)
@@ -0,0 +1,32 @@
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION 2,4,0,4198
+PRODUCTVERSION 2,4,0,4198
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "Project JEDI\0"
+ VALUE "FileDescription", "JEDI Code Library VCL package\0"
+ VALUE "FileVersion", "2.4.0.4198\0"
+ VALUE "InternalName", "JclVcl\0"
+ VALUE "LegalCopyright", "Copyright (C) 1999, 2011 Project JEDI\0"
+ VALUE "OriginalFilename", "JclVcl71.bpl\0"
+ VALUE "ProductName", "JEDI Code Library\0"
+ VALUE "ProductVersion", "2.4 Build 4198\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 1252
+ END
+END
Property changes on: trunk/jcl/packages/cs1/JclVcl.rc
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/jcl/packages/cs1/JclVcl.res
===================================================================
(Binary files differ)
Property changes on: trunk/jcl/packages/cs1/JclVcl.res
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/jcl/packages/d8/JclDeveloperTools.dpk
===================================================================
--- trunk/jcl/packages/d8/JclDeveloperTools.dpk 2012-03-04 18:46:03 UTC (rev 3760)
+++ trunk/jcl/packages/d8/JclDeveloperTools.dpk 2012-03-04 21:21:40 UTC (rev 3761)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (JclDeveloperTools-R.xml)
- Last generated: 23-02-2012 21:07:35 UTC
+ Last generated: 04-03-2012 21:02:27 UTC
-----------------------------------------------------------------------------
}
@@ -49,29 +49,6 @@
JclCompilerUtils in '..\..\source\common\JclCompilerUtils.pas' ,
JclDevToolsResources in '..\..\source\common\JclDevToolsResources.pas' ,
JclIDEUtils in '..\..\source\common\JclIDEUtils.pas' ,
- JclPreProcessorAlgorithmsTemplates in '..\..\source\common\JclPreProcessorAlgorithmsTemplates.pas' ,
- JclPreProcessorArrayListsTemplates in '..\..\source\common\JclPreProcessorArrayListsTemplates.pas' ,
- JclPreProcessorArraySetsTemplates in '..\..\source\common\JclPreProcessorArraySetsTemplates.pas' ,
- JclPreProcessorBinaryTreesTemplates in '..\..\source\common\JclPreProcessorBinaryTreesTemplates.pas' ,
- JclPreProcessorContainer1DTemplates in '..\..\source\common\JclPreProcessorContainer1DTemplates.pas' ,
- JclPreProcessorContainer2DTemplates in '..\..\source\common\JclPreProcessorContainer2DTemplates.pas' ,
- JclPreProcessorContainerIntfTemplates in '..\..\source\common\JclPreProcessorContainerIntfTemplates.pas' ,
- JclPreProcessorContainerKnownMaps in '..\..\source\common\JclPreProcessorContainerKnownMaps.pas' ,
- JclPreProcessorContainerKnownTypes in '..\..\source\common\JclPreProcessorContainerKnownTypes.pas' ,
- JclPreProcessorContainerTemplates in '..\..\source\common\JclPreProcessorContainerTemplates.pas' ,
- JclPreProcessorContainerTypes in '..\..\source\common\JclPreProcessorContainerTypes.pas' ,
- JclPreProcessorExcDlgTemplates in '..\..\source\common\JclPreProcessorExcDlgTemplates.pas' ,
- JclPreProcessorHashMapsTemplates in '..\..\source\common\JclPreProcessorHashMapsTemplates.pas' ,
- JclPreProcessorHashSetsTemplates in '..\..\source\common\JclPreProcessorHashSetsTemplates.pas' ,
- JclPreProcessorLexer in '..\..\source\common\JclPreProcessorLexer.pas' ,
- JclPreProcessorLinkedListsTemplates in '..\..\source\common\JclPreProcessorLinkedListsTemplates.pas' ,
- JclPreProcessorParser in '..\..\source\common\JclPreProcessorParser.pas' ,
- JclPreProcessorQueuesTemplates in '..\..\source\common\JclPreProcessorQueuesTemplates.pas' ,
- JclPreProcessorSortedMapsTemplates in '..\..\source\common\JclPreProcessorSortedMapsTemplates.pas' ,
- JclPreProcessorStacksTemplates in '..\..\source\common\JclPreProcessorStacksTemplates.pas' ,
- JclPreProcessorTemplates in '..\..\source\common\JclPreProcessorTemplates.pas' ,
- JclPreProcessorTreesTemplates in '..\..\source\common\JclPreProcessorTreesTemplates.pas' ,
- JclPreProcessorVectorsTemplates in '..\..\source\common\JclPreProcessorVectorsTemplates.pas' ,
JclUsesUtils in '..\..\source\common\JclUsesUtils.pas'
;
Added: trunk/jcl/packages/d8/JclVcl.bdsproj
===================================================================
--- trunk/jcl/packages/d8/JclVcl.bdsproj (rev 0)
+++ trunk/jcl/packages/d8/JclVcl.bdsproj 2012-03-04 21:21:40 UTC (rev 3761)
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="utf-8"?>
+<BorlandProject>
+ <PersonalityInfo>
+ <Option>
+ <Option Name="Personality">Delphi.Personality</Option>
+ <Option Name="ProjectType"></Option>
+ <Option Name="Version">1.0</Option>
+ <Option Name="GUID">{EB88BAFD-FD11-4F14-A6F6-9036D67B1F8F}</Option>
+ </Option>
+ </PersonalityInfo>
+ <Delphi.Personality>
+ <Source>
+ <Source Name="MainSource">JclVcl.dpk</Source>
+ </Source>
+ <FileVersion>
+ <FileVersion Name="Version">7.0</FileVersion>
+ </FileVersion>
+ <Compiler>
+ <Compiler Name="A">8</Compiler>
+ <Compiler Name="B">0</Compiler>
+ <Compiler Name="C">0</Compiler>
+ <Compiler Name="D">0</Compiler>
+ <Compiler Name="E">0</Compiler>
+ <Compiler Name="F">0</Compiler>
+ <Compiler Name="G">1</Compiler>
+ <Compiler Name="H">1</Compiler>
+ <Compiler Name="I">1</Compiler>
+ <Compiler Name="J">1</Compiler>
+ <Compiler Name="K">0</Compiler>
+ <Compiler Name="L">0</Compiler>
+ <Compiler Name="M">0</Compiler>
+ <Compiler Name="N">1</Compiler>
+ <Compiler Name="O">1</Compiler>
+ <Compiler Name="P">1</Compiler>
+ <Compiler Name="Q">0</Compiler>
+ <Compiler Name="R">1</Compiler>
+ <Compiler Name="S">0</Compiler>
+ <Compiler Name="T">0</Compiler>
+ <Compiler Name="U">0</Compiler>
+ <Compiler Name="V">1</Compiler>
+ <Compiler Name="W">0</Compiler>
+ <Compiler Name="X">1</Compiler>
+ <Compiler Name="Y">0</Compiler>
+ <Compiler Name="Z">1</Compiler>
+ <Compiler Name="ShowHints">True</Compiler>
+ <Compiler Name="ShowWarnings">True</Compiler>
+ <Compiler Name="UnitAliases"></Compiler>
+ <Compiler Name="NamespacePrefix"></Compiler>
+ <Compiler Name="GenerateDocumentation">False</Compiler>
+ <Compiler Name="DefaultNamespace"></Compiler>
+ <Compiler Name="SymbolDeprecated">True</Compiler>
+ <Compiler Name="SymbolLibrary">True</Compiler>
+ <Compiler Name="SymbolPlatform">True</Compiler>
+ <Compiler Name="SymbolExperimental">True</Compiler>
+ <Compiler Name="UnitLibrary">True</Compiler>
+ <Compiler Name="UnitPlatform">True</Compiler>
+ <Compiler Name="UnitDeprecated">True</Compiler>
+ <Compiler Name="UnitExperimental">True</Compiler>
+ <Compiler Name="HResultCompat">True</Compiler>
+ <Compiler Name="HidingMember">True</Compiler>
+ <Compiler Name="HiddenVirtual">True</Compiler>
+ <Compiler Name="Garbage">True</Compiler>
+ <Compiler Name="BoundsError">True</Compiler>
+ <Compiler Name="ZeroNilCompat">True</Compiler>
+ <Compiler Name="StringConstTruncated">True</Compiler>
+ <Compiler Name="ForLoopVarVarPar">True</Compiler>
+ <Compiler Name="TypedConstVarPar">True</Compiler>
+ <Compiler Name="AsgToTypedConst">True</Compiler>
+ <Compiler Name="CaseLabelRange">True</Compiler>
+ <Compiler Name="ForVariable">True</Compiler>
+ <Compiler Name="ConstructingAbstract">True</Compiler>
+ <Compiler Name="ComparisonFalse">True</Compiler>
+ <Compiler Name="ComparisonTrue">True</Compiler>
+ <Compiler Name="ComparingSignedUnsigned">True</Compiler>
+ <Compiler Name="CombiningSignedUnsigned">True</Compiler>
+ <Compiler Name="UnsupportedConstruct">True</Compiler>
+ <Compiler Name="FileOpen">True</Compiler>
+ <Compiler Name="FileOpenUnitSrc">True</Compiler>
+ <Compiler Name="BadGlobalSymbol">True</Compiler>
+ <Compiler Name="DuplicateConstructorDestructor">True</Compiler>
+ <Compiler Name="InvalidDirective">True</Compiler>
+ <Compiler Name="PackageNoLink">True</Compiler>
+ <Compiler Name="PackageThreadVar">True</Compiler>
+ <Compiler Name="ImplicitImport">True</Compiler>
+ <Compiler Name="HPPEMITIgnored">True</Compiler>
+ <Compiler Name="NoRetVal">True</Compiler>
+ <Compiler Name="UseBeforeDef">True</Compiler>
+ <Compiler Name="ForLoopVarUndef">True</Compiler>
+ <Compiler Name="UnitNameMismatch">True</Compiler>
+ <Compiler Name="NoCFGFileFound">True</Compiler>
+ <Compiler Name="MessageDirective">True</Compiler>
+ <Compiler Name="ImplicitVariants">True</Compiler>
+ <Compiler Name="UnicodeToLocale">True</Compiler>
+ <Compiler Name="LocaleToUnicode">True</Compiler>
+ <Compiler Name="ImagebaseMultiple">True</Compiler>
+ <Compiler Name="SuspiciousTypecast">True</Compiler>
+ <Compiler Name="PrivatePropAccessor">True</Compiler>
+ <Compiler Name="UnsafeType">True</Compiler>
+ <Compiler Name="UnsafeCode">True</Compiler>
+ <Compiler Name="UnsafeCast">True</Compiler>
+ <Compiler Name="OptionTruncated">True</Compiler>
+ <Compiler Name="WideCharReduced">True</Compiler>
+ <Compiler Name="DuplicatesIgnored">True</Compiler>
+ <Compiler Name="UnitInitSeq">True</Compiler>
+ <Compiler Name="LocalPInvoke">True</Compiler>
+ </Compiler>
+ <Linker>
+ <Linker Name="MapFile">0</Linker>
+ <Linker Name="OutputObjs">0</Linker>
+ <Linker Name="ConsoleApp">1</Linker>
+ <Linker Name="DebugInfo">False</Linker>
+ <Linker Name="RemoteSymbols">False</Linker>
+ <Linker Name="GenerateDRC">False</Linker>
+ <Linker Name="MinStackSize">16384</Linker>
+ <Linker Name="MaxStackSize">1048576</Linker>
+ <Linker Name="ImageBase">48480000</Linker>
+ <Linker Name="ExeDescription">JEDI Code Library VCL package</Linker>
+ </Linker>
+ <Directories>
+ <Directories Name="OutputDir"></Directories>
+ <Directories Name="UnitOutputDir">..\..\lib\d8</Directories>
+ <Directories Name="PackageDLLOutputDir"></Directories>
+ <Directories Name="PackageDCPOutputDir">..\..\lib\d8</Directories>
+ <Directories Name="SearchPath">..\..\lib\d8;..\..\source\include</Directories>
+ <Directories Name="Packages">rtl;vcl;vcljpg;Jcl</Directories>
+ <Directories Name="Conditionals">WIN32;CONDITIONALEXPRESSIONS;RELEASE</Directories>
+ <Directories Name="DebugSourceDirs"></Directories>
+ <Directories Name="UsePackages">True</Directories>
+ </Directories>
+ <Parameters>
+ <Parameters Name="RunParams"></Parameters>
+ <Parameters Name="HostApplication"></Parameters>
+ <Parameters Name="Launcher"></Parameters>
+ <Parameters Name="UseLauncher">False</Parameters>
+ <Parameters Name="DebugCWD"></Parameters>
+ <Parameters Name="RemoteHost"></Parameters>
+ <Parameters Name="RemotePath"></Parameters>
+ <Parameters Name="RemoteLauncher"></Parameters>
+ <Parameters Name="RemoteCWD"></Parameters>
+ <Parameters Name="RemoteDebug">False</Parameters>
+ </Parameters>
+ <Language>
+ <Language Name="ActiveLang"></Language>
+ <Language Name="ProjectLang">$00000000</Language>
+ <Language Name="RootDir"></Language>
+ </Language>
+ <VersionInfo>
+ <VersionInfo Name="IncludeVerInfo">True</VersionInfo>
+ <VersionInfo Name="AutoIncBuild">False</VersionInfo>
+ <VersionInfo Name="MajorVer">2</VersionInfo>
+ <VersionInfo Name="MinorVer">4</VersionInfo>
+ <VersionInfo Name="Release">0</VersionInfo>
+ <VersionInfo Name="Build">4198</VersionInfo>
+ <VersionInfo Name="Debug">False</VersionInfo>
+ <VersionInfo Name="PreRelease">False</VersionInfo>
+ <VersionInfo Name="Special">False</VersionInfo>
+ <VersionInfo Name="Private">False</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
+ <VersionInfo Name="Locale">1053</VersionInfo>
+ <VersionInfo Name="CodePage">1252</VersionInfo>
+ </VersionInfo>
+ <VersionInfoKeys>
+ <VersionInfoKeys Name="CompanyName">Project JEDI</VersionInfoKeys>
+ <VersionInfoKeys Name="FileDescription">JEDI Code Library VCL package</VersionInfoKeys>
+ <VersionInfoKeys Name="FileVersion">2.4.0.4198</VersionInfoKeys>
+ <VersionInfoKeys Name="InternalName">JclVcl</VersionInfoKeys>
+ <VersionInfoKeys Name="LegalCopyright">Copyright (C) 1999, 2011 Project JEDI</VersionInfoKeys>
+ <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
+ <VersionInfoKeys Name="OriginalFilename">JclVcl80.bpl</VersionInfoKeys>
+ <VersionInfoKeys Name="ProductName">JEDI Code Library</VersionInfoKeys>
+ <VersionInfoKeys Name="ProductVersion">2.4 Build 4198</VersionInfoKeys>
+ </VersionInfoKeys>
+ </Delphi.Personality>
+</BorlandProject>
Property changes on: trunk/jcl/packages/d8/JclVcl.bdsproj
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ native
Added: trunk/jcl/packages/d8/JclVcl.dpk
===================================================================
--- trunk/jcl/packages/d8/JclVcl.dpk (rev 0)
+++ trunk/jcl/packages/d8/JclVcl.dpk 2012-03-04 21:21:40 UTC (rev 3761)
@@ -0,0 +1,60 @@
+package JclVcl;
+{
+-----------------------------------------------------------------------------
+ DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
+ ALWAYS EDIT THE RELATED XML FILE (JclVcl-R.xml)
+
+ Last generated: 04-03-2012 21:02:28 UTC
+-----------------------------------------------------------------------------
+}
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO OFF}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS OFF}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO OFF}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $48480000}
+{$DESCRIPTION 'JEDI Code Library VCL package'}
+{$LIBSUFFIX '80'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+{$DEFINE WIN32}
+{$DEFINE CONDITIONALEXPRESSIONS}
+{$DEFINE RELEASE}
+
+requires
+ rtl,
+ vcl,
+ vcljpg,
+ Jcl
+ ;
+
+contains
+ JclGraphUtils in '..\..\source\vcl\JclGraphUtils.pas' ,
+ JclGraphics in '..\..\source\vcl\JclGraphics.pas' ,
+ JclFont in '..\..\source\vcl\JclFont.pas' ,
+ JclVclResources in '..\..\source\vcl\JclVclResources.pas' ,
+ JclVersionControl in '..\..\source\vcl\JclVersionControl.pas' ,
+ JclVersionCtrlCVSImpl in '..\..\source\vcl\JclVersionCtrlCVSImpl.pas' ,
+ JclVersionCtrlGITImpl in '..\..\source\vcl\JclVersionCtrlGITImpl.pas' ,
+ JclVersionCtrlSVNImpl in '..\..\source\vcl\JclVersionCtrlSVNImpl.pas'
+ ;
+
+end.
Property changes on: trunk/jcl/packages/d8/JclVcl.dpk
___________________________________________________________________
Added: svn:keywords
+ URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id
Added: svn:eol-style
+ native
Added: trunk/jcl/packages/d8/JclVcl.rc
===================================================================
--- trunk/jcl/packages/d8/JclVcl.rc (rev 0)
+++ trunk/jcl/packages/d8/JclVcl.rc 2012-03-04 21:21:40 UTC (rev 3761)
@@ -0,0 +1,32 @@
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION 2,4,0,4198
+PRODUCTVERSION 2,4,0,4198
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "Project JEDI\0"
+ VALUE "FileDescription", "JEDI Code Library VCL package\0"
+ VALUE "FileVersion", "2.4.0.4198\0"
+ VALUE "InternalName", "JclVcl\0"
+ VALUE "LegalCopyright", "Copyright (C) 1999, 2011 Project JEDI\0"
+ VALUE "OriginalFilename", "JclVcl80.bpl\0"
+ VALUE "ProductName", "JEDI Code Library\0"
+ VALUE "ProductVersion", "2.4 Build 4198\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 1252
+ END
+END
Property changes on: trunk/jcl/packages/d8/JclVcl.rc
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/jcl/packages/d8/JclVcl.res
===================================================================
(Binary files differ)
Property changes on: trunk/jcl/packages/d8/JclVcl.res
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/jcl/packages/fpc/JclDeveloperTools.lpk
===================================================================
--- trunk/jcl/packages/fpc/JclDeveloperTools.lpk 2012-03-04 18:46:03 UTC (rev 3760)
+++ trunk/jcl/packages/fpc/JclDeveloperTools.lpk 2012-03-04 21:21:40 UTC (rev 3761)
@@ -40,7 +40,7 @@
<Description Value="JEDI Code Library Developer Tools package"/>
<License Value="Copyright (C) 1999, 2011 Project JEDI"/>
<Version Major="2" Minor="4" Release="0" Build="4198"/>
- <Files Count="30">
+ <Files Count="7">
<Item1>
<Filename Value="..\..\source\common\JclCompilerUtils.pas"/>
<UnitName Value="JclCompilerUtils"/>
@@ -54,113 +54,21 @@
<UnitName Value="JclIDEUtils"/>
</Item3>
<Item4>
- <Filename Value="..\..\source\common\JclPreProcessorAlgorithmsTemplates.pas"/>
- <UnitName Value="JclPreProcessorAlgorithmsTemplates"/>
- </Item4>
- <Item5>
- <Filename Value="..\..\source\common\JclPreProcessorArrayListsTemplates.pas"/>
- <UnitName Value="JclPreProcessorArrayListsTemplates"/>
- </Item5>
- <Item6>
- <Filename Value="..\..\source\common\JclPreProcessorArraySetsTemplates.pas"/>
- <UnitName Value="JclPreProcessorArraySetsTemplates"/>
- </Item6>
- <Item7>
- <Filename Value="..\..\source\common\JclPreProcessorBinaryTreesTemplates.pas"/>
- <UnitName Value="JclPreProcessorBinaryTreesTemplates"/>
- </Item7>
- <Item8>
- <Filename Value="..\..\source\common\JclPreProcessorContainer1DTemplates.pas"/>
- <UnitName Value="JclPreProcessorContainer1DTemplates"/>
- </Item8>
- <Item9>
- <Filename Value="..\..\source\common\JclPreProcessorContainer2DTemplates.pas"/>
- <UnitName Value="JclPreProcessorContainer2DTemplates"/>
- </Item9>
- <Item10>
- <Filename Value="..\..\source\common\JclPreProcessorContainerIntfTemplates.pas"/>
- <UnitName Value="JclPreProcessorContainerIntfTemplates"/>
- </Item10>
- <Item11>
- <Filename Value="..\..\source\common\JclPreProcessorContainerKnownMaps.pas"/>
- <UnitName Value="JclPreProcessorContainerKnownMaps"/>
- </Item11>
- <Item12>
- <Filename Value="..\..\source\common\JclPreProcessorContainerKnownTypes.pas"/>
- <UnitName Value="JclPreProcessorContainerKnownTypes"/>
- </Item12>
- <Item13>
- <Filename Value="..\..\source\common\JclPreProcessorContainerTemplates.pas"/>
- <UnitName Value="JclPreProcessorContainerTemplates"/>
- </Item13>
- <Item14>
- <Filename Value="..\..\source\common\JclPreProcessorContainerTypes.pas"/>
- <UnitName Value="JclPreProcessorContainerTypes"/>
- </Item14>
- <Item15>
- <Filename Value="..\..\source\common\JclPreProcessorExcDlgTemplates.pas"/>
- <UnitName Value="JclPreProcessorExcDlgTemplates"/>
- </Item15>
- <Item16>
- <Filename Value="..\..\source\common\JclPreProcessorHashMapsTemplates.pas"/>
- <UnitName Value="JclPreProcessorHashMapsTemplates"/>
- </Item16>
- <Item17>
- <Filename Value="..\..\source\common\JclPreProcessorHashSetsTemplates.pas"/>
- <UnitName Value="JclPreProcessorHashSetsTemplates"/>
- </Item17>
- <Item18>
- <Filename Value="..\..\source\common\JclPreProcessorLexer.pas"/>
- <UnitName Value="JclPreProcessorLexer"/>
- </Item18>
- <Item19>
- <Filename Value="..\..\source\common\JclPreProcessorLinkedListsTemplates.pas"/>
- <UnitName Value="JclPreProcessorLinkedListsTemplates"/>
- </Item19>
- <Item20>
- <Filename Value="..\..\source\common\JclPreProcessorParser.pas"/>
- <UnitName Value="JclPreProcessorParser"/>
- </Item20>
- <Item21>
- <Filename Value="..\..\source\common\JclPreProcessorQueuesTemplates.pas"/>
- <UnitName Value="JclPreProcessorQueuesTemplates"/>
- </Item21>
- <Item22>
- <Filename Value="..\..\source\common\JclPreProcessorSortedMapsTemplates.pas"/>
- <UnitName Value="JclPreProcessorSortedMapsTemplates"/>
- </Item22>
- <Item23>
- <Filename Value="..\..\source\common\JclPreProcessorStacksTemplates.pas"/>
- <UnitName Value="JclPreProcessorStacksTemplates"/>
- </Item23>
- <Item24>
- <Filename Value="..\..\source\common\JclPreProcessorTemplates.pas"/>
- <UnitName Value="JclPreProcessorTemplates"/>
- </Item24>
- <Item25>
- <Filename Value="..\..\source\common\JclPreProcessorTreesTemplates.pas"/>
- <UnitName Value="JclPreProcessorTreesTemplates"/>
- </Item25>
- <Item26>
- <Filename Value="..\..\source\common\JclPreProcessorVectorsTemplates.pas"/>
- <UnitName Value="JclPreProcessorVectorsTemplates"/>
- </Item26>
- <Item27>
<Filename Value="..\..\source\common\JclUsesUtils.pas"/>
<UnitName Value="JclUsesUtils"/>
- </Item27>
- <Item28>
+ </Item4>
+ <Item5>
<Filename Value="..\..\source\windows\JclHelpUtils.pas"/>
<UnitName Value="JclHelpUtils"/>
- </Item28>
- <Item29>
+ </Item5>
+ <Item6>
<Filename Value="..\..\source\windows\JclMsBuild.pas"/>
<UnitName Value="JclMsBuild"/>
- </Item29>
- <Item30>
+ </Item6>
+ <Item7>
<Filename Value="..\..\source\windows\MSHelpServices_TLB.pas"/>
<UnitName Value="MSHelpServices_TLB"/>
- </Item30>
+ </Item7>
</Files>
<RequiredPkgs Count="3">
<Item1>
Modified: trunk/jcl/packages/fpc/JclDeveloperTools.pas
===================================================================
--- trunk/jcl/packages/fpc/JclDeveloperTools.pas 2012-03-04 18:46:03 UTC (rev 3760)
+++ trunk/jcl/packages/fpc/JclDeveloperTools.pas 2012-03-04 21:21:40 UTC (rev 3761)
@@ -3,7 +3,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (JclDeveloperTools-R.xml)
- Last generated: 12-02-2012 19:42:40 UTC
+ Last generated: 04-03-2012 21:02:27 UTC
-----------------------------------------------------------------------------
}
@@ -15,29 +15,6 @@
JclCompilerUtils,
JclDevToolsResources,
JclIDEUtils,
- JclPreProcessorAlgorithmsTemplates,
- JclPreProcessorArrayListsTemplates,
- JclPreProcessorArraySetsTemplates,
- JclPreProcessorBinaryTreesTemplates,
- JclPreProcessorContainer1DTemplates,
- JclPreProcessorContainer2DTemplates,
- JclPreProcessorContainerIntfTemplates,
- JclPreProcessorContainerKnownMaps,
- JclPreProcessorContainerKnownTypes,
- JclPreProcessorContainerTemplates,
- JclPreProcessorContainerTypes,
- JclPreProcessorExcDlgTemplates,
- JclPreProcessorHashMapsTemplates,
- JclPreProcessorHashSetsTemplates,
- JclPreProcessorLexer,
- JclPreProcessorLinkedListsTemplates,
- JclPreProcessorParser,
- JclPreProcessorQueuesTemplates,
- JclPreProcessorSortedMapsTemplates,
- JclPreProcessorStacksTemplates,
- JclPreProcessorTemplates,
- JclPreProcessorTreesTemplates,
- JclPreProcessorVectorsTemplates,
JclUsesUtils,
JclHelpUtils,
JclMsBuild,
Added: trunk/jcl/packages/fpc/JclVcl.lpk
===================================================================
--- trunk/jcl/packages/fpc/JclVcl.lpk (rev 0)
+++ trunk/jcl/packages/fpc/JclVcl.lpk 2012-03-04 21:21:40 UTC (rev 3761)
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<CONFIG>
+ <Package Version="3">
+ <PathDelim Value="\"/>
+ <Name Value="JclVcl"/>
+ <AddToProjectUsesSection Value="False"/>
+ <Author Value="Project JEDI"/>
+ <AutoUpdate Value="OnRebuildingAll"/>
+ <CompilerOptions>
+ <Version Value="9"/>
+ <PathDelim Value="\"/>
+ <SearchPaths>
+ <IncludeFiles Value="..\..\source\include\"/>
+ <OtherUnitFiles Value=".;..\..\source\vcl;;..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
+ <UnitOutputDirectory Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <Parsing>
+ <Style Value="1"/>
+ <SyntaxOptions>
+ <SyntaxMode Value="Delphi"/>
+ <CStyleOperator Value="False"/>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
+ <CodeGeneration>
+ <Optimizations>
+ <VariablesInRegisters Value="True"/>
+ <OptimizationLevel Value="3"/>
+ </Optimizations>
+ </CodeGeneration>
+ <Linking>
+ <Debugging>
+ <UseLineInfoUnit Value="False"/>
+ </Debugging>
+ </Linking>
+ <Other>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Description Value="JEDI Code Library VCL package"/>
+ <License Value="Copyright (C) 1999, 2011 Project JEDI"/>
+ <Version Major="2" Minor="4" Release="0" Build="4198"/>
+ <Files Count="8">
+ <Item1>
+ <Filename Value="..\..\source\vcl\JclGraphUtils.pas"/>
+ <UnitName Value="JclGraphUtils"/>
+ </Item1>
+ <Item2>
+ <Filename Value="..\..\source\vcl\JclGraphics.pas"/>
+ <UnitName Value="JclGraphics"/>
+ </Item2>
+ <Item3>
+ <Filename Value="..\..\source\vcl\JclFont.pas"/>
+ <UnitName Value="JclFont"/>
+ </Item3>
+ <Item4>
+ <Filename Value="..\..\source\vcl\JclVclResources.pas"/>
+ <UnitName Value="JclVclResources"/>
+ </Item4>
+ <Item5>
+ <Filename Value="..\..\source\vcl\JclVersionControl.pas"/>
+ <UnitName Value="JclVersionControl"/>
+ </Item5>
+ <Item6>
+ <Filename Value="..\..\source\vcl\JclVersionCtrlCVSImpl.pas"/>
+ <UnitName Value="JclVersionCtrlCVSImpl"/>
+ </Item6>
+ <Item7>
+ <Filename Value="..\..\source\vcl\JclVersionCtrlGITImpl.pas"/>
+ <UnitName Value="JclVersionCtrlGITImpl"/>
+ </Item7>
+ <Item8>
+ <Filename Value="..\..\source\vcl\JclVersionCtrlSVNImpl.pas"/>
+ <UnitName Value="JclVersionCtrlSVNImpl"/>
+ </Item8>
+ </Files>
+ <RequiredPkgs Count="3">
+ <Item1>
+ <PackageName Value="FCL"/>
+ </Item1>
+ <Item2>
+ <PackageName Value="LCL"/>
+ </Item2>
+ <Item3>
+ <PackageName Value="Jcl"/>
+ </Item3>
+ </RequiredPkgs>
+ <UsageOptions>
+ <IncludePath Value="..\..\source\include\"/>
+ <LibraryPath Value="$(PkgOutDir)\"/>
+ <ObjectPath Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)\"/>
+ <UnitPath Value="$(PkgOutDir)\"/>
+ </UsageOptions>
+ <PublishOptions>
+ <Version Value="2"/>
+ <IgnoreBinaries Value="False"/>
+ </PublishOptions>
+ </Package>
+</CONFIG>
Added: trunk/jcl/packages/fpc/JclVcl.pas
===================================================================
--- trunk/jcl/packages/fpc/JclVcl.pas (rev 0)
+++ trunk/jcl/packages/fpc/JclVcl.pas 2012-03-04 21:21:40 UTC (rev 3761)
@@ -0,0 +1,27 @@
+{
+-----------------------------------------------------------------------------
+ DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
+ ALWAYS EDIT THE RELATED XML FILE (JclVcl-R.xml)
+
+ Last generated: 04-03-2012 21:02:27 UTC
+-----------------------------------------------------------------------------
+}
+
+unit JclVcl;
+
+interface
+
+uses
+ JclGraphUtils,
+ JclGraphics,
+ JclFont,
+ JclVclResources,
+ JclVersionControl,
+ JclVersionCtrlCVSImpl,
+ JclVersionCtrlGITImpl,
+ JclVersionCtrlSVNImpl
+ ;
+
+implementation
+
+end.
Modified: trunk/jcl/packages/resources.mak
===================================================================
--- trunk/jcl/packages/resources.mak 2012-03-04 18:46:03 UTC (rev 3760)
+++ trunk/jcl/packages/resources.mak 2012-03-04 21:21:40 UTC (rev 3761)
@@ -14,7 +14,7 @@
c6\JclRepositoryExpertDLL.res \
c6\JclSIMDViewExpert.res \
c6\JclSIMDViewExpertDLL.res \
- c6\JclDeveloperTools.res \
+ c6\JclDeveloperTools.res \
c6\JclStackTraceViewerExpert.res \
c6\JclStackTraceViewerExpertDLL.res \
c6\JclThreadNameExpert.res \
@@ -28,8 +28,9 @@
cs1\JclBaseExpert.res \
cs1\JclContainers.res \
cs1\JclFavoriteFoldersExpertDLL.res \
- cs1\JclDeveloperTools.res \
+ cs1\JclDeveloperTools.res \
cs1\JclVersionControlExpertDLL.res \
+ cs1\JclVcl.res \
d10\Jcl.res \
d10\JclBaseExpert.res \
d10\JclContainers.res \
@@ -43,7 +44,7 @@
d10\JclRepositoryExpertDLL.res \
d10\JclSIMDViewExpert.res \
d10\JclSIMDViewExpertDLL.res \
- d10\JclDeveloperTools.res \
+ d10\JclDeveloperTools.res \
d10\JclStackTraceViewerExpert.res \
d10\JclStackTraceViewerExpertDLL.res \
d10\JclVcl.res \
@@ -62,7 +63,7 @@
d11\JclRepositoryExpertDLL.res \
d11\JclSIMDViewExpert.res \
d11\JclSIMDViewExpertDLL.res \
- d11\JclDeveloperTools.res \
+ d11\JclDeveloperTools.res \
d11\JclStackTraceViewerExpert.res \
d11\JclStackTraceViewerExpertDLL.res \
d11\JclVcl.res \
@@ -81,7 +82,7 @@
d12\JclRepositoryExpertDLL.res \
d12\JclSIMDViewExpert.res \
d12\JclSIMDViewExpertDLL.res \
- d12\JclDeveloperTools.res \
+ d12\JclDeveloperTools.res \
d12\JclStackTraceViewerExpert.res \
d12\JclStackTraceViewerExpertDLL.res \
d12\JclVcl.res \
@@ -100,7 +101,7 @@
d14\JclRepositoryExpertDLL.res \
d14\JclSIMDViewExpert.res \
d14\JclSIMDViewExpertDLL.res \
- d14\JclDeveloperTools.res \
+ d14\JclDeveloperTools.res \
d14\JclStackTraceViewerExpert.res \
d14\JclStackTraceViewerExpertDLL.res \
d14\JclVcl.res \
@@ -119,7 +120,7 @@
d15\JclRepositoryExpertDLL.res \
d15\JclSIMDViewExpert.res \
d15\JclSIMDViewExpertDLL.res \
- d15\JclDeveloperTools.res \
+ d15\JclDeveloperTools.res \
d15\JclStackTraceViewerExpert.res \
d15\JclStackTraceViewerExpertDLL.res \
d15\JclVcl.res \
@@ -138,7 +139,7 @@
d16\JclRepositoryExpertDLL.res \
d16\JclSIMDViewExpert.res \
d16\JclSIMDViewExpertDLL.res \
- d16\JclDeveloperTools.res \
+ d16\JclDeveloperTools.res \
d16\JclStackTraceViewerExpert.res \
d16\JclStackTraceViewerExpertDLL.res \
d16\JclVcl.res \
@@ -157,7 +158,7 @@
d6\JclRepositoryExpertDLL.res \
d6\JclSIMDViewExpert.res \
d6\JclSIMDViewExpertDLL.res \
- d6\JclDeveloperTools.res \
+ d6\JclDeveloperTools.res \
d6\JclStackTraceViewerExpert.res \
d6\JclStackTraceViewerExpertDLL.res \
d6\JclThreadNameExpert.res \
@@ -180,7 +181,7 @@
d7\JclRepositoryExpertDLL.res \
d7\JclSIMDViewExpert.res \
d7\JclSIMDViewExpertDLL.res \
- d7\JclDeveloperTools.res \
+ d7\JclDeveloperTools.res \
d7\JclStackTraceViewerExpert.res \
d7\JclStackTraceViewerExpertDLL.res \
d7\JclUsesExpert.res \
@@ -192,8 +193,9 @@
d8\JclBaseExpert.res \
d8\JclContainers.res \
d8\JclFavoriteFoldersExpertDLL.res \
- d8\JclDeveloperTools.res \
+ d8\JclDeveloperTools.res \
d8\JclVersionControlExpertDLL.res \
+ d8\JclVcl.res \
d9\Jcl.res \
d9\JclBaseExpert.res \
d9\JclContainers.res \
@@ -207,7 +209,7 @@
d9\JclRepositoryExpertDLL.res \
d9\JclSIMDViewExpert.res \
d9\JclSIMDViewExpertDLL.res \
- d9\JclDeveloperTools.res \
+ d9\JclDeveloperTools.res \
d9\JclStackTraceViewerExpert.res \
d9\JclStackTraceViewerExpertDLL.res \
d9\JclVcl.res \
Modified: trunk/jcl/packages/xml/JclDeveloperTools-R.xml
===================================================================
--- trunk/jcl/packages/xml/JclDeveloperTools-R.xml 2012-03-04 18:46:03 UTC (rev 3760)
+++ trunk/jcl/packages/xml/JclDeveloperTools-R.xml 2012-03-04 21:21:40 UTC (rev 3761)
@@ -24,29 +24,29 @@
<File Name="..\..\source\common\JclCompilerUtils.pas" Targets="all" Formname="" Condition=""/>
<File Name="..\..\source\common\JclDevToolsResources.pas" Targets="all" Formname="" Condition=""/>
<File Name="..\..\source\common\JclIDEUtils.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorAlgorithmsTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorArrayListsTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorArraySetsTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorBinaryTreesTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorContainer1DTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorContainer2DTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorContainerIntfTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorContainerKnownMaps.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorContainerKnownTypes.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorContainerTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorContainerTypes.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorExcDlgTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorHashMapsTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorHashSetsTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorLexer.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorLinkedListsTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorParser.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorQueuesTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorSortedMapsTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorStacksTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorTreesTemplates.pas" Targets="all" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclPreProcessorVectorsTemplates.pas" Targets="all" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorAlgorithmsTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorArrayListsTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorArraySetsTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorBinaryTreesTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorContainer1DTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorContainer2DTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorContainerIntfTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorContainerKnownMaps.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorContainerKnownTypes.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorContainerTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorContainerTypes.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorExcDlgTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorHashMapsTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorHashSetsTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorLexer.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorLinkedListsTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorParser.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorQueuesTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorSortedMapsTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorStacksTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorTreesTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclPreProcessorVectorsTemplates.pas" Targets="runtimeIDE,help" Formname="" Condition=""/>
<File Name="..\..\source\common\JclUsesUtils.pas" Targets="all" Formname="" Condition=""/>
<File Name="..\..\source\windows\JclHelpUtils.pas" Targets="Windows" Formname="" Condition=""/>
<File Name="..\..\source\windows\JclMsBuild.pas" Targets="Windows" Formname="" Condition=""/>
Modified: trunk/jcl/packages/xml/JclVcl-R.xml
===================================================================
--- trunk/jcl/packages/xml/JclVcl-R.xml 2012-03-04 18:46:03 UTC (rev 3760)
+++ trunk/jcl/packages/xml/JclVcl-R.xml 2012-03-04 21:21:40 UTC (rev 3761)
@@ -9,6 +9,8 @@
<Requires>
<Package Name="rtl" Targets="Delphi,Bcb,Bds" Condition=""/>
<Package Name="vcl" Targets="Delphi,Bcb,Bds" Condition=""/>
+ <Package Name="FCL" Targets="fpc" Condition=""/>
+ <Package Name="LCL" Targets="fpc" Condition=""/>
<Package Name="vcljpg" Targets="c6,d6,d7,d8,d9,d10,cs1,d11" Condition=""/>
<Package Name="vclimg" Targets="allv11up" Condition=""/>
<Package Name="..\..\..\help\VCL" Targets="help" Condition=""/>
@@ -21,16 +23,16 @@
</Platforms>
<Contains>
<File Name="..\..\source\vcl\JclPrint.pas" Targets="Vcl" Formname="" Condition=""/>
- <File Name="..\..\source\vcl\JclGraphUtils.pas" Targets="Vcl" Formname="" Condition=""/>
- <File Name="..\..\source\vcl\JclGraphics.pas" Targets="Vcl" Formname="" Condition=""/>
- <File Name="..\..\source\vcl\JclFont.pas" Targets="Vcl" Formname="" Condition=""/>
+ <File Name="..\..\source\vcl\JclGraphUtils.pas" Targets="all" Formname="" Condition=""/>
+ <File Name="..\..\source\vcl\JclGraphics.pas" Targets="all" Formname="" Condition=""/>
+ <File Name="..\..\source\vcl\JclFont.pas" Targets="all" Formname="" Condition=""/>
<File Name="..\..\source\vcl\JclOpenDialogHooks.pas" Targets="Vcl" Formname="" Condition=""/>
<File Name="..\..\source\vcl\JclOpenDialogFavorites.pas" Targets="Vcl" Formname="" Condition=""/>
- <File Name="..\..\source\vcl\JclVclResources.pas" Targets="Vcl" Formname="" Condition=""/>
- <File Name="..\..\source\vcl\JclVersionControl.pas" Targets="Vcl" Formname="" Condition=""/>
- <File Name="..\..\source\vcl\JclVersionCtrlCVSImpl.pas" Targets="Vcl" Formname="" Condition=""/>
- <File Name="..\..\source\vcl\JclVersionCtrlGITImpl.pas" Targets="Vcl" Formname="" Condition=""/>
- <File Name="..\..\source\vcl\JclVersionCtrlSVNImpl.pas" Targets="Vcl" Formname="" Condition=""/>
+ <File Name="..\..\source\vcl\JclVclResources.pas" Targets="all" Formname="" Condition=""/>
+ <File Name="..\..\source\vcl\JclVersionControl.pas" Targets="all" Formname="" Condition=""/>
+ <File Name="..\..\source\vcl\JclVersionCtrlCVSImpl.pas" Targets="all" Formname="" Condition=""/>
+ <File Name="..\..\source\vcl\JclVersionCtrlGITImpl.pas" Targets="all" Formname="" Condition=""/>
+ <File Name="..\..\source\vcl\JclVersionCtrlSVNImpl.pas" Targets="all" Formname="" Condition=""/>
<File Name="..\..\..\help\Bitmap32.dtx" Targets="help" Formname="" Condition=""/>
<File Name="..\..\..\help\Common.dtx" Targets="help" Formname="" Condition=""/>
<File Name="..\..\..\help\Font.dtx" Targets="help" Formname="" Condition=""/>
Modified: trunk/jcl/source/vcl/JclFont.pas
===================================================================
--- trunk/jcl/source/vcl/JclFont.pas 2012-03-04 18:46:03 UTC (rev 3760)
+++ trunk/jcl/source/vcl/JclFont.pas 2012-03-04 21:21:40 UTC (rev 3761)
@@ -103,7 +103,7 @@
if (FontType = ftAuto) then
begin
- if (AObject.ClassType = TMemo) or (AObject.ClassType = TRichEdit) then
+ if (AObject.ClassType = TMemo) {$IFDEF BORLAND}or (AObject.ClassType = TRichEdit){$ENDIF} then
AFontType := ftContent
else
AFontType := ftCaption;
Modified: trunk/jcl/source/vcl/JclGraphUtils.pas
===================================================================
--- trunk/jcl/source/vcl/JclGraphUtils.pas 2012-03...
[truncated message content] |
|
From: <ou...@us...> - 2012-03-04 18:46:09
|
Revision: 3760
http://jcl.svn.sourceforge.net/jcl/?rev=3760&view=rev
Author: outchy
Date: 2012-03-04 18:46:03 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
update of the Lazarus packages.
Modified Paths:
--------------
trunk/jcl/packages/fpc/Jcl.lpk
trunk/jcl/packages/fpc/JclContainers.lpk
trunk/jcl/packages/fpc/JclDeveloperTools.lpk
trunk/jcl/packages/fpc/template.lpk
Modified: trunk/jcl/packages/fpc/Jcl.lpk
===================================================================
--- trunk/jcl/packages/fpc/Jcl.lpk 2012-03-04 18:39:47 UTC (rev 3759)
+++ trunk/jcl/packages/fpc/Jcl.lpk 2012-03-04 18:46:03 UTC (rev 3760)
@@ -7,11 +7,11 @@
<Author Value="Project JEDI"/>
<AutoUpdate Value="OnRebuildingAll"/>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="9"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\..\source\include\"/>
- <OtherUnitFiles Value=".;..\..\source\common;..\..\source\windows;"/>
+ <OtherUnitFiles Value=".;..\..\source\common;..\..\source\windows;;..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
<UnitOutputDirectory Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
@@ -19,6 +19,7 @@
<SyntaxOptions>
<SyntaxMode Value="Delphi"/>
<CStyleOperator Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
@@ -351,10 +352,10 @@
</Item1>
</RequiredPkgs>
<UsageOptions>
- <UnitPath Value="$(PkgOutDir)\"/>
<IncludePath Value="..\..\source\include\"/>
<LibraryPath Value="$(PkgOutDir)\"/>
<ObjectPath Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)\"/>
+ <UnitPath Value="$(PkgOutDir)\"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
Modified: trunk/jcl/packages/fpc/JclContainers.lpk
===================================================================
--- trunk/jcl/packages/fpc/JclContainers.lpk 2012-03-04 18:39:47 UTC (rev 3759)
+++ trunk/jcl/packages/fpc/JclContainers.lpk 2012-03-04 18:46:03 UTC (rev 3760)
@@ -7,11 +7,11 @@
<Author Value="Project JEDI"/>
<AutoUpdate Value="OnRebuildingAll"/>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="9"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\..\source\include\"/>
- <OtherUnitFiles Value=".;..\..\source\common;"/>
+ <OtherUnitFiles Value=".;..\..\source\common;;..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
<UnitOutputDirectory Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
@@ -19,6 +19,7 @@
<SyntaxOptions>
<SyntaxMode Value="Delphi"/>
<CStyleOperator Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
@@ -106,10 +107,10 @@
</Item2>
</RequiredPkgs>
<UsageOptions>
- <UnitPath Value="$(PkgOutDir)\"/>
<IncludePath Value="..\..\source\include\"/>
<LibraryPath Value="$(PkgOutDir)\"/>
<ObjectPath Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)\"/>
+ <UnitPath Value="$(PkgOutDir)\"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
Modified: trunk/jcl/packages/fpc/JclDeveloperTools.lpk
===================================================================
--- trunk/jcl/packages/fpc/JclDeveloperTools.lpk 2012-03-04 18:39:47 UTC (rev 3759)
+++ trunk/jcl/packages/fpc/JclDeveloperTools.lpk 2012-03-04 18:46:03 UTC (rev 3760)
@@ -7,11 +7,11 @@
<Author Value="Project JEDI"/>
<AutoUpdate Value="OnRebuildingAll"/>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="9"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\..\source\include\"/>
- <OtherUnitFiles Value=".;..\..\source\common;..\..\source\windows;"/>
+ <OtherUnitFiles Value=".;..\..\source\common;..\..\source\windows;;..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
<UnitOutputDirectory Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
@@ -19,6 +19,7 @@
<SyntaxOptions>
<SyntaxMode Value="Delphi"/>
<CStyleOperator Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
@@ -173,10 +174,10 @@
</Item3>
</RequiredPkgs>
<UsageOptions>
- <UnitPath Value="$(PkgOutDir)\"/>
<IncludePath Value="..\..\source\include\"/>
<LibraryPath Value="$(PkgOutDir)\"/>
<ObjectPath Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)\"/>
+ <UnitPath Value="$(PkgOutDir)\"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
Modified: trunk/jcl/packages/fpc/template.lpk
===================================================================
--- trunk/jcl/packages/fpc/template.lpk 2012-03-04 18:39:47 UTC (rev 3759)
+++ trunk/jcl/packages/fpc/template.lpk 2012-03-04 18:46:03 UTC (rev 3760)
@@ -7,11 +7,11 @@
<Author Value="Project JEDI"/>
<AutoUpdate Value="OnRebuildingAll"/>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="9"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\..\source\include\"/>
- <OtherUnitFiles Value="%PATHPAS%"/>
+ <OtherUnitFiles Value="%PATHPAS%;..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
<UnitOutputDirectory Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
@@ -19,6 +19,7 @@
<SyntaxOptions>
<SyntaxMode Value="Delphi"/>
<CStyleOperator Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
@@ -55,10 +56,10 @@
<%%% END REQUIRES %%%>
</RequiredPkgs>
<UsageOptions>
- <UnitPath Value="$(PkgOutDir)\"/>
<IncludePath Value="..\..\source\include\"/>
<LibraryPath Value="$(PkgOutDir)\"/>
<ObjectPath Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)\"/>
+ <UnitPath Value="$(PkgOutDir)\"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-03-04 18:39:54
|
Revision: 3759
http://jcl.svn.sourceforge.net/jcl/?rev=3759&view=rev
Author: outchy
Date: 2012-03-04 18:39:47 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
Mantis 5454: FPC compatilibity.
Modified Paths:
--------------
trunk/jcl/source/common/JclBase.pas
trunk/jcl/source/common/JclRTTI.pas
trunk/jcl/source/common/JclStreams.pas
trunk/jcl/source/common/JclSynch.pas
trunk/jcl/source/common/JclSysInfo.pas
trunk/jcl/source/common/JclUnicode.pas
trunk/jcl/source/common/JclWideStrings.pas
trunk/jcl/source/prototypes/JclWin32.pas
trunk/jcl/source/windows/JclAppInst.pas
trunk/jcl/source/windows/JclWin32.pas
Added Paths:
-----------
trunk/jcl/source/prototypes/win32api/IoAPI.imp
trunk/jcl/source/prototypes/win32api/IoAPI.int
Modified: trunk/jcl/source/common/JclBase.pas
===================================================================
--- trunk/jcl/source/common/JclBase.pas 2012-03-04 18:21:29 UTC (rev 3758)
+++ trunk/jcl/source/common/JclBase.pas 2012-03-04 18:39:47 UTC (rev 3759)
@@ -351,7 +351,6 @@
{$IFDEF FPC}
type
HWND = type Windows.HWND;
- HMODULE = type Windows.HMODULE;
{$ENDIF FPC}
{$IFDEF SUPPORTS_GENERICS}
Modified: trunk/jcl/source/common/JclRTTI.pas
===================================================================
--- trunk/jcl/source/common/JclRTTI.pas 2012-03-04 18:21:29 UTC (rev 3758)
+++ trunk/jcl/source/common/JclRTTI.pas 2012-03-04 18:39:47 UTC (rev 3759)
@@ -1890,7 +1890,7 @@
AInstance := GetObjectProp(FInstance, PropInfo);
if AInstance <> nil then
begin
- SubClassTypeInfo := TJclObjClassTypeInfo.Create(PropInfo.PropType^, Prefix, AInstance);
+ SubClassTypeInfo := TJclObjClassTypeInfo.Create(PropInfo.PropType{$IFDEF BORLAND}^{$ENDIF}, Prefix, AInstance);
Result := SubClassTypeInfo.ObjPropNames[Suffix];
end
else
Modified: trunk/jcl/source/common/JclStreams.pas
===================================================================
--- trunk/jcl/source/common/JclStreams.pas 2012-03-04 18:21:29 UTC (rev 3758)
+++ trunk/jcl/source/common/JclStreams.pas 2012-03-04 18:39:47 UTC (rev 3759)
@@ -27,7 +27,7 @@
{ }
{**************************************************************************************************}
{ }
-{ Last modified: $Date:: $ }
+{ Last modified: $Date:: $ }
{ Revision: $Rev:: $ }
{ Author: $Author:: $ }
{ }
Modified: trunk/jcl/source/common/JclSynch.pas
===================================================================
--- trunk/jcl/source/common/JclSynch.pas 2012-03-04 18:21:29 UTC (rev 3758)
+++ trunk/jcl/source/common/JclSynch.pas 2012-03-04 18:39:47 UTC (rev 3759)
@@ -86,8 +86,10 @@
function LockedInc(var Target: Int64): Int64; overload;
function LockedSub(var Target: Int64; Value: Int64): Int64; overload;
+{$IFDEF BORLAND}
function LockedDec(var Target: NativeInt): NativeInt; overload;
function LockedInc(var Target: NativeInt): NativeInt; overload;
+{$ENDIF BORLAND}
{$ENDIF CPU64}
// TJclDispatcherObject
@@ -729,6 +731,8 @@
ADD RAX, RDX
end;
+{$IFDEF BORLAND}
+
function LockedDec(var Target: NativeInt): NativeInt;
asm
// --> RCX Target
@@ -746,6 +750,9 @@
LOCK XADD [RCX], RAX
INC RAX
end;
+
+{$ENDIF BORLAND}
+
{$ENDIF CPU64}
//=== { TJclDispatcherObject } ===============================================
Modified: trunk/jcl/source/common/JclSysInfo.pas
===================================================================
--- trunk/jcl/source/common/JclSysInfo.pas 2012-03-04 18:21:29 UTC (rev 3758)
+++ trunk/jcl/source/common/JclSysInfo.pas 2012-03-04 18:39:47 UTC (rev 3759)
@@ -4323,6 +4323,9 @@
SETNZ Result
{$ENDIF CPU32}
{$IFDEF CPU64}
+ {$IFDEF FPC}
+ {$DEFINE DELPHI64_TEMPORARY}
+ {$ENDIF FPC}
{$IFDEF DELPHI64_TEMPORARY}
PUSHFQ
{$ELSE ~DELPHI64_TEMPORARY}
@@ -4347,6 +4350,9 @@
AND RAX, ID_FLAG
XOR RAX, RCX
SETNZ Result
+ {$IFDEF FPC}
+ {$UNDEF DELPHI64_TEMPORARY}
+ {$ENDIF FPC}
{$ENDIF CPU64}
end;
{$IFNDEF DELPHI64_TEMPORARY}
Modified: trunk/jcl/source/common/JclUnicode.pas
===================================================================
--- trunk/jcl/source/common/JclUnicode.pas 2012-03-04 18:21:29 UTC (rev 3758)
+++ trunk/jcl/source/common/JclUnicode.pas 2012-03-04 18:39:47 UTC (rev 3759)
@@ -1843,16 +1843,12 @@
SetLength(Categories[First], 256);
if Categories[First, Second] = nil then
SetLength(Categories[First, Second], 256);
- {$IF SizeOf(TCharacterCategories) mod 4 <> 0}
// The array is allocated on the exact size, but the compiler generates
// a 32 bit "BTS" instruction that accesses memory beyond the allocated block.
if Third < 255 then
Include(Categories[First, Second, Third], Category)
else
Categories[First, Second, Third] := Categories[First, Second, Third] + [Category];
- {$ELSE}
- Include(Categories[First, Second, Third], Category);
- {$IFEND}
end;
end;
end;
@@ -3129,7 +3125,7 @@
while Find(Run, RunLen, Start, Stop) do
begin
// store this result (consider text pointer movement)...
- AddResult(Start + Run - Text, Stop + Run - Text);
+ AddResult(Start + (Run - Text), Stop + (Run - Text));
// ... and advance text position and length
Inc(Run, Stop);
Dec(RunLen, Stop);
@@ -5100,7 +5096,7 @@
while ExecuteURE(0, Run, RunLen, Start, Stop) do
begin
// store this result (consider text pointer movement)...
- AddResult(Start + Run - Text, Stop + Run - Text);
+ AddResult(Start + (Run - Text), Stop + (Run - Text));
// ... and advance text position and length
Inc(Run, Stop);
Dec(RunLen, Stop);
Modified: trunk/jcl/source/common/JclWideStrings.pas
===================================================================
--- trunk/jcl/source/common/JclWideStrings.pas 2012-03-04 18:21:29 UTC (rev 3758)
+++ trunk/jcl/source/common/JclWideStrings.pas 2012-03-04 18:39:47 UTC (rev 3759)
@@ -845,11 +845,11 @@
// --> RCX Str
XOR RAX, RAX // clear high order byte to be able to use 64bit operand below
@@1:
- MOV AX, WORD PTR [ECX]
+ MOV AX, WORD PTR [RCX]
OR RAX, RAX
JZ @@2
XCHG AL, AH
- MOV WORD PTR [ECX], AX
+ MOV WORD PTR [RCX], AX
ADD ECX, 2
JMP @@1
@@2:
Modified: trunk/jcl/source/prototypes/JclWin32.pas
===================================================================
--- trunk/jcl/source/prototypes/JclWin32.pas 2012-03-04 18:21:29 UTC (rev 3758)
+++ trunk/jcl/source/prototypes/JclWin32.pas 2012-03-04 18:39:47 UTC (rev 3759)
@@ -67,8 +67,9 @@
{$ELSE ~HAS_UNITSCOPE}
Windows, SysUtils,
{$IFNDEF FPC}
- AccCtrl, ActiveX,
+ AccCtrl,
{$ENDIF ~FPC}
+ ActiveX,
{$ENDIF ~HAS_UNITSCOPE}
JclBase;
@@ -77,6 +78,7 @@
{$HPPEMIT '#include <WinBase.h>'}
{$HPPEMIT '#include <BaseTsd.h>'}
{$HPPEMIT '#include <ImageHlp.h>'}
+{$HPPEMIT '#include <IoAPI.h>'}
{$HPPEMIT '#include <lm.h>'}
{$HPPEMIT '#include <Nb30.h>'}
{$HPPEMIT '#include <RasDlg.h>'}
@@ -129,6 +131,7 @@
{$I win32api\WinBase.int}
{$I win32api\AclApi.int}
{$I win32api\ImageHlp.int}
+{$I win32api\IoAPI.int}
{$I win32api\LmErr.int}
{$I win32api\LmCons.int}
{$I win32api\LmAccess.int}
@@ -293,6 +296,7 @@
{$I win32api\AclApi.imp}
{$I win32api\ImageHlp.imp}
+{$I win32api\IoAPI.imp}
{$I win32api\LmAccess.imp}
{$I win32api\LmApiBuf.imp}
{$I win32api\Lmwksta.imp}
Added: trunk/jcl/source/prototypes/win32api/IoAPI.imp
===================================================================
--- trunk/jcl/source/prototypes/win32api/IoAPI.imp (rev 0)
+++ trunk/jcl/source/prototypes/win32api/IoAPI.imp 2012-03-04 18:39:47 UTC (rev 3759)
@@ -0,0 +1,14 @@
+{$IFDEF MSWINDOWS}
+
+type
+ TCancelIo = function (hFile: THandle): BOOL; stdcall;
+var
+ _CancelIo: TCancelIo = nil;
+
+function CancelIo(hFile: THandle): BOOL;
+begin
+ GetProcedureAddress(Pointer(@_CancelIo), kernel32, 'CancelIo');
+ Result := _CancelIo(hFile);
+end;
+
+{$ENDIF MSWINDOWS}
\ No newline at end of file
Property changes on: trunk/jcl/source/prototypes/win32api/IoAPI.imp
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/jcl/source/prototypes/win32api/IoAPI.int
===================================================================
--- trunk/jcl/source/prototypes/win32api/IoAPI.int (rev 0)
+++ trunk/jcl/source/prototypes/win32api/IoAPI.int 2012-03-04 18:39:47 UTC (rev 3759)
@@ -0,0 +1,8 @@
+// IoAPI.h
+
+{$IFDEF MSWINDOWS}
+
+function CancelIo(hFile: THandle): BOOL; stdcall;
+{$EXTERNALSYM CancelIo}
+
+{$ENDIF MSWINDOWS}
Property changes on: trunk/jcl/source/prototypes/win32api/IoAPI.int
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/jcl/source/windows/JclAppInst.pas
===================================================================
--- trunk/jcl/source/windows/JclAppInst.pas 2012-03-04 18:21:29 UTC (rev 3758)
+++ trunk/jcl/source/windows/JclAppInst.pas 2012-03-04 18:39:47 UTC (rev 3759)
@@ -742,7 +742,7 @@
ACLSize := SizeOf(TACL) + SizeOf(ACCESS_ALLOWED_ACE) + SizeOf(DWORD) + GetLengthSid(AccessSID);
ACL := AllocMem(ACLSize);
Win32Check(InitializeAcl(ACL^, ACLSize, ACL_REVISION));
- Win32Check(AddAccessAllowedAce(ACL^, ACL_REVISION, FILE_MAP_ALL_ACCESS, AccessSID));
+ Win32Check(AddAccessAllowedAce(ACL{$IFDEF BORLAND}^{$ENDIF}, ACL_REVISION, FILE_MAP_ALL_ACCESS, AccessSID));
Assert(IsValidAcl(ACL{$IFNDEF RTL230_UP}^{$ENDIF})); // QC #102231
// create the security descriptor
Modified: trunk/jcl/source/windows/JclWin32.pas
===================================================================
--- trunk/jcl/source/windows/JclWin32.pas 2012-03-04 18:21:29 UTC (rev 3758)
+++ trunk/jcl/source/windows/JclWin32.pas 2012-03-04 18:39:47 UTC (rev 3759)
@@ -71,8 +71,9 @@
{$ELSE ~HAS_UNITSCOPE}
Windows, SysUtils,
{$IFNDEF FPC}
- AccCtrl, ActiveX,
+ AccCtrl,
{$ENDIF ~FPC}
+ ActiveX,
{$ENDIF ~HAS_UNITSCOPE}
JclBase;
@@ -81,6 +82,7 @@
{$HPPEMIT '#include <WinBase.h>'}
{$HPPEMIT '#include <BaseTsd.h>'}
{$HPPEMIT '#include <ImageHlp.h>'}
+{$HPPEMIT '#include <IoAPI.h>'}
{$HPPEMIT '#include <lm.h>'}
{$HPPEMIT '#include <Nb30.h>'}
{$HPPEMIT '#include <RasDlg.h>'}
@@ -3521,6 +3523,13 @@
SYMOPT_DEBUG = $80000000;
{$EXTERNALSYM SYMOPT_DEBUG}
+// IoAPI.h
+
+
+function CancelIo(hFile: THandle): BOOL; stdcall;
+{$EXTERNALSYM CancelIo}
+
+
const
NERR_Success = 0; // Success
{$EXTERNALSYM NERR_Success}
@@ -7981,6 +7990,18 @@
type
+ TCancelIo = function (hFile: THandle): BOOL; stdcall;
+var
+ _CancelIo: TCancelIo = nil;
+
+function CancelIo(hFile: THandle): BOOL;
+begin
+ GetProcedureAddress(Pointer(@_CancelIo), kernel32, 'CancelIo');
+ Result := _CancelIo(hFile);
+end;
+
+
+type
TNetUserAdd = function (servername: LPCWSTR; level: DWORD; buf: PByte; parm_err: LPDWORD): NET_API_STATUS; stdcall;
var
_NetUserAdd: TNetUserAdd = nil;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-03-04 18:21:36
|
Revision: 3758
http://jcl.svn.sourceforge.net/jcl/?rev=3758&view=rev
Author: outchy
Date: 2012-03-04 18:21:29 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
Mantis 5454: FPC compatibility
- Reuse the code from TInterfacedObject as much as possible
Modified Paths:
--------------
trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerClasses.pas
trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerMainFrame.pas
trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerStackUtils.pas
trunk/jcl/source/common/JclCompression.pas
trunk/jcl/source/common/JclStringLists.pas
trunk/jcl/source/common/JclSysUtils.pas
Modified: trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerClasses.pas
===================================================================
--- trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerClasses.pas 2012-03-04 18:12:39 UTC (rev 3757)
+++ trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerClasses.pas 2012-03-04 18:21:29 UTC (rev 3758)
@@ -171,7 +171,7 @@
property ModuleName: string read GetModuleName;
end;
- TJclStackTraceViewerModuleInfoList = class(TObject, IJclModuleInfoList)
+ TJclStackTraceViewerModuleInfoList = class(TInterfacedObject, IInterface, IJclModuleInfoList)
private
FItems: TObjectList;
public
@@ -181,7 +181,7 @@
procedure Clear;
{ IInterface }
- function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
+ // function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
{ IJclModuleInfoList }
@@ -617,14 +617,6 @@
FItems[AIndex].GetInterface(IJclModuleInfo, Result);
end;
-function TJclStackTraceViewerModuleInfoList.QueryInterface(const IID: TGUID; out Obj): HRESULT;
-begin
- if GetInterface(IID, Obj) then
- Result := S_OK
- else
- Result := E_NOINTERFACE;
-end;
-
function TJclStackTraceViewerModuleInfoList._AddRef: Integer;
begin
Result := -1;
Modified: trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerMainFrame.pas
===================================================================
--- trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerMainFrame.pas 2012-03-04 18:12:39 UTC (rev 3757)
+++ trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerMainFrame.pas 2012-03-04 18:21:29 UTC (rev 3758)
@@ -122,7 +122,7 @@
{$R *.dfm}
type
- TCustomTreeViewLink = class(TObject, IJclStackTraceViewerTreeViewLink)
+ TCustomTreeViewLink = class(TInterfacedObject, IInterface, IJclStackTraceViewerTreeViewLink)
private
function GetInternalItems(AIndex: Integer): TCustomTreeViewLink;
protected
@@ -138,7 +138,7 @@
property OwnsData: Boolean read FOwnsData write FOwnsData;
property Parent: TCustomTreeViewLink read FParent;
{ IInterface }
- function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
+ // function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
{ IJclStackTraceViewerTreeViewLink }
@@ -239,14 +239,6 @@
Result := '';
end;
-function TCustomTreeViewLink.QueryInterface(const IID: TGUID; out Obj): HRESULT;
-begin
- if GetInterface(IID, Obj) then
- Result := S_OK
- else
- Result := E_NOINTERFACE;
-end;
-
procedure TCustomTreeViewLink.Show(AFrame: TCustomFrame);
begin
DoShow(AFrame);
Modified: trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerStackUtils.pas
===================================================================
--- trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerStackUtils.pas 2012-03-04 18:12:39 UTC (rev 3757)
+++ trunk/jcl/experts/stacktraceviewer/JclStackTraceViewerStackUtils.pas 2012-03-04 18:21:29 UTC (rev 3758)
@@ -48,7 +48,7 @@
TJclLocationInfoProgressEvent = procedure(AStatus: TLocationInfoProcessorProgressStatus;
APos, AMax: Integer; const AText: string) of object;
- TJclLocationInfoProcessor = class(TObject, IJclStackTraceViewerStackProcessorServices)
+ TJclLocationInfoProcessor = class(TInterfacedObject, IInterface, IJclStackTraceViewerStackProcessorServices)
private
FModuleList: IJclModuleInfoList;
FOnProgress: TJclLocationInfoProgressEvent;
@@ -61,7 +61,7 @@
property RootDir: string read FRootDir write FRootDir;
{ IInterface }
- function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
+ // function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
{ IJclStackTraceViewerStackProcessorServices }
@@ -556,14 +556,6 @@
end;
end;
-function TJclLocationInfoProcessor.QueryInterface(const IID: TGUID; out Obj): HRESULT;
-begin
- if GetInterface(IID, Obj) then
- Result := S_OK
- else
- Result := E_NOINTERFACE;
-end;
-
procedure TJclLocationInfoProcessor.SetModuleInfoList(AValue: IJclModuleInfoList);
begin
FModuleList := AValue;
Modified: trunk/jcl/source/common/JclCompression.pas
===================================================================
--- trunk/jcl/source/common/JclCompression.pas 2012-03-04 18:12:39 UTC (rev 3757)
+++ trunk/jcl/source/common/JclCompression.pas 2012-03-04 18:21:29 UTC (rev 3758)
@@ -36,7 +36,7 @@
{ }
{**************************************************************************************************}
{ }
-{ Last modified: $Date:: $ }
+{ Last modified: $Date:: $ }
{ Revision: $Rev:: $ }
{ Author: $Author:: $ }
{ }
@@ -764,7 +764,7 @@
TJclStreamAccess = (saCreate, saReadOnly, saReadOnlyDenyNone, saWriteOnly, saReadWrite);
{ TJclCompressionArchive is not ref-counted }
- TJclCompressionArchive = class(TObject, IInterface)
+ TJclCompressionArchive = class(TInterfacedObject, IInterface)
private
FOnProgress: TJclCompressionProgressEvent;
FOnRatio: TJclCompressionRatioEvent;
@@ -799,7 +799,7 @@
function GetSupportsNestedArchive: Boolean; virtual;
public
{ IInterface }
- function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
+ // function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
public
@@ -5042,14 +5042,6 @@
Result := -1;
end;
-function TJclCompressionArchive.QueryInterface(const IID: TGUID; out Obj): HRESULT;
-begin
- if GetInterface(IID, Obj) then
- Result := 0
- else
- Result := E_NOINTERFACE;
-end;
-
//=== { TJclCompressItem } ===================================================
procedure TJclCompressItem.CheckGetProperty(
Modified: trunk/jcl/source/common/JclStringLists.pas
===================================================================
--- trunk/jcl/source/common/JclStringLists.pas 2012-03-04 18:12:39 UTC (rev 3757)
+++ trunk/jcl/source/common/JclStringLists.pas 2012-03-04 18:21:29 UTC (rev 3758)
@@ -82,7 +82,11 @@
function GetObjects(Index: Integer): TObject;
function GetTextStr: string;
function GetValue(const Name: string): string;
+ {$IFDEF FPC}
+ function Find(const S: string; out Index: Integer): Boolean;
+ {$ELSE ~FPC}
function Find(const S: string; var Index: Integer): Boolean;
+ {$ENDIF ~FPC}
function IndexOf(const S: string): Integer;
function GetCaseSensitive: Boolean;
function GetDuplicates: TDuplicates;
@@ -208,18 +212,30 @@
end;
type
- TJclUpdateControl = class(TObject, IInterface)
+ TJclUpdateControl = class(TInterfacedObject, IInterface)
private
FStrings: TStrings;
public
constructor Create(AStrings: TStrings);
{ IInterface }
- function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
+ // function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
end;
- TJclStringList = class(TStringList, IJclStringList)
+ TJclInterfacedStringList = class(TStringList, IInterface)
+ private
+ FOwnerInterface: IInterface;
+ public
+ { IInterface }
+ function _AddRef: Integer; stdcall;
+ function _Release: Integer; stdcall;
+ function QueryInterface({$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): HResult; stdcall;
+ procedure AfterConstruction; override;
+ end;
+
+
+ TJclStringList = class(TJclInterfacedStringList, IInterface, IJclStringList)
private
FObjectsMode: TJclStringListObjectsMode;
FSelfAsInterface: IJclStringList;
@@ -240,7 +256,7 @@
constructor Create;
destructor Destroy; override;
{ IInterface }
- function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
+ // function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
{ IJclStringList }
@@ -444,6 +460,45 @@
Result := JclStringList.Add(A);
end;
+//=== { TJclInterfacedStringList } ==============================================
+
+procedure TJclInterfacedStringList.AfterConstruction;
+Var
+ MyOwner : TPersistent;
+begin
+ inherited;
+ MyOwner := GetOwner;
+ if Assigned(MyOwner) then
+ MyOwner.GetInterface(IUnknown,FOwnerInterface);
+end;
+
+
+function TJclInterfacedStringList._AddRef: Integer;stdcall;
+begin
+ if assigned(FOwnerInterface) then
+ Result := FOwnerInterface._AddRef
+ else
+ Result := -1;
+end;
+
+
+function TJclInterfacedStringList._Release: Integer;stdcall;
+begin
+ if assigned(FOwnerInterface) then
+ Result := FOwnerInterface._Release
+ else
+ Result := -1;
+end;
+
+
+function TJclInterfacedStringList.QueryInterface({$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): HResult;stdcall;
+begin
+ if GetInterface(IID, Obj) then
+ Result := 0
+ else
+ Result := E_NOINTERFACE;
+end;
+
//=== { TJclStringList } =====================================================
function TJclStringList.Add(const A: array of const): IJclStringList;
@@ -605,14 +660,6 @@
Result := FSelfAsInterface;
end;
-function TJclStringList.QueryInterface(const IID: TGUID; out Obj): HRESULT;
-begin
- if GetInterface(IID, Obj) then
- Result := 0
- else
- Result := E_NOINTERFACE;
-end;
-
function TJclStringList._AddRef: Integer;
begin
Result := InterlockedIncrement(FRefCount);
@@ -1357,14 +1404,6 @@
Result := 0;
end;
-function TJclUpdateControl.QueryInterface(const IID: TGUID; out Obj): HRESULT;
-begin
- if GetInterface(IID, Obj) then
- Result := S_OK
- else
- Result := E_NOINTERFACE;
-end;
-
{$IFDEF UNITVERSIONING}
initialization
RegisterUnitVersion(HInstance, UnitVersioning);
Modified: trunk/jcl/source/common/JclSysUtils.pas
===================================================================
--- trunk/jcl/source/common/JclSysUtils.pas 2012-03-04 18:12:39 UTC (rev 3757)
+++ trunk/jcl/source/common/JclSysUtils.pas 2012-03-04 18:21:29 UTC (rev 3758)
@@ -412,14 +412,14 @@
// interfaced persistent
type
- TJclInterfacedPersistent = class(TPersistent, IInterface)
+ TJclInterfacedPersistent = class(TInterfacedPersistent, IInterface)
protected
FOwnerInterface: IInterface;
FRefCount: Integer;
public
procedure AfterConstruction; override;
{ IInterface }
- function QueryInterface(const IID: TGUID; out Obj): HRESULT; virtual; stdcall;
+ // function QueryInterface(const IID: TGUID; out Obj): HRESULT; virtual; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
end;
@@ -641,14 +641,14 @@
// thread safe support
type
- TJclIntfCriticalSection = class(TObject, IInterface)
+ TJclIntfCriticalSection = class(TInterfacedObject, IInterface)
private
FCriticalSection: TCriticalSection;
public
constructor Create;
destructor Destroy; override;
{ IInterface }
- function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
+ // function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
end;
@@ -814,7 +814,8 @@
AnsiStrings,
{$ENDIF HAS_UNIT_ANSISTRINGS}
{$ENDIF ~HAS_UNITSCOPE}
- JclFileUtils, JclMath, JclResources, JclStrings, JclStringConversions, JclSysInfo;
+ JclFileUtils, JclMath, JclResources, JclStrings,
+ JclStringConversions, JclSysInfo, JclWin32;
// memory initialization
procedure ResetMemory(out P; Size: Longint);
@@ -2222,15 +2223,6 @@
GetOwner.GetInterface(IInterface, FOwnerInterface);
end;
-function TJclInterfacedPersistent.QueryInterface(const IID: TGUID;
- out Obj): HRESULT;
-begin
- if GetInterface(IID, Obj) then
- Result := S_OK
- else
- Result := E_NOINTERFACE;
-end;
-
function TJclInterfacedPersistent._AddRef: Integer;
begin
if FOwnerInterface <> nil then
@@ -2860,7 +2852,7 @@
end;
InternalAbort := False;
if AbortPtr <> nil then
- AbortPtr^ := False
+ AbortPtr^ := {$IFDEF FPC}Byte({$ENDIF}False{$IFDEF FPC}){$ENDIF}
else
AbortPtr := @InternalAbort;
// init the array of events to wait for
@@ -2902,7 +2894,7 @@
InternalExecuteReadPipe(ErrorPipeInfo, ErrorOverlapped);
end;
// event based loop
- while not AbortPtr^ do
+ while not {$IFDEF FPC}Boolean({$ENDIF}AbortPtr^{$IFDEF FPC}){$ENDIF} do
begin
Index := WaitAlertableForMultipleObjects(WaitEvents, False, INFINITE);
if Index = WAIT_OBJECT_0 then
@@ -2932,7 +2924,7 @@
if ((Index = (WAIT_OBJECT_0 + 2)) and MergeError) or
((Index = (WAIT_OBJECT_0 + 3)) and not MergeError) then
// event on abort
- AbortPtr^ := True
+ AbortPtr^ := {$IFDEF FPC}Byte({$ENDIF}True{$IFDEF FPC}){$ENDIF}
else
{$IFDEF DELPHI11_UP}
RaiseLastOSError(Index);
@@ -2940,7 +2932,7 @@
RaiseLastOSError;
{$ENDIF DELPHI11_UP}
end;
- if AbortPtr^ then
+ if {$IFDEF FPC}Boolean({$ENDIF}AbortPtr^{$IFDEF FPC}){$ENDIF} then
TerminateProcess(ProcessEvent.Handle, Cardinal(ABORT_EXIT_CODE));
if (ProcessEvent.WaitForever = wrSignaled) and not GetExitCodeProcess(ProcessEvent.Handle, Result) then
Result := $FFFFFFFF;
@@ -3647,14 +3639,6 @@
Result := 0;
end;
-function TJclIntfCriticalSection.QueryInterface(const IID: TGUID; out Obj): HRESULT;
-begin
- if GetInterface(IID, Obj) then
- Result := S_OK
- else
- Result := E_NOINTERFACE;
-end;
-
//=== { TJclSimpleLog } ======================================================
{$IFDEF LINUX}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-03-04 18:12:45
|
Revision: 3757
http://jcl.svn.sourceforge.net/jcl/?rev=3757&view=rev
Author: outchy
Date: 2012-03-04 18:12:39 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
Disable CPP exceptions for FPC.
Add missing unit versioning block in JclCppException.pas.
Modified Paths:
--------------
trunk/jcl/source/windows/JclCppException.pas
trunk/jcl/source/windows/JclHookExcept.pas
Modified: trunk/jcl/source/windows/JclCppException.pas
===================================================================
--- trunk/jcl/source/windows/JclCppException.pas 2012-03-04 16:42:29 UTC (rev 3756)
+++ trunk/jcl/source/windows/JclCppException.pas 2012-03-04 18:12:39 UTC (rev 3757)
@@ -48,6 +48,8 @@
SysUtils;
{$ENDIF ~HAS_UNITSCOPE}
+{$IFDEF BORLAND}
+
type
PJclCppStdException = type Pointer; { mapped to std::exception* via $HPPEMIT }
{$EXTERNALSYM PJclCppStdException}
@@ -144,6 +146,7 @@
procedure JclUninstallCppExceptionFilter;
function JclCppExceptionFilterInstalled: Boolean;
+{$ENDIF BORLAND}
{$IFDEF UNITVERSIONING}
const
@@ -159,6 +162,8 @@
implementation
+{$IFDEF BORLAND}
+
uses
JclResources, JclHookExcept;
@@ -736,5 +741,15 @@
Result := HookInstalled;
end;
+{$ENDIF BORLAND}
+
+{$IFDEF UNITVERSIONING}
+initialization
+ RegisterUnitVersion(HInstance, UnitVersioning);
+
+finalization
+ UnregisterUnitVersion(HInstance);
+{$ENDIF UNITVERSIONING}
+
end.
Modified: trunk/jcl/source/windows/JclHookExcept.pas
===================================================================
--- trunk/jcl/source/windows/JclHookExcept.pas 2012-03-04 16:42:29 UTC (rev 3756)
+++ trunk/jcl/source/windows/JclHookExcept.pas 2012-03-04 18:12:39 UTC (rev 3757)
@@ -574,6 +574,7 @@
NewResultExc := NewExceptObj;
end;
+{$IFDEF BORLAND}
function GetCppRtlBase: Pointer;
const
{$IFDEF COMPILER6} { Delphi/C++Builder 6 }
@@ -600,6 +601,7 @@
begin
Result := GetCppRtlBase <> TJclPeMapImgHooks.SystemBase;
end;
+{$ENDIF BORLAND}
function JclHookExceptions: Boolean;
var
@@ -609,8 +611,10 @@
{ Detect C++Builder applications and C++ packages loaded into Delphi applications.
Hook the C++ RTL regardless of ExceptionsHooked so that users can call JclHookException() after
loading a C++ package which might pull in the C++ RTL DLL. }
+ {$IFDEF BORLAND}
if HasCppRtl then
- TJclPeMapImgHooks.ReplaceImport (GetCppRtlBase, kernel32, RaiseExceptionAddressCache, @HookedRaiseException);
+ TJclPeMapImgHooks.ReplaceImport(GetCppRtlBase, kernel32, RaiseExceptionAddressCache, @HookedRaiseException);
+ {$ENDIF BORLAND}
if not ExceptionsHooked then
begin
Recursive := False;
@@ -636,8 +640,10 @@
function JclUnhookExceptions: Boolean;
begin
+ {$IFDEF BORLAND}
if HasCppRtl then
TJclPeMapImgHooks.ReplaceImport (GetCppRtlBase, kernel32, @HookedRaiseException, @Kernel32_RaiseException);
+ {$ENDIF BORLAND}
if ExceptionsHooked then
begin
with TJclPeMapImgHooks do
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-03-04 16:42:35
|
Revision: 3756
http://jcl.svn.sourceforge.net/jcl/?rev=3756&view=rev
Author: outchy
Date: 2012-03-04 16:42:29 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
Mantis 5780: FileSearch broken on XE and XE2.
Modified Paths:
--------------
trunk/jcl/source/common/JclFileUtils.pas
Modified: trunk/jcl/source/common/JclFileUtils.pas
===================================================================
--- trunk/jcl/source/common/JclFileUtils.pas 2012-03-03 10:17:49 UTC (rev 3755)
+++ trunk/jcl/source/common/JclFileUtils.pas 2012-03-04 16:42:29 UTC (rev 3756)
@@ -6557,9 +6557,9 @@
if fsMaxSize in Options then
Task.FileSizeMax := FileSizeMax;
if fsLastChangeAfter in Options then
- Task.FFileTimeMin := DateTimeToFileDate(LastChangeAfter);
+ Task.FFileTimeMin := {$IFDEF RTL220_UP}LastChangeAfter{$ELSE}DateTimeToFileDate(LastChangeAfter){$ENDIF};
if fsLastChangeBefore in Options then
- Task.FFileTimeMax := DateTimeToFileDate(LastChangeBefore);
+ Task.FFileTimeMax := {$IFDEF RTL220_UP}LastChangeBefore{$ELSE}DateTimeToFileDate(LastChangeBefore){$ENDIF};
Task.SynchronizationMode := SynchronizationMode;
Task.FOnEnterDirectory := OnEnterDirectory;
Task.OnTerminate := TaskTerminated;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-03-03 10:17:56
|
Revision: 3755
http://jcl.svn.sourceforge.net/jcl/?rev=3755&view=rev
Author: outchy
Date: 2012-03-03 10:17:49 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
D2009 and newer badly emit declaration of generic array types.
Modified Paths:
--------------
trunk/jcl/source/common/JclHashMaps.pas
trunk/jcl/source/common/JclSortedMaps.pas
trunk/jcl/source/prototypes/JclHashMaps.pas
trunk/jcl/source/prototypes/JclSortedMaps.pas
Modified: trunk/jcl/source/common/JclHashMaps.pas
===================================================================
--- trunk/jcl/source/common/JclHashMaps.pas 2012-03-02 06:30:10 UTC (rev 3754)
+++ trunk/jcl/source/common/JclHashMaps.pas 2012-03-03 10:17:49 UTC (rev 3755)
@@ -2857,12 +2857,10 @@
Value: TValue;
end;
- TJclHashEntryArray<TKey,TValue> = array of TJclHashEntry<TKey,TValue>;
-
TJclBucket<TKey,TValue> = class
public
type
- THashEntryArray = TJclHashEntryArray<TKey,TValue>;
+ THashEntryArray = array of TJclHashEntry<TKey,TValue>;
public
Size: Integer;
Entries: THashEntryArray;
Modified: trunk/jcl/source/common/JclSortedMaps.pas
===================================================================
--- trunk/jcl/source/common/JclSortedMaps.pas 2012-03-02 06:30:10 UTC (rev 3754)
+++ trunk/jcl/source/common/JclSortedMaps.pas 2012-03-03 10:17:49 UTC (rev 3755)
@@ -2691,8 +2691,6 @@
Value: TValue;
end;
- TJclSortedEntryArray<TKey,TValue> = array of TJclSortedEntry<TKey,TValue>;
-
TJclSortedMap<TKey,TValue> = class(TJclAbstractContainerBase, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
IJclIntfCloneable, IJclCloneable, IJclGrowable, IJclPackable, IJclBaseContainer, IJclPairOwner<TKey,TValue>,
IJclMap<TKey,TValue>, IJclSortedMap<TKey,TValue>)
Modified: trunk/jcl/source/prototypes/JclHashMaps.pas
===================================================================
--- trunk/jcl/source/prototypes/JclHashMaps.pas 2012-03-02 06:30:10 UTC (rev 3754)
+++ trunk/jcl/source/prototypes/JclHashMaps.pas 2012-03-03 10:17:49 UTC (rev 3755)
@@ -69,12 +69,10 @@
Value: TValue;
end;
- TJclHashEntryArray<TKey,TValue> = array of TJclHashEntry<TKey,TValue>;
-
TJclBucket<TKey,TValue> = class
public
type
- THashEntryArray = TJclHashEntryArray<TKey,TValue>;
+ THashEntryArray = array of TJclHashEntry<TKey,TValue>;
public
Size: Integer;
Entries: THashEntryArray;
Modified: trunk/jcl/source/prototypes/JclSortedMaps.pas
===================================================================
--- trunk/jcl/source/prototypes/JclSortedMaps.pas 2012-03-02 06:30:10 UTC (rev 3754)
+++ trunk/jcl/source/prototypes/JclSortedMaps.pas 2012-03-03 10:17:49 UTC (rev 3755)
@@ -63,7 +63,10 @@
{$IFDEF SUPPORTS_GENERICS}{$JPPDEFINE KEYGENERIC}{$JPPDEFINE VALUEGENERIC}{$JPPUNDEF KEYREFCOUNTED}{$JPPUNDEF VALUEREFCOUNTED}{$JPPUNDEF KEYZEROINIT}{$JPPUNDEF VALUEZEROINIT}
//DOM-IGNORE-BEGIN
- (*$JPPEXPANDMACRO JCLSORTEDMAPTYPESINT(TJclSortedEntry<TKey\,TValue>,TJclSortedEntryArray<TKey\,TValue>,TKey,TValue)*)
+ TJclSortedEntry<TKey,TValue> = record
+ Key: TKey;
+ Value: TValue;
+ end;
(*$JPPEXPANDMACRO JCLSORTEDMAPINT(TSortedEntry,TSortedEntryArray,TJclSortedMap<TKey\,TValue>,TJclAbstractContainerBase,IJclMap<TKey\,TValue>,IJclSortedMap<TKey\,TValue>,IJclSet<TKey>,IJclCollection<TValue>, IJclPairOwner<TKey\,TValue>\,,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-03-02 06:30:17
|
Revision: 3754
http://jcl.svn.sourceforge.net/jcl/?rev=3754&view=rev
Author: outchy
Date: 2012-03-02 06:30:10 +0000 (Fri, 02 Mar 2012)
Log Message:
-----------
remove BOM from revision 3753.
Revision Links:
--------------
http://jcl.svn.sourceforge.net/jcl/?rev=3753&view=rev
Modified Paths:
--------------
trunk/jcl/source/common/JclDevToolsResources.pas
trunk/jcl/source/common/JclIDEUtils.pas
Modified: trunk/jcl/source/common/JclDevToolsResources.pas
===================================================================
--- trunk/jcl/source/common/JclDevToolsResources.pas 2012-03-01 15:04:15 UTC (rev 3753)
+++ trunk/jcl/source/common/JclDevToolsResources.pas 2012-03-02 06:30:10 UTC (rev 3754)
@@ -1,4 +1,4 @@
-{**************************************************************************************************}
+{**************************************************************************************************}
{ }
{ Project JEDI Code Library (JCL) }
{ }
Modified: trunk/jcl/source/common/JclIDEUtils.pas
===================================================================
--- trunk/jcl/source/common/JclIDEUtils.pas 2012-03-01 15:04:15 UTC (rev 3753)
+++ trunk/jcl/source/common/JclIDEUtils.pas 2012-03-02 06:30:10 UTC (rev 3754)
@@ -1,4 +1,4 @@
-{**************************************************************************************************}
+{**************************************************************************************************}
{ }
{ Project JEDI Code Library (JCL) }
{ }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ob...@us...> - 2012-03-01 15:04:26
|
Revision: 3753
http://jcl.svn.sourceforge.net/jcl/?rev=3753&view=rev
Author: obones
Date: 2012-03-01 15:04:15 +0000 (Thu, 01 Mar 2012)
Log Message:
-----------
More informative error message
Modified Paths:
--------------
trunk/jcl/source/common/JclDevToolsResources.pas
trunk/jcl/source/common/JclIDEUtils.pas
Modified: trunk/jcl/source/common/JclDevToolsResources.pas
===================================================================
--- trunk/jcl/source/common/JclDevToolsResources.pas 2012-02-29 21:14:28 UTC (rev 3752)
+++ trunk/jcl/source/common/JclDevToolsResources.pas 2012-03-01 15:04:15 UTC (rev 3753)
@@ -1,4 +1,4 @@
-{**************************************************************************************************}
+{**************************************************************************************************}
{ }
{ Project JEDI Code Library (JCL) }
{ }
@@ -133,7 +133,7 @@
{$IFDEF MSWINDOWS}
RsENoOpenHelp = 'open help not present in Borland Developer Studio';
{$ENDIF MSWINDOWS}
- RsERsVars = 'Query of RsVars reported the following error "%s"';
+ RsERsVars = 'Query of RsVars for %s %d reported the following error "%s"';
//=== JclMsBuild.pas =========================================================
resourcestring
Modified: trunk/jcl/source/common/JclIDEUtils.pas
===================================================================
--- trunk/jcl/source/common/JclIDEUtils.pas 2012-02-29 21:14:28 UTC (rev 3752)
+++ trunk/jcl/source/common/JclIDEUtils.pas 2012-03-01 15:04:15 UTC (rev 3753)
@@ -1,4 +1,4 @@
-{**************************************************************************************************}
+{**************************************************************************************************}
{ }
{ Project JEDI Code Library (JCL) }
{ }
@@ -647,7 +647,8 @@
class function GetDefaultProjectsDirectory(const RootDir: string; IDEVersionNumber: Integer): string;
class function GetCommonProjectsDirectory(const RootDir: string; IDEVersionNumber: Integer): string;
class procedure GetRsVars(const RootDir: string; IDEVersionNumber: Integer; Variables: TStrings);
- {class }function RadToolName: string; override;
+ {class }function RadToolName: string; overload; override;
+ class function RadToolName(IDEVersionNumber: Integer): string; reintroduce; overload;
function AddToCppSearchPath(const Path: string; APlatform: TJclBDSPlatform): Boolean;
function AddToCppBrowsingPath(const Path: string; APlatform: TJclBDSPlatform): Boolean;
@@ -3695,7 +3696,7 @@
[ComSpec, ExtractShortPathName(RootDir), DirDelimiter, DirDelimiter]), RsVarsOutput, RsVarsError) = 0) then
Variables.Text := RsVarsOutput
else
- raise EJclBorRADException.CreateResFmt(@RsERsVars, [RsVarsError]);
+ raise EJclBorRADException.CreateResFmt(@RsERsVars, [RadToolName(IDEVersionNumber), IDEVersionNumber, RsVarsError]);
end;
end;
@@ -3971,12 +3972,21 @@
Result := brBorlandDevStudio;
end;
+class function TJclBDSInstallation.RadToolName(
+ IDEVersionNumber: Integer): string;
+begin
+ if IDEVersionNumber in [Low(BDSVersions)..High(BDSVersions)] then
+ Result := LoadResString(BDSVersions[IDEVersionNumber].Name)
+ else
+ Result := LoadResString(@RsBDSName);
+end;
+
function TJclBDSInstallation.RadToolName: string;
begin
// The name comes from IDEVersionNumber
+ Result := RadToolName(IDEVersionNumber);
if IDEVersionNumber in [Low(BDSVersions)..High(BDSVersions)] then
begin
- Result := LoadResString(BDSVersions[IDEVersionNumber].Name);
// IDE Version 5 comes in three flavors:
// - Delphi only (Spacely)
// - C++Builder only (Cogswell)
@@ -3986,9 +3996,7 @@
else
if (IDEVersionNumber = 5) and (Personalities = [bpBCBuilder32]) then
Result := LoadResString(@RsBCBName);
- end
- else
- Result := LoadResString(@RsBDSName);
+ end;
end;
function TJclBDSInstallation.RegisterPackage(const BinaryFileName, Description: string): Boolean;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ob...@us...> - 2012-02-29 21:14:39
|
Revision: 3752
http://jcl.svn.sourceforge.net/jcl/?rev=3752&view=rev
Author: obones
Date: 2012-02-29 21:14:28 +0000 (Wed, 29 Feb 2012)
Log Message:
-----------
Warning about BPL folder not in PATH causing problem in IDE is only valid for 32bits are the IDEs are all 32bits.
Modified Paths:
--------------
trunk/jcl/install/JclInstall.pas
Modified: trunk/jcl/install/JclInstall.pas
===================================================================
--- trunk/jcl/install/JclInstall.pas 2012-02-28 09:33:10 UTC (rev 3751)
+++ trunk/jcl/install/JclInstall.pas 2012-02-29 21:14:28 UTC (rev 3752)
@@ -1676,7 +1676,7 @@
PathListIncludeItems(PathEnvVar, RegReadStringDef(HKLM, RegHKLMEnvironmentVar, PathEnvironmentVar, ''));
ExpandEnvironmentVar(PathEnvVar);
if (PathListItemIndex(PathEnvVar, GetBplPath) = -1) and (PathListItemIndex(PathEnvVar, PathAddSeparator(GetBplPath)) = -1)
- and Assigned(GUI) and (GUI.Dialog(LoadResString(@RsWarningAddPathToEnvironment), dtWarning, [drYes, drNo]) = drYes) then
+ and Assigned(GUI) and (FTargetPlatform = bpWin32) and (GUI.Dialog(LoadResString(@RsWarningAddPathToEnvironment), dtWarning, [drYes, drNo]) = drYes) then
begin
PathEnvVar := RegReadStringDef(ATarget.RootKey, RegHKCUEnvironmentVar, PathEnvironmentVar, '');
PathListIncludeItems(PathEnvVar, GetBplPath);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ob...@us...> - 2012-02-28 09:33:17
|
Revision: 3751
http://jcl.svn.sourceforge.net/jcl/?rev=3751&view=rev
Author: obones
Date: 2012-02-28 09:33:10 +0000 (Tue, 28 Feb 2012)
Log Message:
-----------
Must store the given SimpleXML into the appropriate field.
Modified Paths:
--------------
trunk/jcl/source/common/JclSimpleXml.pas
Modified: trunk/jcl/source/common/JclSimpleXml.pas
===================================================================
--- trunk/jcl/source/common/JclSimpleXml.pas 2012-02-28 09:17:14 UTC (rev 3750)
+++ trunk/jcl/source/common/JclSimpleXml.pas 2012-02-28 09:33:10 UTC (rev 3751)
@@ -3702,9 +3702,10 @@
//=== { TJclSimpleXMLElemsProlog } ===========================================
-constructor TJclSimpleXMLElemsProlog.Create;
+constructor TJclSimpleXMLElemsProlog.Create(ASimpleXML: TJclSimpleXML);
begin
inherited Create;
+ FSimpleXML := ASimpleXML;
FElems := THashedStringList.Create;
end;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ob...@us...> - 2012-02-28 09:17:25
|
Revision: 3750
http://jcl.svn.sourceforge.net/jcl/?rev=3750&view=rev
Author: obones
Date: 2012-02-28 09:17:14 +0000 (Tue, 28 Feb 2012)
Log Message:
-----------
Mantis 5218 : TJclSimpleXMLElemHeader needs a default name or it would generate invalid XML
Modified Paths:
--------------
trunk/jcl/source/common/JclSimpleXml.pas
Modified: trunk/jcl/source/common/JclSimpleXml.pas
===================================================================
--- trunk/jcl/source/common/JclSimpleXml.pas 2012-02-25 20:11:21 UTC (rev 3749)
+++ trunk/jcl/source/common/JclSimpleXml.pas 2012-02-28 09:17:14 UTC (rev 3750)
@@ -79,7 +79,7 @@
function GetIntValue: Int64;
procedure SetIntValue(const Value: Int64);
public
- constructor Create; overload;
+ constructor Create; overload; virtual;
constructor Create(const AName: string); overload;
constructor Create(const AName, AValue: string); overload;
property Name: string read FName write SetName;
@@ -482,6 +482,8 @@
procedure SetStandalone(const Value: Boolean);
procedure SetVersion(const Value: string);
public
+ constructor Create; override;
+
procedure LoadFromStringStream(StringStream: TJclStringStream); override;
procedure SaveToStringStream(StringStream: TJclStringStream; const Level: string = ''); override;
property Version: string read GetVersion write SetVersion;
@@ -1460,7 +1462,7 @@
constructor TJclSimpleXMLElem.Create(ASimpleXML: TJclSimpleXML);
begin
- inherited Create;
+ Create;
FSimpleXML := ASimpleXML;
end;
@@ -3472,6 +3474,13 @@
//=== { TJclSimpleXMLElemHeader } ============================================
+constructor TJclSimpleXMLElemHeader.Create;
+begin
+ inherited Create;
+
+ Name := 'xml';
+end;
+
function TJclSimpleXMLElemHeader.GetEncoding: string;
var
ASimpleXML: TJclSimpleXML;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-02-25 20:11:27
|
Revision: 3749
http://jcl.svn.sourceforge.net/jcl/?rev=3749&view=rev
Author: outchy
Date: 2012-02-25 20:11:21 +0000 (Sat, 25 Feb 2012)
Log Message:
-----------
Mantis 5809: Msbuild is missing properties from RsVars.bat
Modified Paths:
--------------
trunk/jcl/source/common/JclDevToolsResources.pas
trunk/jcl/source/common/JclIDEUtils.pas
Modified: trunk/jcl/source/common/JclDevToolsResources.pas
===================================================================
--- trunk/jcl/source/common/JclDevToolsResources.pas 2012-02-25 17:14:29 UTC (rev 3748)
+++ trunk/jcl/source/common/JclDevToolsResources.pas 2012-02-25 20:11:21 UTC (rev 3749)
@@ -38,7 +38,7 @@
{ }
{**************************************************************************************************}
{ }
-{ Last modified: $Date:: $ }
+{ Last modified: $Date:: $ }
{ Revision: $Rev:: $ }
{ Author: $Author:: $ }
{ }
@@ -133,6 +133,7 @@
{$IFDEF MSWINDOWS}
RsENoOpenHelp = 'open help not present in Borland Developer Studio';
{$ENDIF MSWINDOWS}
+ RsERsVars = 'Query of RsVars reported the following error "%s"';
//=== JclMsBuild.pas =========================================================
resourcestring
Modified: trunk/jcl/source/common/JclIDEUtils.pas
===================================================================
--- trunk/jcl/source/common/JclIDEUtils.pas 2012-02-25 17:14:29 UTC (rev 3748)
+++ trunk/jcl/source/common/JclIDEUtils.pas 2012-02-25 20:11:21 UTC (rev 3749)
@@ -47,7 +47,7 @@
{ }
{**************************************************************************************************}
{ }
-{ Last modified: $Date:: $ }
+{ Last modified: $Date:: $ }
{ Revision: $Rev:: $ }
{ Author: $Author:: $ }
{ }
@@ -646,6 +646,7 @@
function GetCommonProjectsDir: string; override;
class function GetDefaultProjectsDirectory(const RootDir: string; IDEVersionNumber: Integer): string;
class function GetCommonProjectsDirectory(const RootDir: string; IDEVersionNumber: Integer): string;
+ class procedure GetRsVars(const RootDir: string; IDEVersionNumber: Integer; Variables: TStrings);
{class }function RadToolName: string; override;
function AddToCppSearchPath(const Path: string; APlatform: TJclBDSPlatform): Boolean;
@@ -3455,23 +3456,18 @@
class function TJclBDSInstallation.GetCommonProjectsDirectory(const RootDir: string;
IDEVersionNumber: Integer): string;
var
- RsVarsOutput, ComSpec: string;
- Lines: TStrings;
+ Variables: TStrings;
begin
if IDEVersionNumber >= 5 then
begin
Result := '';
- RsVarsOutput := '';
- if GetEnvironmentVar('COMSPEC', ComSpec) and (JclSysUtils.Execute(Format('%s /C "%s%sbin%srsvars.bat && set BDS"',
- [ComSpec, ExtractShortPathName(RootDir), DirDelimiter, DirDelimiter]), RsVarsOutput) = 0) then
- begin
- Lines := TStringList.Create;
- try
- Lines.Text := RsVarsOutput;
- Result := Lines.Values[EnvVariableBDSCOMDIRValueName];
- finally
- Lines.Free;
- end;
+
+ Variables := TStringList.Create;
+ try
+ GetRsVars(RootDir, IDEVersionNumber, Variables);
+ Result := Variables.Values[EnvVariableBDSCOMDIRValueName];
+ finally
+ Variables.Free;
end;
if Result = '' then
@@ -3687,6 +3683,22 @@
end;
end;
+class procedure TJclBDSInstallation.GetRsVars(const RootDir: string; IDEVersionNumber: Integer; Variables: TStrings);
+var
+ RsVarsOutput, ComSpec, RsVarsError: string;
+begin
+ if IDEVersionNumber >= 5 then
+ begin
+ RsVarsOutput := '';
+ RsVarsError := '';
+ if GetEnvironmentVar('COMSPEC', ComSpec) and (JclSysUtils.Execute(Format('%s /C "%s%sbin%srsvars.bat && set"',
+ [ComSpec, ExtractShortPathName(RootDir), DirDelimiter, DirDelimiter]), RsVarsOutput, RsVarsError) = 0) then
+ Variables.Text := RsVarsOutput
+ else
+ raise EJclBorRADException.CreateResFmt(@RsERsVars, [RsVarsError]);
+ end;
+end;
+
function TJclBDSInstallation.GetValid: Boolean;
begin
Result := (inherited GetValid) and ((IDEVersionNumber < 5) or FileExists(GetMsBuildEnvOptionsFileName));
@@ -3756,7 +3768,9 @@
function TJclBDSInstallation.GetMsBuildEnvOption(const OptionName: string; APlatform: TJclBDSPlatform; Raw: Boolean): string;
var
EnvOptions: TJclMsBuildParser;
- MsBuildEnvironmentFileName: string;
+ MsBuildEnvironmentFileName, EnvOptionName: string;
+ Variables: TStrings;
+ Index: Integer;
begin
Result := '';
@@ -3768,6 +3782,20 @@
EnvOptions := TJclMsBuildParser.Create(GetMsBuildEnvOptionsFileName);
try
EnvOptions.Init;
+
+ // add custom "environment" variables
+ Variables := TStringList.Create;
+ try
+ GetRsVars(RootDir, IDEVersionNumber, Variables);
+ for Index := 0 to Variables.Count - 1 do
+ begin
+ EnvOptionName := Variables.Names[Index];
+ EnvOptions.Properties.EnvironmentProperties.Values[EnvOptionName] := Variables.Values[EnvOptionName];
+ end;
+ finally
+ Variables.Free;
+ end;
+
if SupportsPlatform then
EnvOptions.Properties.GlobalProperties.Values['Platform'] := GetBDSPlatformStr(APlatform);
EnvOptions.Parse;
@@ -4036,13 +4064,29 @@
procedure TJclBDSInstallation.SetMsBuildEnvOption(const OptionName, Value: string; APlatform: TJclBDSPlatform);
var
- EnvOptionsFileName, BakEnvOptionsFileName: string;
+ EnvOptionsFileName, BakEnvOptionsFileName, EnvOptionName: string;
EnvOptions: TJclMsBuildParser;
+ Variables: TStrings;
+ Index: Integer;
begin
EnvOptionsFileName := GetMsBuildEnvOptionsFileName;
EnvOptions := TJclMsBuildParser.Create(EnvOptionsFileName);
try
EnvOptions.Init;
+
+ // add custom "environment" variables
+ Variables := TStringList.Create;
+ try
+ GetRsVars(RootDir, IDEVersionNumber, Variables);
+ for Index := 0 to Variables.Count - 1 do
+ begin
+ EnvOptionName := Variables.Names[Index];
+ EnvOptions.Properties.EnvironmentProperties.Values[EnvOptionName] := Variables.Values[EnvOptionName];
+ end;
+ finally
+ Variables.Free;
+ end;
+
if SupportsPlatform then
EnvOptions.Properties.GlobalProperties.Values['Platform'] := GetBDSPlatformStr(APlatform);
EnvOptions.Parse;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-02-25 17:14:35
|
Revision: 3748
http://jcl.svn.sourceforge.net/jcl/?rev=3748&view=rev
Author: outchy
Date: 2012-02-25 17:14:29 +0000 (Sat, 25 Feb 2012)
Log Message:
-----------
minor update of CPUID spec for Intel processors.
Modified Paths:
--------------
trunk/jcl/source/common/JclSysInfo.pas
Modified: trunk/jcl/source/common/JclSysInfo.pas
===================================================================
--- trunk/jcl/source/common/JclSysInfo.pas 2012-02-24 11:27:42 UTC (rev 3747)
+++ trunk/jcl/source/common/JclSysInfo.pas 2012-02-25 17:14:29 UTC (rev 3748)
@@ -635,7 +635,7 @@
EINTEL_OSXSAVE = BIT_27; // OS has enabled features present in EINTEL_XSAVE
EINTEL_AVX = BIT_28; // Advanced Vector Extensions
EINTEL_BIT_29 = BIT_29; // Reserved, do not count on value
- EINTEL_BIT_30 = BIT_30; // Reserved, do not count on value
+ EINTEL_RDRAND = BIT_30; // the processor supports the RDRAND instruction.
EINTEL_BIT_31 = BIT_31; // Always return 0
{ Extended Intel 64 Bits Feature Flags }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-02-24 11:27:51
|
Revision: 3747
http://jcl.svn.sourceforge.net/jcl/?rev=3747&view=rev
Author: outchy
Date: 2012-02-24 11:27:42 +0000 (Fri, 24 Feb 2012)
Log Message:
-----------
JclHashMaps and JclSortedMaps rework: MoveArray procedures are now generated from JclAlgorithms prototypes.
Modified Paths:
--------------
trunk/jcl/source/common/JclHashMaps.pas
trunk/jcl/source/common/JclPreProcessorContainerKnownMaps.pas
trunk/jcl/source/common/JclPreProcessorContainerTypes.pas
trunk/jcl/source/common/JclPreProcessorHashMapsTemplates.pas
trunk/jcl/source/common/JclPreProcessorSortedMapsTemplates.pas
trunk/jcl/source/common/JclSortedMaps.pas
trunk/jcl/source/prototypes/JclHashMaps.pas
trunk/jcl/source/prototypes/JclSortedMaps.pas
trunk/jcl/source/prototypes/containers/JclHashMaps.imp
trunk/jcl/source/prototypes/containers/JclHashMaps.int
trunk/jcl/source/prototypes/containers/JclSortedMaps.imp
trunk/jcl/source/prototypes/containers/JclSortedMaps.int
Modified: trunk/jcl/source/common/JclHashMaps.pas
===================================================================
--- trunk/jcl/source/common/JclHashMaps.pas 2012-02-24 11:23:03 UTC (rev 3746)
+++ trunk/jcl/source/common/JclHashMaps.pas 2012-02-24 11:27:42 UTC (rev 3747)
@@ -61,11 +61,20 @@
Value: IInterface;
end;
+ TJclIntfIntfHashMapEntryArray = array of TJclIntfIntfHashMapEntry;
+
TJclIntfIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfIntfHashMap = class(TJclIntfAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -112,11 +121,20 @@
Value: IInterface;
end;
+ TJclAnsiStrIntfHashMapEntryArray = array of TJclAnsiStrIntfHashMapEntry;
+
TJclAnsiStrIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclAnsiStrIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclAnsiStrIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclAnsiStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclAnsiStrIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclAnsiStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclAnsiStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclAnsiStrIntfHashMap = class(TJclAnsiStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -163,11 +181,20 @@
Value: AnsiString;
end;
+ TJclIntfAnsiStrHashMapEntryArray = array of TJclIntfAnsiStrHashMapEntry;
+
TJclIntfAnsiStrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfAnsiStrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfAnsiStrHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfAnsiStrHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfAnsiStrHashMap = class(TJclAnsiStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -215,11 +242,20 @@
Value: AnsiString;
end;
+ TJclAnsiStrAnsiStrHashMapEntryArray = array of TJclAnsiStrAnsiStrHashMapEntry;
+
TJclAnsiStrAnsiStrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclAnsiStrAnsiStrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclAnsiStrAnsiStrHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclAnsiStrAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclAnsiStrAnsiStrHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclAnsiStrAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclAnsiStrAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclAnsiStrAnsiStrHashMap = class(TJclAnsiStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -266,11 +302,20 @@
Value: IInterface;
end;
+ TJclWideStrIntfHashMapEntryArray = array of TJclWideStrIntfHashMapEntry;
+
TJclWideStrIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclWideStrIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclWideStrIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclWideStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclWideStrIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclWideStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclWideStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclWideStrIntfHashMap = class(TJclWideStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -317,11 +362,20 @@
Value: WideString;
end;
+ TJclIntfWideStrHashMapEntryArray = array of TJclIntfWideStrHashMapEntry;
+
TJclIntfWideStrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfWideStrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfWideStrHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfWideStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfWideStrHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfWideStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfWideStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfWideStrHashMap = class(TJclWideStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -369,11 +423,20 @@
Value: WideString;
end;
+ TJclWideStrWideStrHashMapEntryArray = array of TJclWideStrWideStrHashMapEntry;
+
TJclWideStrWideStrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclWideStrWideStrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclWideStrWideStrHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclWideStrWideStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclWideStrWideStrHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclWideStrWideStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclWideStrWideStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclWideStrWideStrHashMap = class(TJclWideStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -421,11 +484,20 @@
Value: IInterface;
end;
+ TJclUnicodeStrIntfHashMapEntryArray = array of TJclUnicodeStrIntfHashMapEntry;
+
TJclUnicodeStrIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclUnicodeStrIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclUnicodeStrIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclUnicodeStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclUnicodeStrIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclUnicodeStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclUnicodeStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
{$ENDIF SUPPORTS_UNICODE_STRING}
@@ -476,11 +548,20 @@
Value: UnicodeString;
end;
+ TJclIntfUnicodeStrHashMapEntryArray = array of TJclIntfUnicodeStrHashMapEntry;
+
TJclIntfUnicodeStrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfUnicodeStrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfUnicodeStrHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfUnicodeStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfUnicodeStrHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfUnicodeStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfUnicodeStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
{$ENDIF SUPPORTS_UNICODE_STRING}
@@ -532,11 +613,20 @@
Value: UnicodeString;
end;
+ TJclUnicodeStrUnicodeStrHashMapEntryArray = array of TJclUnicodeStrUnicodeStrHashMapEntry;
+
TJclUnicodeStrUnicodeStrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclUnicodeStrUnicodeStrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclUnicodeStrUnicodeStrHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclUnicodeStrUnicodeStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclUnicodeStrUnicodeStrHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclUnicodeStrUnicodeStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclUnicodeStrUnicodeStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
{$ENDIF SUPPORTS_UNICODE_STRING}
@@ -655,11 +745,20 @@
Value: IInterface;
end;
+ TJclSingleIntfHashMapEntryArray = array of TJclSingleIntfHashMapEntry;
+
TJclSingleIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclSingleIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclSingleIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclSingleIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclSingleIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclSingleIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclSingleIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclSingleIntfHashMap = class(TJclSingleAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -706,11 +805,20 @@
Value: Single;
end;
+ TJclIntfSingleHashMapEntryArray = array of TJclIntfSingleHashMapEntry;
+
TJclIntfSingleHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfSingleHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfSingleHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfSingleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfSingleHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfSingleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfSingleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfSingleHashMap = class(TJclSingleAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -758,11 +866,15 @@
Value: Single;
end;
+ TJclSingleSingleHashMapEntryArray = array of TJclSingleSingleHashMapEntry;
+
TJclSingleSingleHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclSingleSingleHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclSingleSingleHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclSingleSingleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclSingleSingleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclSingleSingleHashMap = class(TJclSingleAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -809,11 +921,20 @@
Value: IInterface;
end;
+ TJclDoubleIntfHashMapEntryArray = array of TJclDoubleIntfHashMapEntry;
+
TJclDoubleIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclDoubleIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclDoubleIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclDoubleIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclDoubleIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclDoubleIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclDoubleIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclDoubleIntfHashMap = class(TJclDoubleAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -860,11 +981,20 @@
Value: Double;
end;
+ TJclIntfDoubleHashMapEntryArray = array of TJclIntfDoubleHashMapEntry;
+
TJclIntfDoubleHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfDoubleHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfDoubleHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfDoubleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfDoubleHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfDoubleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfDoubleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfDoubleHashMap = class(TJclDoubleAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -912,11 +1042,15 @@
Value: Double;
end;
+ TJclDoubleDoubleHashMapEntryArray = array of TJclDoubleDoubleHashMapEntry;
+
TJclDoubleDoubleHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclDoubleDoubleHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclDoubleDoubleHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclDoubleDoubleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclDoubleDoubleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclDoubleDoubleHashMap = class(TJclDoubleAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -963,11 +1097,20 @@
Value: IInterface;
end;
+ TJclExtendedIntfHashMapEntryArray = array of TJclExtendedIntfHashMapEntry;
+
TJclExtendedIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclExtendedIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclExtendedIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclExtendedIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclExtendedIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclExtendedIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclExtendedIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclExtendedIntfHashMap = class(TJclExtendedAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1014,11 +1157,20 @@
Value: Extended;
end;
+ TJclIntfExtendedHashMapEntryArray = array of TJclIntfExtendedHashMapEntry;
+
TJclIntfExtendedHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfExtendedHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfExtendedHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfExtendedHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfExtendedHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfExtendedHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfExtendedHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfExtendedHashMap = class(TJclExtendedAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1066,11 +1218,15 @@
Value: Extended;
end;
+ TJclExtendedExtendedHashMapEntryArray = array of TJclExtendedExtendedHashMapEntry;
+
TJclExtendedExtendedHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclExtendedExtendedHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclExtendedExtendedHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclExtendedExtendedHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclExtendedExtendedHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclExtendedExtendedHashMap = class(TJclExtendedAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1186,11 +1342,20 @@
Value: IInterface;
end;
+ TJclIntegerIntfHashMapEntryArray = array of TJclIntegerIntfHashMapEntry;
+
TJclIntegerIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntegerIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntegerIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntegerIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntegerIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntegerIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntegerIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntegerIntfHashMap = class(TJclIntegerAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1237,11 +1402,20 @@
Value: Integer;
end;
+ TJclIntfIntegerHashMapEntryArray = array of TJclIntfIntegerHashMapEntry;
+
TJclIntfIntegerHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfIntegerHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfIntegerHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfIntegerHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfIntegerHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfIntegerHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfIntegerHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfIntegerHashMap = class(TJclIntegerAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1289,11 +1463,15 @@
Value: Integer;
end;
+ TJclIntegerIntegerHashMapEntryArray = array of TJclIntegerIntegerHashMapEntry;
+
TJclIntegerIntegerHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntegerIntegerHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntegerIntegerHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclIntegerIntegerHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclIntegerIntegerHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntegerIntegerHashMap = class(TJclIntegerAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1340,11 +1518,20 @@
Value: IInterface;
end;
+ TJclCardinalIntfHashMapEntryArray = array of TJclCardinalIntfHashMapEntry;
+
TJclCardinalIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclCardinalIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclCardinalIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclCardinalIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclCardinalIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclCardinalIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclCardinalIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclCardinalIntfHashMap = class(TJclCardinalAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1391,11 +1578,20 @@
Value: Cardinal;
end;
+ TJclIntfCardinalHashMapEntryArray = array of TJclIntfCardinalHashMapEntry;
+
TJclIntfCardinalHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfCardinalHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfCardinalHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfCardinalHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfCardinalHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfCardinalHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfCardinalHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfCardinalHashMap = class(TJclCardinalAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1443,11 +1639,15 @@
Value: Cardinal;
end;
+ TJclCardinalCardinalHashMapEntryArray = array of TJclCardinalCardinalHashMapEntry;
+
TJclCardinalCardinalHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclCardinalCardinalHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclCardinalCardinalHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclCardinalCardinalHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclCardinalCardinalHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclCardinalCardinalHashMap = class(TJclCardinalAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1494,11 +1694,20 @@
Value: IInterface;
end;
+ TJclInt64IntfHashMapEntryArray = array of TJclInt64IntfHashMapEntry;
+
TJclInt64IntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclInt64IntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclInt64IntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclInt64IntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclInt64IntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclInt64IntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclInt64IntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclInt64IntfHashMap = class(TJclInt64AbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1545,11 +1754,20 @@
Value: Int64;
end;
+ TJclIntfInt64HashMapEntryArray = array of TJclIntfInt64HashMapEntry;
+
TJclIntfInt64HashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfInt64HashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfInt64HashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfInt64HashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfInt64HashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfInt64HashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfInt64HashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfInt64HashMap = class(TJclInt64AbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1597,11 +1815,15 @@
Value: Int64;
end;
+ TJclInt64Int64HashMapEntryArray = array of TJclInt64Int64HashMapEntry;
+
TJclInt64Int64HashMapBucket = class
public
Size: Integer;
- Entries: array of TJclInt64Int64HashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclInt64Int64HashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclInt64Int64HashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclInt64Int64HashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclInt64Int64HashMap = class(TJclInt64AbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1648,11 +1870,20 @@
Value: IInterface;
end;
+ TJclPtrIntfHashMapEntryArray = array of TJclPtrIntfHashMapEntry;
+
TJclPtrIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclPtrIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclPtrIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclPtrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclPtrIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclPtrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclPtrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclPtrIntfHashMap = class(TJclPtrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1699,11 +1930,20 @@
Value: Pointer;
end;
+ TJclIntfPtrHashMapEntryArray = array of TJclIntfPtrHashMapEntry;
+
TJclIntfPtrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfPtrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfPtrHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfPtrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfPtrHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfPtrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfPtrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfPtrHashMap = class(TJclPtrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1751,11 +1991,15 @@
Value: Pointer;
end;
+ TJclPtrPtrHashMapEntryArray = array of TJclPtrPtrHashMapEntry;
+
TJclPtrPtrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclPtrPtrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclPtrPtrHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclPtrPtrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclPtrPtrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclPtrPtrHashMap = class(TJclPtrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1802,11 +2046,20 @@
Value: TObject;
end;
+ TJclIntfHashMapEntryArray = array of TJclIntfHashMapEntry;
+
TJclIntfHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntfHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntfHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntfHashMap = class(TJclIntfAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1859,11 +2112,20 @@
Value: TObject;
end;
+ TJclAnsiStrHashMapEntryArray = array of TJclAnsiStrHashMapEntry;
+
TJclAnsiStrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclAnsiStrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclAnsiStrHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclAnsiStrHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclAnsiStrHashMap = class(TJclAnsiStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1916,11 +2178,20 @@
Value: TObject;
end;
+ TJclWideStrHashMapEntryArray = array of TJclWideStrHashMapEntry;
+
TJclWideStrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclWideStrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclWideStrHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclWideStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclWideStrHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclWideStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclWideStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclWideStrHashMap = class(TJclWideStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -1974,11 +2245,20 @@
Value: TObject;
end;
+ TJclUnicodeStrHashMapEntryArray = array of TJclUnicodeStrHashMapEntry;
+
TJclUnicodeStrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclUnicodeStrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclUnicodeStrHashMapEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: TJclUnicodeStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: TJclUnicodeStrHashMapEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: TJclUnicodeStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: TJclUnicodeStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
{$ENDIF SUPPORTS_UNICODE_STRING}
@@ -2057,11 +2337,15 @@
Value: TObject;
end;
+ TJclSingleHashMapEntryArray = array of TJclSingleHashMapEntry;
+
TJclSingleHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclSingleHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclSingleHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclSingleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclSingleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclSingleHashMap = class(TJclSingleAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -2114,11 +2398,15 @@
Value: TObject;
end;
+ TJclDoubleHashMapEntryArray = array of TJclDoubleHashMapEntry;
+
TJclDoubleHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclDoubleHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclDoubleHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclDoubleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclDoubleHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclDoubleHashMap = class(TJclDoubleAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -2171,11 +2459,15 @@
Value: TObject;
end;
+ TJclExtendedHashMapEntryArray = array of TJclExtendedHashMapEntry;
+
TJclExtendedHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclExtendedHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclExtendedHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclExtendedHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclExtendedHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclExtendedHashMap = class(TJclExtendedAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -2251,11 +2543,15 @@
Value: TObject;
end;
+ TJclIntegerHashMapEntryArray = array of TJclIntegerHashMapEntry;
+
TJclIntegerHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclIntegerHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclIntegerHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclIntegerHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclIntegerHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclIntegerHashMap = class(TJclIntegerAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -2308,11 +2604,15 @@
Value: TObject;
end;
+ TJclCardinalHashMapEntryArray = array of TJclCardinalHashMapEntry;
+
TJclCardinalHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclCardinalHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclCardinalHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclCardinalHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclCardinalHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclCardinalHashMap = class(TJclCardinalAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -2365,11 +2665,15 @@
Value: TObject;
end;
+ TJclInt64HashMapEntryArray = array of TJclInt64HashMapEntry;
+
TJclInt64HashMapBucket = class
public
Size: Integer;
- Entries: array of TJclInt64HashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclInt64HashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclInt64HashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclInt64HashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclInt64HashMap = class(TJclInt64AbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -2422,11 +2726,15 @@
Value: TObject;
end;
+ TJclPtrHashMapEntryArray = array of TJclPtrHashMapEntry;
+
TJclPtrHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclPtrHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclPtrHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclPtrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclPtrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclPtrHashMap = class(TJclPtrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -2479,11 +2787,15 @@
Value: TObject;
end;
+ TJclHashMapEntryArray = array of TJclHashMapEntry;
+
TJclHashMapBucket = class
public
Size: Integer;
- Entries: array of TJclHashMapEntry;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: TJclHashMapEntryArray;
+ procedure InitializeArrayAfterMove(var List: TJclHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure MoveArray(var List: TJclHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclHashMap = class(TJclAbstractContainerBase, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -2545,11 +2857,23 @@
Value: TValue;
end;
+ TJclHashEntryArray<TKey,TValue> = array of TJclHashEntry<TKey,TValue>;
+
TJclBucket<TKey,TValue> = class
public
+ type
+ THashEntryArray = TJclHashEntryArray<TKey,TValue>;
+ public
Size: Integer;
- Entries: array of TJclHashEntry<TKey,TValue>;
- procedure MoveArray(FromIndex, ToIndex, Count: Integer);
+ Entries: THashEntryArray;
+ procedure FinalizeArrayBeforeMove(var List: THashEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArray(var List: THashEntryArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ procedure InitializeArrayAfterMove(var List: THashEntryArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
+ procedure MoveArray(var List: THashEntryArray; FromIndex, ToIndex, Count: SizeInt);
end;
TJclHashMap<TKey,TValue> = class(TJclAbstractContainerBase, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -2715,30 +3039,68 @@
//=== { TJclIntfIntfHashMapBucket } ==========================================
-procedure TJclIntfIntfHashMapBucket.MoveArray(FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfIntfHashMapBucket.FinalizeArrayBeforeMove(var List: TJclIntfIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
begin
- if Count > 0 then
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Move(Entries[FromIndex], Entries[ToIndex], Count * SizeOf(Entries[0]));
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- FillChar(Entries[FromIndex], (ToIndex - FromIndex) * SizeOf(Entries[0]), 0)
- else
- FillChar(Entries[FromIndex], Count * SizeOf(Entries[0]), 0);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(Entries[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(Entries[0]), 0)
- else
- FillChar(Entries[FromIndex], Count * SizeOf(Entries[0]), 0);
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
end;
+procedure TJclIntfIntfHashMapBucket.InitializeArray(var List: TJclIntfIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+begin
+ {$IFDEF FPC}
+ while Count > 0 do
+ begin
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
+ end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
+end;
+
+procedure TJclIntfIntfHashMapBucket.InitializeArrayAfterMove(var List: TJclIntfIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
+end;
+
+procedure TJclIntfIntfHashMapBucket.MoveArray(var List: TJclIntfIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+begin
+ if Count > 0 then
+ begin
+ FinalizeArrayBeforeMove(List, FromIndex, ToIndex, Count);
+ Move(List[FromIndex], List[ToIndex], Count * SizeOf(List[0]));
+ InitializeArrayAfterMove(List, FromIndex, ToIndex, Count);
+ end;
+end;
+
//=== { TJclIntfIntfHashMap } ==========================================
constructor TJclIntfIntfHashMap.Create(ACapacity: Integer);
@@ -2924,7 +3286,7 @@
Bucket.Entries[I].Value := nil;
FreeKey(Bucket.Entries[I].Key);
if I < Length(Bucket.Entries) - 1 then
- Bucket.MoveArray(I + 1, I, Bucket.Size - I - 1);
+ Bucket.MoveArray(Bucket.Entries, I + 1, I, Bucket.Size - I - 1);
Dec(Bucket.Size);
Dec(FSize);
Break;
@@ -3293,30 +3655,68 @@
//=== { TJclAnsiStrIntfHashMapBucket } ==========================================
-procedure TJclAnsiStrIntfHashMapBucket.MoveArray(FromIndex, ToIndex, Count: Integer);
+procedure TJclAnsiStrIntfHashMapBucket.FinalizeArrayBeforeMove(var List: TJclAnsiStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
begin
- if Count > 0 then
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Move(Entries[FromIndex], Entries[ToIndex], Count * SizeOf(Entries[0]));
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- FillChar(Entries[FromIndex], (ToIndex - FromIndex) * SizeOf(Entries[0]), 0)
- else
- FillChar(Entries[FromIndex], Count * SizeOf(Entries[0]), 0);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(Entries[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(Entries[0]), 0)
- else
- FillChar(Entries[FromIndex], Count * SizeOf(Entries[0]), 0);
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
end;
+procedure TJclAnsiStrIntfHashMapBucket.InitializeArray(var List: TJclAnsiStrIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+begin
+ {$IFDEF FPC}
+ while Count > 0 do
+ begin
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
+ end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
+end;
+
+procedure TJclAnsiStrIntfHashMapBucket.InitializeArrayAfterMove(var List: TJclAnsiStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
+end;
+
+procedure TJclAnsiStrIntfHashMapBucket.MoveArray(var List: TJclAnsiStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+begin
+ if Count > 0 then
+ begin
+ FinalizeArrayBeforeMove(List, FromIndex, ToIndex, Count);
+ Move(List[FromIndex], List[ToIndex], Count * SizeOf(List[0]));
+ InitializeArrayAfterMove(List, FromIndex, ToIndex, Count);
+ end;
+end;
+
//=== { TJclAnsiStrIntfHashMap } ==========================================
constructor TJclAnsiStrIntfHashMap.Create(ACapacity: Integer);
@@ -3502,7 +3902,7 @@
Bucket.Entries[I].Value := nil;
FreeKey(Bucket.Entries[I].Key);
if I < Length(Bucket.Entries) - 1 then
- Bucket.MoveArray(I + 1, I, Bucket.Size - I - 1);
+ Bucket.MoveArray(Bucket.Entries, I + 1, I, Bucket.Size - I - 1);
Dec(Bucket.Size);
Dec(FSize);
Break;
@@ -3871,30 +4271,68 @@
//=== { TJclIntfAnsiStrHashMapBucket } ==========================================
-procedure TJclIntfAnsiStrHashMapBucket.MoveArray(FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfAnsiStrHashMapBucket.FinalizeArrayBeforeMove(var List: TJclIntfAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
begin
- if Count > 0 then
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Move(Entries[FromIndex], Entries[ToIndex], Count * SizeOf(Entries[0]));
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- FillChar(Entries[FromIndex], (ToIndex - FromIndex) * SizeOf(Entries[0]), 0)
- else
- FillChar(Entries[FromIndex], Count * SizeOf(Entries[0]), 0);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(Entries[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(Entries[0]), 0)
- else
- FillChar(Entries[FromIndex], Count * SizeOf(Entries[0]), 0);
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
end;
+procedure TJclIntfAnsiStrHashMapBucket.InitializeArray(var List: TJclIntfAnsiStrHashMapEntryArray; FromIndex, Count: SizeInt);
+begin
+ {$IFDEF FPC}
+ while Count > 0 do
+ begin
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
+ end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
+end;
+
+procedure TJclIntfAnsiStrHashMapBucket.InitializeArrayAfterMove(var List: TJclIntfAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
+end;
+
+procedure TJclIntfAnsiStrHashMapBucket.MoveArray(var List: TJclIntfAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+begin
+ if Count > 0 then
+ begin
+ FinalizeArrayBeforeMove(List, FromIndex, ToIndex, Count);
+ Move(List[FromIndex], List[ToIndex], Count * SizeOf(List[0]));
+ InitializeArrayAfterMove(List, FromIndex, ToIndex, Count);
+ end;
+end;
+
//=== { TJclIntfAnsiStrHashMap } ==========================================
constructor TJclIntfAnsiStrHashMap.Create(ACapacity: Integer);
@@ -4080,7 +4518,7 @@
Bucket.Entries[I].Value := '';
FreeKey(Bucket.Entries[I].Key);
if I < Length(Bucket.Entries) - 1 then
- Bucket.MoveArray(I + 1, I, Bucket.Size - I - 1);
+ Bucket.MoveArray(Bucket.Entries, I + 1, I, Bucket.Size - I - 1);
Dec(Bucket.Size);
Dec(FSize);
Break;
@@ -4454,30 +4892,68 @@
//=== { TJclAnsiStrAnsiStrHashMapBucket } ==========================================
-procedure TJclAnsiStrAnsiStrHashMapBucket.MoveArray(FromIndex, ToIndex, Count: Integer);
+procedure TJclAnsiStrAnsiStrHashMapBucket.FinalizeArrayBeforeMove(var List: TJclAnsiStrAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
begin
- if Count > 0 then
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Move(Entries[FromIndex], Entries[ToIndex], Count * SizeOf(Entries[0]));
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- FillChar(Entries[FromIndex], (ToIndex - FromIndex) * SizeOf(Entries[0]), 0)
- else
- FillChar(Entries[FromIndex], Count * SizeOf(Entries[0]), 0);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(Entries[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(Entries[0]), 0)
- else
- FillChar(Entries[FromIndex], Count * SizeOf(Entries[0]), 0);
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
end;
+procedure TJclAnsiStrAnsiStrHashMapBucket.InitializeArray(var List: TJclAnsiStrAnsiStrHashMapEntryArray; FromIndex, Count: SizeInt);
+begin
+ {$IFDEF FPC}
+ while Count > 0 do
+ begin
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
+ end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
+end;
+
+procedure TJclAnsiStrAnsiStrHashMapBucket.InitializeArrayAfterMove(var List: TJclAnsiStrAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
+end;
+
+procedure TJclAnsiStrAnsiStrHashMapBucket.MoveArray(var List: TJclAnsiStrAnsiStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+begin
+ if Count > 0 then
+ begin
+ FinalizeArrayBeforeMove(List, FromIndex, ToIndex, Count);
+ Move(List[FromIndex], List[ToIndex], Count * SizeOf(List[0]));
+ InitializeArrayAfterMove(List, FromIndex, ToIndex, Count);
+ end;
+end;
+
//=== { TJclAnsiStrAnsiStrHashMap } ==========================================
constructor TJclAnsiStrAnsiStrHashMap.Create(ACapacity: Integer);
@@ -4663,7 +5139,7 @@
Bucket.Entries[I].Value := '';
FreeKey(Bucket.Entries[I].Key);
if I < Length(Bucket.Entries) - 1 then
- Bucket.MoveArray(I + 1, I, Bucket.Size - I - 1);
+ Bucket.MoveArray(Bucket.Entries, I + 1, I, Bucket.Size - I - 1);
Dec(Bucket.Size);
Dec(FSize);
Break;
@@ -5032,30 +5508,68 @@
//=== { TJclWideStrIntfHashMapBucket } ==========================================
-procedure TJclWideStrIntfHashMapBucket.MoveArray(FromIndex, ToIndex, Count: Integer);
+procedure TJclWideStrIntfHashMapBucket.FinalizeArrayBeforeMove(var List: TJclWideStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
begin
- if Count > 0 then
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Move(Entries[FromIndex], Entries[ToIndex], Count * SizeOf(Entries[0]));
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- FillChar(Entries[FromIndex], (ToIndex - FromIndex) * SizeOf(Entries[0]), 0)
- else
- FillChar(Entries[FromIndex], Count * SizeOf(Entries[0]), 0);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(Entries[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(Entries[0]), 0)
- else
- FillChar(Entries[FromIndex], Count * SizeOf(Entries[0]), 0);
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
end;
+procedure TJclWideStrIntfHashMapBucket.InitializeArray(var List: TJclWideStrIntfHashMapEntryArray; FromIndex, Count: SizeInt);
+begin
+ {$IFDEF FPC}
+ while Count > 0 do
+ begin
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
+ end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
+end;
+
+procedure TJclWideStrIntfHashMapBucket.InitializeArrayAfterMove(var List: TJclWideStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
+end;
+
+procedure TJclWideStrIntfHashMapBucket.MoveArray(var List: TJclWideStrIntfHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
+begin
+ if Count > 0 then
+ begin
+ FinalizeArrayBeforeMove(List, FromIndex, ToIndex, Count);
+ Move(List[FromIndex], List[ToIndex], Count * SizeOf(List[0]));
+ InitializeArrayAfterMove(List, FromIndex, ToIndex, Count);
+ end;
+end;
+
//=== { TJclWideStrIntfHashMap } ==========================================
constructor TJclWideStrIntfHashMap.Create(ACapacity: Integer);
@@ -5241,7 +5755,7 @@
Bucket.Entries[I].Value := nil;
FreeKey(Bucket.Entries[I].Key);
if I < Length(Bucket.Entries) - 1 then
- Bucket.MoveArray(I + 1, I, Bucket.Size - I - 1);
+ Bucket.MoveArray(Bucket.Entries, I + 1, I, Bucket.Size - I - 1);
Dec(Bucket.Size);
Dec(FSize);
Break;
@@ -5610,30 +6124,68 @@
//=== { TJclIntfWideStrHashMapBucket } ==========================================
-procedure TJclIntfWideStrHashMapBucket.MoveArray(FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfWideStrHashMapBucket.FinalizeArrayBeforeMove(var List: TJclIntfWideStrHashMapEntryArray; FromIndex, ToIndex, Count: SizeInt);
begin
- if Count > 0 then
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Move(Entries[FromIndex], Entries[ToIndex], Count * SizeOf(Entries[0]));
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- FillChar(Entries[FromIndex], (ToIndex - FromIndex) * SizeOf(...
[truncated message content] |
|
From: <ou...@us...> - 2012-02-24 11:23:15
|
Revision: 3746
http://jcl.svn.sourceforge.net/jcl/?rev=3746&view=rev
Author: outchy
Date: 2012-02-24 11:23:03 +0000 (Fri, 24 Feb 2012)
Log Message:
-----------
Revision 3743 was a bad idea since generic types do not support nested functions.
Workaround this compiler limitations by the declaration of all subfunctions (FinalizeArrayBeforeMove,InitializeArray and InitializeArrayAfterMove) in prototype MOVEARRAYINT.
Revision Links:
--------------
http://jcl.svn.sourceforge.net/jcl/?rev=3743&view=rev
Modified Paths:
--------------
trunk/jcl/source/common/JclAlgorithms.pas
trunk/jcl/source/common/JclPreProcessorContainerKnownTypes.pas
trunk/jcl/source/prototypes/JclAlgorithms.pas
trunk/jcl/source/prototypes/JclArrayLists.pas
trunk/jcl/source/prototypes/JclHashSets.pas
trunk/jcl/source/prototypes/JclQueues.pas
trunk/jcl/source/prototypes/JclVectors.pas
trunk/jcl/source/prototypes/containers/JclAlgorithms.imp
trunk/jcl/source/prototypes/containers/JclAlgorithms.int
Modified: trunk/jcl/source/common/JclAlgorithms.pas
===================================================================
--- trunk/jcl/source/common/JclAlgorithms.pas 2012-02-24 11:14:46 UTC (rev 3745)
+++ trunk/jcl/source/common/JclAlgorithms.pas 2012-02-24 11:23:03 UTC (rev 3746)
@@ -131,25 +131,118 @@
function JclSimpleHashToRange(Key, Range: Integer): Integer;
// move array algorithms
+procedure FinalizeArrayBeforeMove(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynIInterfaceArray; FromIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
procedure MoveArray(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
+procedure FinalizeArrayBeforeMove(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynAnsiStringArray; FromIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
procedure MoveArray(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+procedure FinalizeArrayBeforeMove(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynWideStringArray; FromIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
procedure MoveArray(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
{$IFDEF SUPPORTS_UNICODE_STRING}
+
+procedure FinalizeArrayBeforeMove(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynUnicodeStringArray; FromIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+
procedure MoveArray(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
{$ENDIF SUPPORTS_UNICODE_STRING}
+procedure InitializeArrayAfterMove(var List: TDynSingleArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
procedure MoveArray(var List: TDynSingleArray; FromIndex, ToIndex, Count: SizeInt); overload;
+procedure InitializeArrayAfterMove(var List: TDynDoubleArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
procedure MoveArray(var List: TDynDoubleArray; FromIndex, ToIndex, Count: SizeInt); overload;
+procedure InitializeArrayAfterMove(var List: TDynExtendedArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
procedure MoveArray(var List: TDynExtendedArray; FromIndex, ToIndex, Count: SizeInt); overload;
+procedure InitializeArrayAfterMove(var List: TDynIntegerArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
procedure MoveArray(var List: TDynIntegerArray; FromIndex, ToIndex, Count: SizeInt); overload;
+procedure InitializeArrayAfterMove(var List: TDynCardinalArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
procedure MoveArray(var List: TDynCardinalArray; FromIndex, ToIndex, Count: SizeInt); overload;
+procedure InitializeArrayAfterMove(var List: TDynInt64Array; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
procedure MoveArray(var List: TDynInt64Array; FromIndex, ToIndex, Count: SizeInt); overload;
+procedure InitializeArrayAfterMove(var List: TDynPointerArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
procedure MoveArray(var List: TDynPointerArray; FromIndex, ToIndex, Count: SizeInt); overload;
+procedure InitializeArrayAfterMove(var List: TDynObjectArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
procedure MoveArray(var List: TDynObjectArray; FromIndex, ToIndex, Count: SizeInt); overload;
+{$IFDEF GENERIC}
procedure MoveArray(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;
+{$ELSE ~GENERIC}
+{$IFDEF REFCOUNTED}
+procedure FinalizeArrayBeforeMove(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynSizeIntArray; FromIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+{$ELSE ~REFCOUNTED}
+{$IFDEF ZEROINIT}
+procedure InitializeArrayAfterMove(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+{$ENDIF ZEROINIT}
+{$ENDIF ~REFCOUNTED}
+procedure MoveArray(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;{$ENDIF ~GENERIC}
{$IFNDEF FPC}
+{$IFDEF GENERIC}
procedure MoveArray(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+{$ELSE ~GENERIC}
+{$IFDEF REFCOUNTED}
+procedure FinalizeArrayBeforeMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynStringArray; FromIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+{$ELSE ~REFCOUNTED}
+{$IFDEF ZEROINIT}
+procedure InitializeArrayAfterMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+{$ENDIF ZEROINIT}
+{$ENDIF ~REFCOUNTED}
+procedure MoveArray(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;{$ENDIF ~GENERIC}
+{$IFDEF GENERIC}
procedure MoveArray(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;
+{$ELSE ~GENERIC}
+{$IFDEF REFCOUNTED}
+procedure FinalizeArrayBeforeMove(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynFloatArray; FromIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+{$ELSE ~REFCOUNTED}
+{$IFDEF ZEROINIT}
+procedure InitializeArrayAfterMove(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+{$ENDIF ZEROINIT}
+{$ENDIF ~REFCOUNTED}
+procedure MoveArray(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;{$ENDIF ~GENERIC}
{$ENDIF ~FPC}
// Iterate algorithms
@@ -1123,62 +1216,59 @@
Result := Trunc(Range * (Frac(Abs(Key * A))));
end;
-procedure MoveArray(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
- procedure FinalizeArrayBeforeMove(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure FinalizeArrayBeforeMove(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
- begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
- else
- Finalize(List[ToIndex], Count);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
+end;
- procedure InitializeArray(var List: TDynIInterfaceArray; FromIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynIInterfaceArray; FromIndex, Count: SizeInt); overload;
+begin
+ {$IFDEF FPC}
+ while Count > 0 do
begin
- {$IFDEF FPC}
- while Count > 0 do
- begin
- Initialize(List[FromIndex]);
- Inc(FromIndex);
- Dec(Count);
- end;
- {$ELSE ~FPC}
- Initialize(List[FromIndex], Count);
- {$ENDIF ~FPC}
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
+end;
- procedure InitializeArrayAfterMove(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
- else
- InitializeArray(List, FromIndex, Count);
- end;
end;
+end;
+procedure MoveArray(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1188,62 +1278,59 @@
end;
end;
-procedure MoveArray(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
- procedure FinalizeArrayBeforeMove(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure FinalizeArrayBeforeMove(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
- begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
- else
- Finalize(List[ToIndex], Count);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
+end;
- procedure InitializeArray(var List: TDynAnsiStringArray; FromIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynAnsiStringArray; FromIndex, Count: SizeInt); overload;
+begin
+ {$IFDEF FPC}
+ while Count > 0 do
begin
- {$IFDEF FPC}
- while Count > 0 do
- begin
- Initialize(List[FromIndex]);
- Inc(FromIndex);
- Dec(Count);
- end;
- {$ELSE ~FPC}
- Initialize(List[FromIndex], Count);
- {$ENDIF ~FPC}
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
+end;
- procedure InitializeArrayAfterMove(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
- else
- InitializeArray(List, FromIndex, Count);
- end;
end;
+end;
+procedure MoveArray(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1253,62 +1340,59 @@
end;
end;
-procedure MoveArray(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
- procedure FinalizeArrayBeforeMove(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure FinalizeArrayBeforeMove(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
- begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
- else
- Finalize(List[ToIndex], Count);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
+end;
- procedure InitializeArray(var List: TDynWideStringArray; FromIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynWideStringArray; FromIndex, Count: SizeInt); overload;
+begin
+ {$IFDEF FPC}
+ while Count > 0 do
begin
- {$IFDEF FPC}
- while Count > 0 do
- begin
- Initialize(List[FromIndex]);
- Inc(FromIndex);
- Dec(Count);
- end;
- {$ELSE ~FPC}
- Initialize(List[FromIndex], Count);
- {$ENDIF ~FPC}
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
+end;
- procedure InitializeArrayAfterMove(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
- else
- InitializeArray(List, FromIndex, Count);
- end;
end;
+end;
+procedure MoveArray(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1320,62 +1404,59 @@
{$IFDEF SUPPORTS_UNICODE_STRING}
-procedure MoveArray(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
- procedure FinalizeArrayBeforeMove(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure FinalizeArrayBeforeMove(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
- begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
- else
- Finalize(List[ToIndex], Count);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
+end;
- procedure InitializeArray(var List: TDynUnicodeStringArray; FromIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: TDynUnicodeStringArray; FromIndex, Count: SizeInt); overload;
+begin
+ {$IFDEF FPC}
+ while Count > 0 do
begin
- {$IFDEF FPC}
- while Count > 0 do
- begin
- Initialize(List[FromIndex]);
- Inc(FromIndex);
- Dec(Count);
- end;
- {$ELSE ~FPC}
- Initialize(List[FromIndex], Count);
- {$ENDIF ~FPC}
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
+end;
- procedure InitializeArrayAfterMove(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
- else
- InitializeArray(List, FromIndex, Count);
- end;
end;
+end;
+procedure MoveArray(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1386,28 +1467,26 @@
end;
{$ENDIF SUPPORTS_UNICODE_STRING}
-procedure MoveArray(var List: TDynSingleArray; FromIndex, ToIndex, Count: SizeInt); overload;
-
- procedure InitializeArrayAfterMove(var List: TDynSingleArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynSingleArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
+procedure MoveArray(var List: TDynSingleArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1416,28 +1495,26 @@
end;
end;
-procedure MoveArray(var List: TDynDoubleArray; FromIndex, ToIndex, Count: SizeInt); overload;
-
- procedure InitializeArrayAfterMove(var List: TDynDoubleArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynDoubleArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
+procedure MoveArray(var List: TDynDoubleArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1446,28 +1523,26 @@
end;
end;
-procedure MoveArray(var List: TDynExtendedArray; FromIndex, ToIndex, Count: SizeInt); overload;
-
- procedure InitializeArrayAfterMove(var List: TDynExtendedArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynExtendedArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
+procedure MoveArray(var List: TDynExtendedArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1476,28 +1551,26 @@
end;
end;
-procedure MoveArray(var List: TDynIntegerArray; FromIndex, ToIndex, Count: SizeInt); overload;
-
- procedure InitializeArrayAfterMove(var List: TDynIntegerArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynIntegerArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
+procedure MoveArray(var List: TDynIntegerArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1506,28 +1579,26 @@
end;
end;
-procedure MoveArray(var List: TDynCardinalArray; FromIndex, ToIndex, Count: SizeInt); overload;
-
- procedure InitializeArrayAfterMove(var List: TDynCardinalArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynCardinalArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
+procedure MoveArray(var List: TDynCardinalArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1536,28 +1607,26 @@
end;
end;
-procedure MoveArray(var List: TDynInt64Array; FromIndex, ToIndex, Count: SizeInt); overload;
-
- procedure InitializeArrayAfterMove(var List: TDynInt64Array; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynInt64Array; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
+procedure MoveArray(var List: TDynInt64Array; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1566,28 +1635,26 @@
end;
end;
-procedure MoveArray(var List: TDynPointerArray; FromIndex, ToIndex, Count: SizeInt); overload;
-
- procedure InitializeArrayAfterMove(var List: TDynPointerArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynPointerArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
+procedure MoveArray(var List: TDynPointerArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1596,28 +1663,26 @@
end;
end;
-procedure MoveArray(var List: TDynObjectArray; FromIndex, ToIndex, Count: SizeInt); overload;
-
- procedure InitializeArrayAfterMove(var List: TDynObjectArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynObjectArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
+procedure MoveArray(var List: TDynObjectArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1627,28 +1692,26 @@
end;
-procedure MoveArray(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;
-
- procedure InitializeArrayAfterMove(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
+procedure MoveArray(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1658,54 +1721,51 @@
end;
{$IFNDEF FPC}
-procedure MoveArray(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
- procedure FinalizeArrayBeforeMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure FinalizeArrayBeforeMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
- begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
- else
- Finalize(List[ToIndex], Count);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
+end;
- procedure InitializeArray(var List: TDynStringArray; FromIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
- begin
+procedure InitializeArray(var List: TDynStringArray; FromIndex, Count: SizeInt); overload;
+begin
- Initialize(List[FromIndex], Count);
- end;
+ Initialize(List[FromIndex], Count);
+end;
- procedure InitializeArrayAfterMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
- else
- InitializeArray(List, FromIndex, Count);
- end;
end;
+end;
+procedure MoveArray(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1715,28 +1775,26 @@
end;
end;
-procedure MoveArray(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;
-
- procedure InitializeArrayAfterMove(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
+procedure MoveArray(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
Modified: trunk/jcl/source/common/JclPreProcessorContainerKnownTypes.pas
===================================================================
--- trunk/jcl/source/common/JclPreProcessorContainerKnownTypes.pas 2012-02-24 11:14:46 UTC (rev 3745)
+++ trunk/jcl/source/common/JclPreProcessorContainerKnownTypes.pas 2012-02-24 11:23:03 UTC (rev 3746)
@@ -43,7 +43,7 @@
({taTypeName} 'IInterface',
{taCondition} '',
{taDefines} 'REFCOUNTED',
- {taUndefs} 'GENERIC',
+ {taUndefs} 'ZEROINIT;GENERIC',
{taAlias} '',
{taAliasCondition} '',
{taDefaultValue} 'nil',
@@ -143,7 +143,7 @@
({taTypeName} 'AnsiString',
{taCondition} '',
{taDefines} 'REFCOUNTED',
- {taUndefs} 'GENERIC',
+ {taUndefs} 'ZEROINIT;GENERIC',
{taAlias} 'string',
{taAliasCondition} 'CONTAINER_ANSISTR',
{taDefaultValue} '''''',
@@ -243,7 +243,7 @@
({taTypeName} 'WideString',
{taCondition} '',
{taDefines} 'REFCOUNTED',
- {taUndefs} 'GENERIC',
+ {taUndefs} 'ZEROINIT;GENERIC',
{taAlias} 'string',
{taAliasCondition} 'CONTAINER_WIDESTR',
{taDefaultValue} '''''',
@@ -343,7 +343,7 @@
({taTypeName} 'UnicodeString',
{taCondition} 'SUPPORTS_UNICODE_STRING',
{taDefines} 'REFCOUNTED',
- {taUndefs} 'GENERIC',
+ {taUndefs} 'ZEROINIT;GENERIC',
{taAlias} 'string',
{taAliasCondition} 'CONTAINER_UNICODESTR',
{taDefaultValue} '''''',
@@ -443,7 +443,7 @@
({taTypeName} 'string',
{taCondition} '',
{taDefines} 'REFCOUNTED',
- {taUndefs} 'GENERIC',
+ {taUndefs} 'ZEROINIT;GENERIC',
{taAlias} '',
{taAliasCondition} '',
{taDefaultValue} '''''',
Modified: trunk/jcl/source/prototypes/JclAlgorithms.pas
===================================================================
--- trunk/jcl/source/prototypes/JclAlgorithms.pas 2012-02-24 11:14:46 UTC (rev 3745)
+++ trunk/jcl/source/prototypes/JclAlgorithms.pas 2012-02-24 11:23:03 UTC (rev 3746)
@@ -857,15 +857,15 @@
end;
(*$JPPLOOP TRUETYPEINDEX TRUETYPECOUNT
-{$JPPEXPANDMACRO MOVEARRAYIMP(,,, overload;)}
+{$JPPEXPANDMACRO MOVEARRAYIMP(,,,, overload;)}
*)
-{$JPPUNDEF GENERIC}{$JPPUNDEF REFCOUNTED}{$JPPDEFINE ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynSizeIntArray,, overload;)}
+{$JPPUNDEF GENERIC}{$JPPUNDEF REFCOUNTED}{$JPPDEFINE ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynSizeIntArray,,, overload;)}
{$IFNDEF FPC}
-{$JPPUNDEF GENERIC}{$JPPDEFINE REFCOUNTED}{$JPPUNDEF ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynStringArray,, overload;)}
+{$JPPUNDEF GENERIC}{$JPPDEFINE REFCOUNTED}{$JPPUNDEF ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynStringArray,,, overload;)}
-{$JPPUNDEF GENERIC}{$JPPUNDEF REFCOUNTED}{$JPPDEFINE ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynFloatArray,, overload;)}
+{$JPPUNDEF GENERIC}{$JPPUNDEF REFCOUNTED}{$JPPDEFINE ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynFloatArray,,, overload;)}
{$ENDIF ~FPC}
(*$JPPLOOP TRUETYPEINDEX TRUETYPECOUNT
Modified: trunk/jcl/source/prototypes/JclArrayLists.pas
===================================================================
--- trunk/jcl/source/prototypes/JclArrayLists.pas 2012-02-24 11:14:46 UTC (rev 3745)
+++ trunk/jcl/source/prototypes/JclArrayLists.pas 2012-02-24 11:23:03 UTC (rev 3746)
@@ -72,7 +72,7 @@
type
TDynArray = array of T;
TArrayIterator = TJclArrayIterator<T>;
- {$JPPEXPANDMACRO MOVEARRAYINT(MoveArray,TDynArray,)},,; AOwnsItems: Boolean,const ,AItem,T,GetItem,SetItem)*)
+ {$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYINT(MoveArray,TDynArray,)},,; AOwnsItems: Boolean,const ,AItem,T,GetItem,SetItem)*)
{$JPPEXPANDMACRO JCLARRAYLISTITRINT(TJclArrayIterator<T>,IJclIterator<T>,IJclList<T>,const ,AItem,T,GetItem,SetItem)}
@@ -151,7 +151,7 @@
{$JPPEXPANDMACRO JCLARRAYLISTIMP(TJclArrayList<T>,; AOwnsItems: Boolean,AOwnsItems,IJclCollection<T>,IJclIterator<T>,TArrayIterator,IJclList<T>,MoveArray,const ,AItem,GetItem,SetItem,FreeItem,T,Default(T))}
-{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclArrayList<T>.MoveArray,TDynArray,Default(T),)}
+{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynArray,Default(T),TJclArrayList<T>.,)}
{$JPPEXPANDMACRO JCLARRAYLISTITRIMP(TJclArrayIterator<T>,IJclIterator<T>,IJclList<T>,const ,AItem,T,GetItem,SetItem)}
Modified: trunk/jcl/source/prototypes/JclHashSets.pas
===================================================================
--- trunk/jcl/source/prototypes/JclHashSets.pas 2012-02-24 11:14:46 UTC (rev 3745)
+++ trunk/jcl/source/prototypes/JclHashSets.pas 2012-02-24 11:23:03 UTC (rev 3746)
@@ -74,7 +74,7 @@
public
Size: Integer;
Entries: TDynArray;
- {$JPPEXPANDMACRO MOVEARRAYINT(MoveArray,TDynArray,)}
+ {$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYINT(MoveArray,TDynArray,)}
end;
{$JPPEXPANDMACRO JCLHASHSETINT(TJclHashSet<T>,TJclAbstractContainer<T>,IJclContainer<T>,IJclFlatContainer<T>,TJclHashSetBucket<T>,IJclCollection<T>,IJclSet<T>,IJclIterator<T>,IJclEqualityComparer<T>,IJclHashConverter<T>, IJclItemOwner<T>\,,,,const ,AItem,T,; AOwnsItems: Boolean)}
@@ -155,7 +155,7 @@
//=== { TJclHashSetBucket<T> } =================================================
-{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclHashSetBucket<T>.MoveArray,TDynArray,Default(T),)}
+{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynArray,Default(T),TJclHashSetBucket<T>.,)}
{$JPPEXPANDMACRO JCLHASHSETIMP(TJclHashSet<T>,TJclHashSetBucket<T>,; AOwnsItems: Boolean,AOwnsItems,IJclCollection<T>,TJclHashSetIterator<T>,IJclIterator<T>,Bucket.MoveArray,const ,AItem,T,Default(T),FreeItem)}
Modified: trunk/jcl/source/prototypes/JclQueues.pas
===================================================================
--- trunk/jcl/source/prototypes/JclQueues.pas 2012-02-24 11:14:46 UTC (rev 3745)
+++ trunk/jcl/source/prototypes/JclQueues.pas 2012-02-24 11:23:03 UTC (rev 3746)
@@ -60,7 +60,7 @@
protected
type
TDynArray = array of T;
- {$JPPEXPANDMACRO MOVEARRAYINT(MoveArray,TDynArray,)},; AOwnsItems: Boolean,const ,AItem,T)*)
+ {$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYINT(MoveArray,TDynArray,)},; AOwnsItems: Boolean,const ,AItem,T)*)
// E = external helper to compare items for equality (GetHashCode is not used)
TJclQueueE<T> = class(TJclQueue<T>, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -129,7 +129,7 @@
(*$JPPEXPANDMACRO JCLQUEUEIMP(TJclQueue<T>,; AOwnsItems: Boolean,AOwnsItems,MoveArray,const ,AItem,T,Default(T),FreeItem)*)
-{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclQueue<T>.MoveArray,TDynArray,Default(T),)}
+{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynArray,Default(T),TJclQueue<T>.,)}
//=== { TJclQueueE<T> } ======================================================
Modified: trunk/jcl/source/prototypes/JclVectors.pas
===================================================================
--- trunk/jcl/source/prototypes/JclVectors.pas 2012-02-24 11:14:46 UTC (rev 3745)
+++ trunk/jcl/source/prototypes/JclVectors.pas 2012-02-24 11:23:03 UTC (rev 3746)
@@ -73,7 +73,7 @@
type
TDynArray = array of T;
TVectorIterator = TJclVectorIterator<T>;
- {$JPPEXPANDMACRO MOVEARRAYINT(MoveArray,TDynArray,)},,; AOwnsItems: Boolean,const ,AItem,T,TDynArray,GetItem,SetItem)*)
+ {$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYINT(MoveArray,TDynArray,)},,; AOwnsItems: Boolean,const ,AItem,T,TDynArray,GetItem,SetItem)*)
(*$JPPEXPANDMACRO JCLVECTORITRINT(TJclVectorIterator<T>,IJclIterator<T>,IJclList<T>,const ,AItem,T,GetItem,SetItem)*)
@@ -149,7 +149,7 @@
(*$JPPEXPANDMACRO JCLVECTORIMP(TJclVector<T>,IJclCollection<T>,IJclList<T>,IJclIterator<T>,TVectorIterator,; AOwnsItems: Boolean,AOwnsItems,MoveArray,const ,AItem,T,Default(T),GetItem,SetItem,FreeItem)*)
-{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclVector<T>.MoveArray,TDynArray,Default(T),)}
+{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynArray,Default(T),TJclVector<T>.,)}
(*$JPPEXPANDMACRO JCLVECTORITRIMP(TJclVectorIterator<T>,IJclIterator<T>,IJclList<T>,const ,AItem,T,GetItem,SetItem)*)
Modified: trunk/jcl/source/prototypes/containers/JclAlgorithms.imp
===================================================================
--- trunk/jcl/source/prototypes/containers/JclAlgorithms.imp 2012-02-24 11:14:46 UTC (rev 3745)
+++ trunk/jcl/source/prototypes/containers/JclAlgorithms.imp 2012-02-24 11:23:03 UTC (rev 3746)
@@ -1,6 +1,6 @@
-(*$JPPDEFINEMACRO MOVEARRAYIMP(MOVEARRAYPROCEDURENAME, DYNARRAYTYPENAME, DEFAULTVALUE, OVERLOAD)
+(*$JPPDEFINEMACRO MOVEARRAYIMP(MOVEARRAYPROCEDURENAME, DYNARRAYTYPENAME, DEFAULTVALUE, PREFIX, OVERLOAD)
{$IFDEF GENERIC}
-procedure MOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
+procedure PREFIXMOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
var
I: SizeInt;
begin
@@ -34,86 +34,82 @@
end;
end;
{$ELSE ~GENERIC}
-procedure MOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
{$IFDEF REFCOUNTED}
- procedure FinalizeArrayBeforeMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure PREFIXFinalizeArrayBeforeMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
+begin
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
- begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
- else
- Finalize(List[ToIndex], Count);
- end
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
- end;
+ Finalize(List[ToIndex], Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
end;
+end;
- procedure InitializeArray(var List: DYNARRAYTYPENAME; FromIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure PREFIXInitializeArray(var List: DYNARRAYTYPENAME; FromIndex, Count: SizeInt);OVERLOAD
+begin
+ {$IFDEF FPC}
+ while Count > 0 do
begin
- {$IFDEF FPC}
- while Count > 0 do
- begin
- Initialize(List[FromIndex]);
- Inc(FromIndex);
- Dec(Count);
- end;
- {$ELSE ~FPC}
- Initialize(List[FromIndex], Count);
- {$ENDIF ~FPC}
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
+end;
- procedure InitializeArrayAfterMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure PREFIXInitializeArrayAfterMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
+begin
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- InitializeArray(List, FromIndex, Count);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
- else
- InitializeArray(List, FromIndex, Count);
- end;
+ InitializeArray(List, FromIndex, Count);
end;
+end;
{$ELSE ~REFCOUNTED}
{$IFDEF ZEROINIT}
- procedure InitializeArrayAfterMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);
- {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure PREFIXInitializeArrayAfterMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
+begin
+ { Clean array }
+ if FromIndex < ToIndex then
begin
- { Clean array }
- if FromIndex < ToIndex then
- begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
+ else
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
- else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
end;
+end;
{$ENDIF ZEROINIT}
{$ENDIF ~REFCOUNTED}
+procedure PREFIXMOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
begin
if Count > 0 then
begin
Modified: trunk/jcl/source/prototypes/containers/JclAlgorithms.int
===================================================================
--- trunk/jcl/source/prototypes/containers/JclAlgorithms.int 2012-02-24 11:14:46 UTC (rev 3745)
+++ trunk/jcl/source/prototypes/containers/JclAlgorithms.int 2012-02-24 11:23:03 UTC (rev 3746)
@@ -1,5 +1,21 @@
(*$JPPDEFINEMACRO MOVEARRAYINT(MOVEARRAYPROCEDURENAME, DYNARRAYTYPENAME, OVERLOAD)
-procedure MOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD*)
+{$IFDEF GENERIC}
+procedure MOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
+{$ELSE ~GENERIC}
+{$IFDEF REFCOUNTED}
+procedure FinalizeArrayBeforeMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArray(var List: DYNARRAYTYPENAME; FromIndex, Count: SizeInt);OVERLOAD
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+procedure InitializeArrayAfterMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+{$ELSE ~REFCOUNTED}
+{$IFDEF ZEROINIT}
+procedure InitializeArrayAfterMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+{$ENDIF ZEROINIT}
+{$ENDIF ~REFCOUNTED}
+procedure MOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD{$ENDIF ~GENERIC}*)
(*$JPPDEFINEMACRO ITERATEINT(ITERATEPROCEDURENAME, ITRINTERFACENAME, ITERATEPROCEDURETYPENAME, OVERLOAD)
procedure ITERATEPROCEDURENAME(const First: ITRINTERFACENAME; Count: Integer; F: ITERATEPROCEDURETYPENAME);OVERLOAD*)
(*$JPPDEFINEMACRO APPLYINT(APPLYPROCEDURENAME, ITRINTERFACENAME, APPLYFUNCTIONTYPENAME, OVERLOAD)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-02-24 11:14:58
|
Revision: 3745
http://jcl.svn.sourceforge.net/jcl/?rev=3745&view=rev
Author: outchy
Date: 2012-02-24 11:14:46 +0000 (Fri, 24 Feb 2012)
Log Message:
-----------
style cleanup: implementations of TJclArrayList<T>.MoveArray and TJclVector<T>.MoveArray to be inside the class implementations.
Modified Paths:
--------------
trunk/jcl/source/common/JclArrayLists.pas
trunk/jcl/source/common/JclVectors.pas
trunk/jcl/source/prototypes/JclArrayLists.pas
trunk/jcl/source/prototypes/JclVectors.pas
Modified: trunk/jcl/source/common/JclArrayLists.pas
===================================================================
--- trunk/jcl/source/common/JclArrayLists.pas 2012-02-24 11:09:51 UTC (rev 3744)
+++ trunk/jcl/source/common/JclArrayLists.pas 2012-02-24 11:14:46 UTC (rev 3745)
@@ -11762,6 +11762,40 @@
{$ENDIF THREADSAFE}
end;
+procedure TJclArrayList<T>.MoveArray(var List: TDynArray; FromIndex, ToIndex, Count: SizeInt);
+var
+ I: SizeInt;
+begin
+ if FromIndex < ToIndex then
+ begin
+ for I := Count - 1 downto 0 do
+ List[ToIndex + I] := List[FromIndex + I];
+
+ if (ToIndex - FromIndex) < Count then
+ // overlapped source and target
+ for I := 0 to ToIndex - FromIndex - 1 do
+ List[FromIndex + I] := Default(T)
+ else
+ // independant
+ for I := 0 to Count - 1 do
+ List[FromIndex + I] := Default(T);
+ end
+ else
+ begin
+ for I := 0 to Count - 1 do
+ List[ToIndex + I] := List[FromIndex + I];
+
+ if (FromIndex - ToIndex) < Count then
+ // overlapped source and target
+ for I := Count - FromIndex + ToIndex to Count - 1 do
+ List[FromIndex + I] := Default(T)
+ else
+ // independant
+ for I := 0 to Count - 1 do
+ List[FromIndex + I] := Default(T);
+ end;
+end;
+
//=== { TJclArrayIterator<T> } ===============================================================
constructor TJclArrayIterator<T>.Create(AOwnList: IJclList<T>; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
@@ -11916,40 +11950,6 @@
FOwnList.SetItem(FCursor, AItem);
end;
-procedure TJclArrayList<T>.MoveArray(var List: TDynArray; FromIndex, ToIndex, Count: SizeInt);
-var
- I: SizeInt;
-begin
- if FromIndex < ToIndex then
- begin
- for I := Count - 1 downto 0 do
- List[ToIndex + I] := List[FromIndex + I];
-
- if (ToIndex - FromIndex) < Count then
- // overlapped source and target
- for I := 0 to ToIndex - FromIndex - 1 do
- List[FromIndex + I] := Default(T)
- else
- // independant
- for I := 0 to Count - 1 do
- List[FromIndex + I] := Default(T);
- end
- else
- begin
- for I := 0 to Count - 1 do
- List[ToIndex + I] := List[FromIndex + I];
-
- if (FromIndex - ToIndex) < Count then
- // overlapped source and target
- for I := Count - FromIndex + ToIndex to Count - 1 do
- List[FromIndex + I] := Default(T)
- else
- // independant
- for I := 0 to Count - 1 do
- List[FromIndex + I] := Default(T);
- end;
-end;
-
//=== { TJclArrayListE<T> } ==================================================
constructor TJclArrayListE<T>.Create(const AEqualityComparer: IJclEqualityComparer<T>; ACapacity: Integer;
Modified: trunk/jcl/source/common/JclVectors.pas
===================================================================
--- trunk/jcl/source/common/JclVectors.pas 2012-02-24 11:09:51 UTC (rev 3744)
+++ trunk/jcl/source/common/JclVectors.pas 2012-02-24 11:14:46 UTC (rev 3745)
@@ -11721,6 +11721,40 @@
{$ENDIF THREADSAFE}
end;
+procedure TJclVector<T>.MoveArray(var List: TDynArray; FromIndex, ToIndex, Count: SizeInt);
+var
+ I: SizeInt;
+begin
+ if FromIndex < ToIndex then
+ begin
+ for I := Count - 1 downto 0 do
+ List[ToIndex + I] := List[FromIndex + I];
+
+ if (ToIndex - FromIndex) < Count then
+ // overlapped source and target
+ for I := 0 to ToIndex - FromIndex - 1 do
+ List[FromIndex + I] := Default(T)
+ else
+ // independant
+ for I := 0 to Count - 1 do
+ List[FromIndex + I] := Default(T);
+ end
+ else
+ begin
+ for I := 0 to Count - 1 do
+ List[ToIndex + I] := List[FromIndex + I];
+
+ if (FromIndex - ToIndex) < Count then
+ // overlapped source and target
+ for I := Count - FromIndex + ToIndex to Count - 1 do
+ List[FromIndex + I] := Default(T)
+ else
+ // independant
+ for I := 0 to Count - 1 do
+ List[FromIndex + I] := Default(T);
+ end;
+end;
+
//=== { TJclVectorIterator<T> } ===========================================================
constructor TJclVectorIterator<T>.Create(AOwnList: IJclList<T>; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
@@ -11875,40 +11909,6 @@
FOwnList.SetItem(FCursor, AItem);
end;
-procedure TJclVector<T>.MoveArray(var List: TDynArray; FromIndex, ToIndex, Count: SizeInt);
-var
- I: SizeInt;
-begin
- if FromIndex < ToIndex then
- begin
- for I := Count - 1 downto 0 do
- List[ToIndex + I] := List[FromIndex + I];
-
- if (ToIndex - FromIndex) < Count then
- // overlapped source and target
- for I := 0 to ToIndex - FromIndex - 1 do
- List[FromIndex + I] := Default(T)
- else
- // independant
- for I := 0 to Count - 1 do
- List[FromIndex + I] := Default(T);
- end
- else
- begin
- for I := 0 to Count - 1 do
- List[ToIndex + I] := List[FromIndex + I];
-
- if (FromIndex - ToIndex) < Count then
- // overlapped source and target
- for I := Count - FromIndex + ToIndex to Count - 1 do
- List[FromIndex + I] := Default(T)
- else
- // independant
- for I := 0 to Count - 1 do
- List[FromIndex + I] := Default(T);
- end;
-end;
-
//=== { TJclVectorE<T> } =====================================================
constructor TJclVectorE<T>.Create(const AEqualityComparer: IJclEqualityComparer<T>; ACapacity: Integer;
Modified: trunk/jcl/source/prototypes/JclArrayLists.pas
===================================================================
--- trunk/jcl/source/prototypes/JclArrayLists.pas 2012-02-24 11:09:51 UTC (rev 3744)
+++ trunk/jcl/source/prototypes/JclArrayLists.pas 2012-02-24 11:14:46 UTC (rev 3745)
@@ -151,10 +151,10 @@
{$JPPEXPANDMACRO JCLARRAYLISTIMP(TJclArrayList<T>,; AOwnsItems: Boolean,AOwnsItems,IJclCollection<T>,IJclIterator<T>,TArrayIterator,IJclList<T>,MoveArray,const ,AItem,GetItem,SetItem,FreeItem,T,Default(T))}
+{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclArrayList<T>.MoveArray,TDynArray,Default(T),)}
+
{$JPPEXPANDMACRO JCLARRAYLISTITRIMP(TJclArrayIterator<T>,IJclIterator<T>,IJclList<T>,const ,AItem,T,GetItem,SetItem)}
-{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclArrayList<T>.MoveArray,TDynArray,Default(T),)}
-
//=== { TJclArrayListE<T> } ==================================================
constructor TJclArrayListE<T>.Create(const AEqualityComparer: IJclEqualityComparer<T>; ACapacity: Integer;
Modified: trunk/jcl/source/prototypes/JclVectors.pas
===================================================================
--- trunk/jcl/source/prototypes/JclVectors.pas 2012-02-24 11:09:51 UTC (rev 3744)
+++ trunk/jcl/source/prototypes/JclVectors.pas 2012-02-24 11:14:46 UTC (rev 3745)
@@ -149,10 +149,10 @@
(*$JPPEXPANDMACRO JCLVECTORIMP(TJclVector<T>,IJclCollection<T>,IJclList<T>,IJclIterator<T>,TVectorIterator,; AOwnsItems: Boolean,AOwnsItems,MoveArray,const ,AItem,T,Default(T),GetItem,SetItem,FreeItem)*)
+{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclVector<T>.MoveArray,TDynArray,Default(T),)}
+
(*$JPPEXPANDMACRO JCLVECTORITRIMP(TJclVectorIterator<T>,IJclIterator<T>,IJclList<T>,const ,AItem,T,GetItem,SetItem)*)
-{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclVector<T>.MoveArray,TDynArray,Default(T),)}
-
//=== { TJclVectorE<T> } =====================================================
constructor TJclVectorE<T>.Create(const AEqualityComparer: IJclEqualityComparer<T>; ACapacity: Integer;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-02-24 11:10:02
|
Revision: 3744
http://jcl.svn.sourceforge.net/jcl/?rev=3744&view=rev
Author: outchy
Date: 2012-02-24 11:09:51 +0000 (Fri, 24 Feb 2012)
Log Message:
-----------
new macro syntax {$JPPEXPANDMACRO MACRONAME[PARAM|PARAM|PARAM]} to be used when commas have special meaning inside class names (in generics for instances).
Modified Paths:
--------------
trunk/jcl/source/common/JclPreProcessorParser.pas
Modified: trunk/jcl/source/common/JclPreProcessorParser.pas
===================================================================
--- trunk/jcl/source/common/JclPreProcessorParser.pas 2012-02-23 22:33:59 UTC (rev 3743)
+++ trunk/jcl/source/common/JclPreProcessorParser.pas 2012-02-24 11:09:51 UTC (rev 3744)
@@ -260,6 +260,7 @@
Comment: Boolean;
ParenthesisCount: Integer;
MacroTextLen: Integer;
+ MacroParenthesis, MacroBracket: Boolean;
begin
MacroTextLen := Length(MacroText);
I := 1;
@@ -275,7 +276,9 @@
if J <= MacroTextLen then
begin
SetLength(ParamNames, 0);
- if MacroText[J] = '(' then
+ MacroParenthesis := MacroText[J] = '(';
+ MacroBracket := MacroText[J] = '[';
+ if MacroParenthesis or MacroBracket then
begin
Inc(J);
if ParamDeclaration then
@@ -291,15 +294,26 @@
while (I <= MacroTextLen) and CharIsSpace(MacroText[I]) do
Inc(I);
if (I <= MacroTextLen) then
- case MacroText[I] of
- ',':
- Inc(I);
- ')': ;
- else
- raise EPppParserError.CreateFmt('invalid parameter declaration in macro "%s"', [MacroText]);
- end;
+ begin
+ if MacroParenthesis then
+ case MacroText[I] of
+ ',':
+ Inc(I);
+ ')': ;
+ else
+ raise EPppParserError.CreateFmt('invalid parameter declaration in macro "%s"', [MacroText]);
+ end;
+ if MacroBracket then
+ case MacroText[I] of
+ '|':
+ Inc(I);
+ ']': ;
+ else
+ raise EPppParserError.CreateFmt('invalid parameter declaration in macro "%s"', [MacroText]);
+ end;
+ end;
J := I;
- until (J > MacroTextLen) or (MacroText[J] = ')');
+ until (J > MacroTextLen) or (MacroParenthesis and (MacroText[J] = ')')) or (MacroBracket and (MacroText[J] = ']'));
end
else
begin
@@ -318,38 +332,60 @@
Inc(ParenthesisCount);
')':
begin
- if (not Comment) and (ParenthesisCount = 0) then
+ if MacroParenthesis and (not Comment) and (ParenthesisCount = 0) then
Break;
if not Comment then
Dec(ParenthesisCount);
end;
+ ']':
+ if MacroBracket and (not Comment) and (ParenthesisCount = 0) then
+ Break;
NativeBackslash:
if (not Comment) and (ParenthesisCount = 0) and (I < MacroTextLen) and (MacroText[i + 1] = NativeComma) then
Inc(I);
NativeComma:
- if (not Comment) and (ParenthesisCount = 0) then
+ if MacroParenthesis and (not Comment) and (ParenthesisCount = 0) then
Break;
+ '|':
+ if MacroBracket and (not Comment) and (ParenthesisCount = 0) then
+ Break;
end;
Inc(I);
end;
SetLength(ParamNames, Length(ParamNames) + 1);
ParamNames[High(ParamNames)] := Copy(MacroText, J, I - J);
StrReplace(ParamNames[High(ParamNames)], '\,', ',', [rfReplaceAll]);
- if (I < MacroTextLen) and (MacroText[I] = ')') then
+ if MacroParenthesis then
begin
- J := I;
- Break;
+ if (I < MacroTextLen) and (MacroText[I] = ')') then
+ begin
+ J := I;
+ Break;
+ end;
+ if (I < MacroTextLen) and (MacroText[I] = ',') then
+ Inc(I);
end;
- if (I < MacroTextLen) and (MacroText[I] = ',') then
- Inc(I);
+ if MacroBracket then
+ begin
+ if (I < MacroTextLen) and (MacroText[I] = ']') then
+ begin
+ J := I;
+ Break;
+ end;
+ if (I < MacroTextLen) and (MacroText[I] = '|') then
+ Inc(I);
+ end;
J := I;
until J > MacroTextLen;
end;
if J <= MacroTextLen then
begin
- if MacroText[J] = ')' then
+ if MacroParenthesis and (MacroText[J] = ')') then
Inc(J) // skip )
else
+ if MacroBracket and (MacroText[J] = ']') then
+ Inc(J) // skip ]
+ else
raise EPppParserError.CreateFmt('Unterminated list of arguments for macro "%s"', [MacroText]);
end;
end
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2012-02-23 22:34:06
|
Revision: 3743
http://jcl.svn.sourceforge.net/jcl/?rev=3743&view=rev
Author: outchy
Date: 2012-02-23 22:33:59 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
rework the MoveArray template to have nested subfunctions and ability to be overloaded or not.
Modified Paths:
--------------
trunk/jcl/source/common/JclAlgorithms.pas
trunk/jcl/source/prototypes/JclAlgorithms.pas
trunk/jcl/source/prototypes/JclArrayLists.pas
trunk/jcl/source/prototypes/JclHashSets.pas
trunk/jcl/source/prototypes/JclQueues.pas
trunk/jcl/source/prototypes/JclVectors.pas
trunk/jcl/source/prototypes/containers/JclAlgorithms.imp
Modified: trunk/jcl/source/common/JclAlgorithms.pas
===================================================================
--- trunk/jcl/source/common/JclAlgorithms.pas 2012-02-23 21:46:09 UTC (rev 3742)
+++ trunk/jcl/source/common/JclAlgorithms.pas 2012-02-23 22:33:59 UTC (rev 3743)
@@ -1123,62 +1123,62 @@
Result := Trunc(Range * (Frac(Abs(Key * A))));
end;
-procedure FinalizeArrayBeforeMove(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ procedure FinalizeArrayBeforeMove(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
+ begin
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ else
+ Finalize(List[ToIndex], Count);
+ end
else
- Finalize(List[ToIndex], Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
+ end;
end;
-end;
-procedure InitializeArray(var List: TDynIInterfaceArray; FromIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- {$IFDEF FPC}
- while Count > 0 do
+ procedure InitializeArray(var List: TDynIInterfaceArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- Initialize(List[FromIndex]);
- Inc(FromIndex);
- Dec(Count);
+ {$IFDEF FPC}
+ while Count > 0 do
+ begin
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
+ end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
end;
- {$ELSE ~FPC}
- Initialize(List[FromIndex], Count);
- {$ENDIF ~FPC}
-end;
-procedure InitializeArrayAfterMove(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
+ procedure InitializeArrayAfterMove(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
else
- InitializeArray(List, FromIndex, Count);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynIInterfaceArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1188,62 +1188,62 @@
end;
end;
-procedure FinalizeArrayBeforeMove(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ procedure FinalizeArrayBeforeMove(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
+ begin
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ else
+ Finalize(List[ToIndex], Count);
+ end
else
- Finalize(List[ToIndex], Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
+ end;
end;
-end;
-procedure InitializeArray(var List: TDynAnsiStringArray; FromIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- {$IFDEF FPC}
- while Count > 0 do
+ procedure InitializeArray(var List: TDynAnsiStringArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- Initialize(List[FromIndex]);
- Inc(FromIndex);
- Dec(Count);
+ {$IFDEF FPC}
+ while Count > 0 do
+ begin
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
+ end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
end;
- {$ELSE ~FPC}
- Initialize(List[FromIndex], Count);
- {$ENDIF ~FPC}
-end;
-procedure InitializeArrayAfterMove(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
+ procedure InitializeArrayAfterMove(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
else
- InitializeArray(List, FromIndex, Count);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynAnsiStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1253,62 +1253,62 @@
end;
end;
-procedure FinalizeArrayBeforeMove(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ procedure FinalizeArrayBeforeMove(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
+ begin
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ else
+ Finalize(List[ToIndex], Count);
+ end
else
- Finalize(List[ToIndex], Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
+ end;
end;
-end;
-procedure InitializeArray(var List: TDynWideStringArray; FromIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- {$IFDEF FPC}
- while Count > 0 do
+ procedure InitializeArray(var List: TDynWideStringArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- Initialize(List[FromIndex]);
- Inc(FromIndex);
- Dec(Count);
+ {$IFDEF FPC}
+ while Count > 0 do
+ begin
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
+ end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
end;
- {$ELSE ~FPC}
- Initialize(List[FromIndex], Count);
- {$ENDIF ~FPC}
-end;
-procedure InitializeArrayAfterMove(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
+ procedure InitializeArrayAfterMove(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
else
- InitializeArray(List, FromIndex, Count);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynWideStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1320,62 +1320,62 @@
{$IFDEF SUPPORTS_UNICODE_STRING}
-procedure FinalizeArrayBeforeMove(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ procedure FinalizeArrayBeforeMove(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
+ begin
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ else
+ Finalize(List[ToIndex], Count);
+ end
else
- Finalize(List[ToIndex], Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
+ end;
end;
-end;
-procedure InitializeArray(var List: TDynUnicodeStringArray; FromIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- {$IFDEF FPC}
- while Count > 0 do
+ procedure InitializeArray(var List: TDynUnicodeStringArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- Initialize(List[FromIndex]);
- Inc(FromIndex);
- Dec(Count);
+ {$IFDEF FPC}
+ while Count > 0 do
+ begin
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
+ end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
end;
- {$ELSE ~FPC}
- Initialize(List[FromIndex], Count);
- {$ENDIF ~FPC}
-end;
-procedure InitializeArrayAfterMove(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
+ procedure InitializeArrayAfterMove(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
else
- InitializeArray(List, FromIndex, Count);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynUnicodeStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1386,27 +1386,28 @@
end;
{$ENDIF SUPPORTS_UNICODE_STRING}
-procedure InitializeArrayAfterMove(var List: TDynSingleArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynSingleArray; FromIndex, ToIndex, Count: SizeInt); overload;
+
+ procedure InitializeArrayAfterMove(var List: TDynSingleArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynSingleArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1415,27 +1416,28 @@
end;
end;
-procedure InitializeArrayAfterMove(var List: TDynDoubleArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynDoubleArray; FromIndex, ToIndex, Count: SizeInt); overload;
+
+ procedure InitializeArrayAfterMove(var List: TDynDoubleArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynDoubleArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1444,27 +1446,28 @@
end;
end;
-procedure InitializeArrayAfterMove(var List: TDynExtendedArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynExtendedArray; FromIndex, ToIndex, Count: SizeInt); overload;
+
+ procedure InitializeArrayAfterMove(var List: TDynExtendedArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynExtendedArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1473,27 +1476,28 @@
end;
end;
-procedure InitializeArrayAfterMove(var List: TDynIntegerArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynIntegerArray; FromIndex, ToIndex, Count: SizeInt); overload;
+
+ procedure InitializeArrayAfterMove(var List: TDynIntegerArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynIntegerArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1502,27 +1506,28 @@
end;
end;
-procedure InitializeArrayAfterMove(var List: TDynCardinalArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynCardinalArray; FromIndex, ToIndex, Count: SizeInt); overload;
+
+ procedure InitializeArrayAfterMove(var List: TDynCardinalArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynCardinalArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1531,27 +1536,28 @@
end;
end;
-procedure InitializeArrayAfterMove(var List: TDynInt64Array; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynInt64Array; FromIndex, ToIndex, Count: SizeInt); overload;
+
+ procedure InitializeArrayAfterMove(var List: TDynInt64Array; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynInt64Array; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1560,27 +1566,28 @@
end;
end;
-procedure InitializeArrayAfterMove(var List: TDynPointerArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynPointerArray; FromIndex, ToIndex, Count: SizeInt); overload;
+
+ procedure InitializeArrayAfterMove(var List: TDynPointerArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynPointerArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1589,27 +1596,28 @@
end;
end;
-procedure InitializeArrayAfterMove(var List: TDynObjectArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynObjectArray; FromIndex, ToIndex, Count: SizeInt); overload;
+
+ procedure InitializeArrayAfterMove(var List: TDynObjectArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynObjectArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1619,27 +1627,28 @@
end;
-procedure InitializeArrayAfterMove(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;
+
+ procedure InitializeArrayAfterMove(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynSizeIntArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1649,54 +1658,54 @@
end;
{$IFNDEF FPC}
-procedure FinalizeArrayBeforeMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
+ procedure FinalizeArrayBeforeMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
+ begin
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ else
+ Finalize(List[ToIndex], Count);
+ end
else
- Finalize(List[ToIndex], Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
+ end;
end;
-end;
-procedure InitializeArray(var List: TDynStringArray; FromIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
+ procedure InitializeArray(var List: TDynStringArray; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
+ begin
- Initialize(List[FromIndex], Count);
-end;
+ Initialize(List[FromIndex], Count);
+ end;
-procedure InitializeArrayAfterMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
+ procedure InitializeArrayAfterMove(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
else
- InitializeArray(List, FromIndex, Count);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynStringArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
@@ -1706,27 +1715,28 @@
end;
end;
-procedure InitializeArrayAfterMove(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+procedure MoveArray(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;
+
+ procedure InitializeArrayAfterMove(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
-procedure MoveArray(var List: TDynFloatArray; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
Modified: trunk/jcl/source/prototypes/JclAlgorithms.pas
===================================================================
--- trunk/jcl/source/prototypes/JclAlgorithms.pas 2012-02-23 21:46:09 UTC (rev 3742)
+++ trunk/jcl/source/prototypes/JclAlgorithms.pas 2012-02-23 22:33:59 UTC (rev 3743)
@@ -857,15 +857,15 @@
end;
(*$JPPLOOP TRUETYPEINDEX TRUETYPECOUNT
-{$JPPEXPANDMACRO MOVEARRAYIMP(,,)}
+{$JPPEXPANDMACRO MOVEARRAYIMP(,,, overload;)}
*)
-{$JPPUNDEF GENERIC}{$JPPUNDEF REFCOUNTED}{$JPPDEFINE ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynSizeIntArray,)}
+{$JPPUNDEF GENERIC}{$JPPUNDEF REFCOUNTED}{$JPPDEFINE ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynSizeIntArray,, overload;)}
{$IFNDEF FPC}
-{$JPPUNDEF GENERIC}{$JPPDEFINE REFCOUNTED}{$JPPUNDEF ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynStringArray,)}
+{$JPPUNDEF GENERIC}{$JPPDEFINE REFCOUNTED}{$JPPUNDEF ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynStringArray,, overload;)}
-{$JPPUNDEF GENERIC}{$JPPUNDEF REFCOUNTED}{$JPPDEFINE ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynFloatArray,)}
+{$JPPUNDEF GENERIC}{$JPPUNDEF REFCOUNTED}{$JPPDEFINE ZEROINIT}{$JPPEXPANDMACRO MOVEARRAYIMP(MoveArray,TDynFloatArray,, overload;)}
{$ENDIF ~FPC}
(*$JPPLOOP TRUETYPEINDEX TRUETYPECOUNT
Modified: trunk/jcl/source/prototypes/JclArrayLists.pas
===================================================================
--- trunk/jcl/source/prototypes/JclArrayLists.pas 2012-02-23 21:46:09 UTC (rev 3742)
+++ trunk/jcl/source/prototypes/JclArrayLists.pas 2012-02-23 22:33:59 UTC (rev 3743)
@@ -153,7 +153,7 @@
{$JPPEXPANDMACRO JCLARRAYLISTITRIMP(TJclArrayIterator<T>,IJclIterator<T>,IJclList<T>,const ,AItem,T,GetItem,SetItem)}
-{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclArrayList<T>.MoveArray,TDynArray,Default(T))}
+{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclArrayList<T>.MoveArray,TDynArray,Default(T),)}
//=== { TJclArrayListE<T> } ==================================================
Modified: trunk/jcl/source/prototypes/JclHashSets.pas
===================================================================
--- trunk/jcl/source/prototypes/JclHashSets.pas 2012-02-23 21:46:09 UTC (rev 3742)
+++ trunk/jcl/source/prototypes/JclHashSets.pas 2012-02-23 22:33:59 UTC (rev 3743)
@@ -155,7 +155,7 @@
//=== { TJclHashSetBucket<T> } =================================================
-{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclHashSetBucket<T>.MoveArray,TDynArray,Default(T))}
+{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclHashSetBucket<T>.MoveArray,TDynArray,Default(T),)}
{$JPPEXPANDMACRO JCLHASHSETIMP(TJclHashSet<T>,TJclHashSetBucket<T>,; AOwnsItems: Boolean,AOwnsItems,IJclCollection<T>,TJclHashSetIterator<T>,IJclIterator<T>,Bucket.MoveArray,const ,AItem,T,Default(T),FreeItem)}
Modified: trunk/jcl/source/prototypes/JclQueues.pas
===================================================================
--- trunk/jcl/source/prototypes/JclQueues.pas 2012-02-23 21:46:09 UTC (rev 3742)
+++ trunk/jcl/source/prototypes/JclQueues.pas 2012-02-23 22:33:59 UTC (rev 3743)
@@ -129,7 +129,7 @@
(*$JPPEXPANDMACRO JCLQUEUEIMP(TJclQueue<T>,; AOwnsItems: Boolean,AOwnsItems,MoveArray,const ,AItem,T,Default(T),FreeItem)*)
-{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclQueue<T>.MoveArray,TDynArray,Default(T))}
+{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclQueue<T>.MoveArray,TDynArray,Default(T),)}
//=== { TJclQueueE<T> } ======================================================
Modified: trunk/jcl/source/prototypes/JclVectors.pas
===================================================================
--- trunk/jcl/source/prototypes/JclVectors.pas 2012-02-23 21:46:09 UTC (rev 3742)
+++ trunk/jcl/source/prototypes/JclVectors.pas 2012-02-23 22:33:59 UTC (rev 3743)
@@ -151,7 +151,7 @@
(*$JPPEXPANDMACRO JCLVECTORITRIMP(TJclVectorIterator<T>,IJclIterator<T>,IJclList<T>,const ,AItem,T,GetItem,SetItem)*)
-{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclVector<T>.MoveArray,TDynArray,Default(T))}
+{$JPPDEFINE GENERIC}{$JPPEXPANDMACRO MOVEARRAYIMP(TJclVector<T>.MoveArray,TDynArray,Default(T),)}
//=== { TJclVectorE<T> } =====================================================
Modified: trunk/jcl/source/prototypes/containers/JclAlgorithms.imp
===================================================================
--- trunk/jcl/source/prototypes/containers/JclAlgorithms.imp 2012-02-23 21:46:09 UTC (rev 3742)
+++ trunk/jcl/source/prototypes/containers/JclAlgorithms.imp 2012-02-23 22:33:59 UTC (rev 3743)
@@ -1,6 +1,6 @@
-(*$JPPDEFINEMACRO MOVEARRAYIMP(MOVEARRAYPROCEDURENAME, DYNARRAYTYPENAME, DEFAULTVALUE)
+(*$JPPDEFINEMACRO MOVEARRAYIMP(MOVEARRAYPROCEDURENAME, DYNARRAYTYPENAME, DEFAULTVALUE, OVERLOAD)
{$IFDEF GENERIC}
-procedure MOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);
+procedure MOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
var
I: SizeInt;
begin
@@ -34,86 +34,86 @@
end;
end;
{$ELSE ~GENERIC}
+procedure MOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);OVERLOAD
{$IFDEF REFCOUNTED}
-procedure FinalizeArrayBeforeMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- Assert(Count > 0);
- if FromIndex < ToIndex then
+ procedure FinalizeArrayBeforeMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if Count > (ToIndex - FromIndex) then
- Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ Assert(Count > 0);
+ if FromIndex < ToIndex then
+ begin
+ if Count > (ToIndex - FromIndex) then
+ Finalize(List[FromIndex + Count], ToIndex - FromIndex)
+ else
+ Finalize(List[ToIndex], Count);
+ end
else
- Finalize(List[ToIndex], Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if Count > (FromIndex - ToIndex) then
- Count := FromIndex - ToIndex;
- Finalize(List[ToIndex], Count)
+ if FromIndex > ToIndex then
+ begin
+ if Count > (FromIndex - ToIndex) then
+ Count := FromIndex - ToIndex;
+ Finalize(List[ToIndex], Count)
+ end;
end;
-end;
-procedure InitializeArray(var List: DYNARRAYTYPENAME; FromIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- {$IFDEF FPC}
- while Count > 0 do
+ procedure InitializeArray(var List: DYNARRAYTYPENAME; FromIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- Initialize(List[FromIndex]);
- Inc(FromIndex);
- Dec(Count);
+ {$IFDEF FPC}
+ while Count > 0 do
+ begin
+ Initialize(List[FromIndex]);
+ Inc(FromIndex);
+ Dec(Count);
+ end;
+ {$ELSE ~FPC}
+ Initialize(List[FromIndex], Count);
+ {$ENDIF ~FPC}
end;
- {$ELSE ~FPC}
- Initialize(List[FromIndex], Count);
- {$ENDIF ~FPC}
-end;
-procedure InitializeArrayAfterMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Keep reference counting working }
- if FromIndex < ToIndex then
+ procedure InitializeArrayAfterMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- InitializeArray(List, FromIndex, Count);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ { Keep reference counting working }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ InitializeArray(List, FromIndex, Count);
+ end
else
- InitializeArray(List, FromIndex, Count);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ InitializeArray(List, ToIndex + Count, FromIndex - ToIndex)
+ else
+ InitializeArray(List, FromIndex, Count);
+ end;
end;
-end;
{$ELSE ~REFCOUNTED}
{$IFDEF ZEROINIT}
-procedure InitializeArrayAfterMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt); overload;
-{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
-begin
- { Clean array }
- if FromIndex < ToIndex then
+ procedure InitializeArrayAfterMove(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt);
+ {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
- if (ToIndex - FromIndex) < Count then
- Count := ToIndex - FromIndex;
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
- end
- else
- if FromIndex > ToIndex then
- begin
- if (FromIndex - ToIndex) < Count then
- FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ { Clean array }
+ if FromIndex < ToIndex then
+ begin
+ if (ToIndex - FromIndex) < Count then
+ Count := ToIndex - FromIndex;
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end
else
- FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ if FromIndex > ToIndex then
+ begin
+ if (FromIndex - ToIndex) < Count then
+ FillChar(List[ToIndex + Count], (FromIndex - ToIndex) * SizeOf(List[0]), 0)
+ else
+ FillChar(List[FromIndex], Count * SizeOf(List[0]), 0);
+ end;
end;
-end;
{$ENDIF ZEROINIT}
{$ENDIF ~REFCOUNTED}
-procedure MOVEARRAYPROCEDURENAME(var List: DYNARRAYTYPENAME; FromIndex, ToIndex, Count: SizeInt); overload;
begin
if Count > 0 then
begin
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|