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: <USc...@us...> - 2006-12-11 23:38:35
|
Revision: 1833
http://svn.sourceforge.net/jcl/?rev=1833&view=rev
Author: USchuster
Date: 2006-12-11 15:38:34 -0800 (Mon, 11 Dec 2006)
Log Message:
-----------
speed improvements in TJclSimpleXMLElem.GetBinaryValue and TJclSimpleXMLElemText.LoadFromStream for streams
Modified Paths:
--------------
trunk/jcl/source/common/JclSimpleXml.pas
Modified: trunk/jcl/source/common/JclSimpleXml.pas
===================================================================
--- trunk/jcl/source/common/JclSimpleXml.pas 2006-12-08 20:57:42 UTC (rev 1832)
+++ trunk/jcl/source/common/JclSimpleXml.pas 2006-12-11 23:38:34 UTC (rev 1833)
@@ -1259,20 +1259,51 @@
procedure TJclSimpleXMLElem.GetBinaryValue(const Stream: TStream);
var
I, J: Integer;
- St: string;
Buf: array [0..cBufferSize - 1] of Byte;
+ N1, N2: Byte;
+
+ function NibbleStrToNibble(const AChar: Char): Byte;
+ begin
+ case AChar of
+ '0': Result := 0;
+ '1': Result := 1;
+ '2': Result := 2;
+ '3': Result := 3;
+ '4': Result := 4;
+ '5': Result := 5;
+ '6': Result := 6;
+ '7': Result := 7;
+ '8': Result := 8;
+ '9': Result := 9;
+ 'A': Result := 10;
+ 'B': Result := 11;
+ 'C': Result := 12;
+ 'D': Result := 13;
+ 'E': Result := 14;
+ 'F': Result := 15;
+ else
+ Result := 16;
+ end;
+ end;
+
begin
I := 1;
J := 0;
+ Stream.Size := Stream.Size + Length(Value) div 2;
while I < Length(Value) do
begin
- St := '$' + Value[I] + Value[I + 1];
if J = cBufferSize - 1 then //Buffered write to speed up the process a little
begin
Stream.Write(Buf, J);
J := 0;
end;
- Buf[J] := StrToIntDef(St, 0);
+ //faster replacement for St := '$' + Value[I] + Value[I + 1]; Buf[J] := StrToIntDef(St, 0);
+ N1 := NibbleStrToNibble(Value[I]);
+ N2 := NibbleStrToNibble(Value[I + 1]);
+ if (N1 > 15) or (N2 > 15) then
+ Buf[J] := 0
+ else
+ Buf[J] := N1 shr 4 + N2;
Inc(J);
Inc(I, 2);
end;
@@ -2713,14 +2744,17 @@
I, lStreamPos, Count: Integer;
lBuf: array [0..cBufferSize - 1] of Char;
St: string;
+ StLength: Integer;
begin
lStreamPos := Stream.Position;
St := '';
+ StLength := 0;
repeat
Count := ReadCharsFromStream(Stream, lBuf, Length(lBuf));
if AParent <> nil then
AParent.DoLoadProgress(Stream.Position, Stream.Size);
+ SetLength(St, StLength + Count);
for I := 0 to Count - 1 do
begin
//Increment Stream pos for after comment
@@ -2736,11 +2770,13 @@
end;
else
begin
- St := St + lBuf[I];
+ Inc(StLength);
+ St[StLength] := lBuf[I];
end;
end;
end;
until Count = 0;
+ SetLength(St, StLength);
if GetSimpleXML <> nil then
GetSimpleXML.DoDecodeValue(St);
Value := St;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-12-08 20:57:43
|
Revision: 1832
http://svn.sourceforge.net/jcl/?rev=1832&view=rev
Author: outchy
Date: 2006-12-08 12:57:42 -0800 (Fri, 08 Dec 2006)
Log Message:
-----------
preparing the commitment of initial revisions of the JCL from the Jedi VCS server (before CVS)
Added Paths:
-----------
branches/old_versions_from_jvcs/bin/
branches/old_versions_from_jvcs/devtools/
branches/old_versions_from_jvcs/devtools/buildtest/
branches/old_versions_from_jvcs/devtools/jclbuildnumber/
branches/old_versions_from_jvcs/devtools/readme/
branches/old_versions_from_jvcs/devtools/setfiletime/
branches/old_versions_from_jvcs/devtools/versionbuilder/
branches/old_versions_from_jvcs/help/
branches/old_versions_from_jvcs/help/about jcl/
branches/old_versions_from_jvcs/help/dtx/
branches/old_versions_from_jvcs/help/graphics/
branches/old_versions_from_jvcs/lib/
branches/old_versions_from_jvcs/lib/d5/
branches/old_versions_from_jvcs/lib/d6/
branches/old_versions_from_jvcs/lib/d7/
branches/old_versions_from_jvcs/lib/k3/
branches/old_versions_from_jvcs/packages/
branches/old_versions_from_jvcs/packages/c5/
branches/old_versions_from_jvcs/packages/c6/
branches/old_versions_from_jvcs/packages/d5/
branches/old_versions_from_jvcs/packages/d6/
branches/old_versions_from_jvcs/packages/d6.dev/
branches/old_versions_from_jvcs/packages/d7/
branches/old_versions_from_jvcs/packages/d7.dev/
branches/old_versions_from_jvcs/packages/k3/
branches/old_versions_from_jvcs/packages/k3.dev/
branches/old_versions_from_jvcs/source/
branches/old_versions_from_jvcs/source/common/
branches/old_versions_from_jvcs/source/prototypes/
branches/old_versions_from_jvcs/source/vcl/
branches/old_versions_from_jvcs/source/visclx/
branches/old_versions_from_jvcs/source/windows/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-12-08 19:29:21
|
Revision: 1831
http://svn.sourceforge.net/jcl/?rev=1831&view=rev
Author: outchy
Date: 2006-12-08 11:29:19 -0800 (Fri, 08 Dec 2006)
Log Message:
-----------
preparing the commitment of initial revisions of the JCL from the Jedi VCS server (before CVS)
Added Paths:
-----------
branches/old_versions_from_jvcs/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-12-05 22:38:44
|
Revision: 1830
http://svn.sourceforge.net/jcl/?rev=1830&view=rev
Author: outchy
Date: 2006-12-05 14:38:43 -0800 (Tue, 05 Dec 2006)
Log Message:
-----------
Mantis 3921 Locking options while installing
Modified Paths:
--------------
trunk/jcl/install/prototypes/JediGUIInstall.pas
Modified: trunk/jcl/install/prototypes/JediGUIInstall.pas
===================================================================
--- trunk/jcl/install/prototypes/JediGUIInstall.pas 2006-12-05 22:19:39 UTC (rev 1829)
+++ trunk/jcl/install/prototypes/JediGUIInstall.pas 2006-12-05 22:38:43 UTC (rev 1830)
@@ -80,6 +80,7 @@
FDirectories: TList;
FCheckedCount: Integer;
FInstallCount: Integer;
+ FInstalling: Boolean;
{$IFDEF VCL}
FFormCompile: TFormCompile;
function GetFormCompile: TFormCompile;
@@ -428,6 +429,7 @@
with TTreeView(Sender) do
case Key of
#32:
+ if not FInstalling then
begin
ToggleNodeChecked(Selected);
Key := #0;
@@ -468,7 +470,8 @@
var
Node: TTreeNode;
begin
- with TTreeView(Sender) do
+ if not FInstalling then
+ with TTreeView(Sender) do
begin
Node := GetNodeAt(X, Y);
if (Button = mbLeft) and TreeNodeIconHit(TreeView, X, Y{$IFDEF VisualCLX}, Node{$ENDIF}) then
@@ -678,6 +681,8 @@
Inc(FCheckedCount);
ANode := ANode.GetNext;
end;
+
+ FInstalling := True;
end;
procedure TInstallFrame.MarkOptionBegin(Id: Integer);
@@ -729,6 +734,8 @@
var
ANode: TTreeNode;
begin
+ FInstalling := False;
+
MarkOptionEnd(-1, True);
ANode := TreeView.Items.GetFirstNode;
while Assigned(ANode) do
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-12-05 22:19:43
|
Revision: 1829
http://svn.sourceforge.net/jcl/?rev=1829&view=rev
Author: outchy
Date: 2006-12-05 14:19:39 -0800 (Tue, 05 Dec 2006)
Log Message:
-----------
Limitations for Turbo Explorer
Modified Paths:
--------------
trunk/jcl/install/JclInstall.pas
trunk/jcl/source/common/JclBorlandTools.pas
Modified: trunk/jcl/install/JclInstall.pas
===================================================================
--- trunk/jcl/install/JclInstall.pas 2006-12-03 10:03:23 UTC (rev 1828)
+++ trunk/jcl/install/JclInstall.pas 2006-12-05 22:19:39 UTC (rev 1829)
@@ -830,7 +830,8 @@
begin
AddOption(joEnvLibPath, [goChecked], Parent);
AddOption(joEnvBrowsingPath, [goChecked], Parent);
- AddOption(joEnvDebugDCUPath, [goChecked], Parent);
+ if not Target.IsTurboExplorer then
+ AddOption(joEnvDebugDCUPath, [goChecked], Parent);
end;
procedure AddMakeOptions(Parent: TJclOption);
@@ -1012,25 +1013,28 @@
GUIPage.OptionChecked[Id] := AConfiguration.OptionAsBool[TargetName, Id];
end;
- ADemoList := GetDemoList;
- if AConfiguration.SectionExists(FDemoSectionName) then
- for Index := 0 to ADemoList.Count - 1 do
+ if not Target.IsTurboExplorer then
begin
- Id := Integer(ADemoList.Objects[Index]);
- GUIPage.OptionChecked[Id] := AConfiguration.OptionAsBool[FDemoSectionName, Id];
+ ADemoList := GetDemoList;
+ if AConfiguration.SectionExists(FDemoSectionName) then
+ for Index := 0 to ADemoList.Count - 1 do
+ begin
+ Id := Integer(ADemoList.Objects[Index]);
+ GUIPage.OptionChecked[Id] := AConfiguration.OptionAsBool[FDemoSectionName, Id];
+ end;
+
+ StoredValue := AConfiguration.OptionAsStringByName[TargetName, RsNameBPLPath];
+ if StoredValue = '' then
+ StoredValue := Target.BPLOutputPath;
+ GUIPage.Directories[FGUIBPLPathIndex] := StoredValue;
+ if Target.RadToolKind = brCppBuilder then
+ StoredValue := AConfiguration.OptionAsStringByName[TargetName, RsNameBPIPath]
+ else
+ StoredValue := AConfiguration.OptionAsStringByName[TargetName, RsNameDCPPath];
+ if StoredValue = '' then
+ StoredValue := FJclDcpPath;
+ GUIPage.Directories[FGUIDCPPathIndex] := StoredValue;
end;
-
- StoredValue := AConfiguration.OptionAsStringByName[TargetName, RsNameBPLPath];
- if StoredValue = '' then
- StoredValue := Target.BPLOutputPath;
- GUIPage.Directories[FGUIBPLPathIndex] := StoredValue;
- if Target.RadToolKind = brCppBuilder then
- StoredValue := AConfiguration.OptionAsStringByName[TargetName, RsNameBPIPath]
- else
- StoredValue := AConfiguration.OptionAsStringByName[TargetName, RsNameDCPPath];
- if StoredValue = '' then
- StoredValue := FJclDcpPath;
- GUIPage.Directories[FGUIDCPPathIndex] := StoredValue;
end;
var
@@ -1060,8 +1064,11 @@
AddEnvOptions(joEnvironment);
end;
- AddOption(joMake, [goExpandable, goChecked], OptionData[joLibrary].Id);
- AddMakeOptions(joMake);
+ if not Target.IsTurboExplorer then
+ begin
+ AddOption(joMake, [goExpandable, goChecked], OptionData[joLibrary].Id);
+ AddMakeOptions(joMake);
+ end;
if CLRVersion = '' then
begin
@@ -1069,31 +1076,37 @@
AddRepositoryOptions(joLibrary);
end;
end;
-
- AddOption(joPackages, [goStandAloneParent, goExpandable, goChecked], joLibrary);
- AddPackageOptions(joPackages, RuntimeInstallation);
-
- if CLRVersion = '' then
+
+ if not Target.IsTurboExplorer then
begin
- {$IFDEF MSWINDOWS}
- AddExpertOptions(joPackages, RunTimeInstallation);
- {$ENDIF MSWINDOWS}
- if RunTimeInstallation then
- AddDemoNodes;
+ AddOption(joPackages, [goStandAloneParent, goExpandable, goChecked], joLibrary);
+ AddPackageOptions(joPackages, RuntimeInstallation);
+
+ if CLRVersion = '' then
+ begin
+ {$IFDEF MSWINDOWS}
+ AddExpertOptions(joPackages, RunTimeInstallation);
+ {$ENDIF MSWINDOWS}
+ if RunTimeInstallation then
+ AddDemoNodes;
+ end;
end;
GUIPage.InitDisplay;
- if CLRVersion = '' then
+ if not Target.IsTurboExplorer then
begin
- FGUIBPLPathIndex := GUIPage.AddDirectory(RsCaptionBPLPath);
- if Target.RadToolKind = brCppBuilder then
- FGUIDCPPathIndex := GUIPage.AddDirectory(RsCaptionBPIPath)
+ if (CLRVersion = '') then
+ begin
+ FGUIBPLPathIndex := GUIPage.AddDirectory(RsCaptionBPLPath);
+ if Target.RadToolKind = brCppBuilder then
+ FGUIDCPPathIndex := GUIPage.AddDirectory(RsCaptionBPIPath)
+ else
+ FGUIDCPPathIndex := GUIPage.AddDirectory(RsCaptionDCPPath);
+ end
else
- FGUIDCPPathIndex := GUIPage.AddDirectory(RsCaptionDCPPath);
- end
- else
- FGUIBPLPathIndex := GUIPage.AddDirectory(RsCaptionOutputPath);
+ FGUIBPLPathIndex := GUIPage.AddDirectory(RsCaptionOutputPath);
+ end;
LoadValues;
end;
@@ -1162,7 +1175,7 @@
end;
{$ENDIF MSWINDOWS}
end
- else if Assigned(GUI) and (CLRVersion = '') then
+ else if Assigned(GUI) and (CLRVersion = '') and not Target.IsTurboExplorer then
Result := GUI.Dialog(RsWarningPackageNodeNotSelected, dtConfirmation, [drYes, drNo]) = drYes;
end;
@@ -1312,6 +1325,14 @@
WriteLog('Failed to add cpp search paths.');
end;
{$ENDIF MSWINDOWS}
+ if Target.IsTurboExplorer then
+ begin
+ Result := Target.AddToLibrarySearchPath(Distribution.JclSourcePath);
+ if Result then
+ WriteLog(Format('Added "%s" to library search path.', [Distribution.JclSourcePath]))
+ else
+ WriteLog('Failed to add library search paths.');
+ end;
end
else
WriteLog('Failed to add library search paths.');
@@ -2024,9 +2045,11 @@
RemoveEnvironment;
RemoveMake;
- UninstallPackages;
+ if not Target.IsTurboExplorer then
+ UninstallPackages;
{$IFDEF MSWINDOWS}
- UninstallExperts;
+ if not Target.IsTurboExplorer then
+ UninstallExperts;
UninstallHelp;
{$ENDIF MSWINDOWS}
// TODO: ioJclCopyPackagesHppFiles
@@ -2108,22 +2131,25 @@
AConfiguration.OptionAsBool[TargetName, Id] := GUIPage.OptionChecked[Id];
end;
- ADemoList := GetDemoList;
- for Index := 0 to ADemoList.Count - 1 do
+ if not Target.IsTurboExplorer then
begin
- Id := Integer(ADemoList.Objects[Index]);
- AConfiguration.OptionAsBool[FDemoSectionName, Id] := GUIPage.OptionChecked[Id];
+ ADemoList := GetDemoList;
+ for Index := 0 to ADemoList.Count - 1 do
+ begin
+ Id := Integer(ADemoList.Objects[Index]);
+ AConfiguration.OptionAsBool[FDemoSectionName, Id] := GUIPage.OptionChecked[Id];
+ end;
+
+ AConfiguration.OptionAsStringByName[TargetName, RsNameBPLPath] := GUIPage.Directories[FGUIBPLPathIndex];
+ if Target.RadToolKind = brCppBuilder then
+ AConfiguration.OptionAsStringByName[TargetName, RsNameBPIPath] := GUIPage.Directories[FGUIDCPPathIndex]
+ else
+ AConfiguration.OptionAsStringByName[TargetName, RsNameDCPPath] := GUIPage.Directories[FGUIDCPPathIndex];
end;
-
- AConfiguration.OptionAsStringByName[TargetName, RsNameBPLPath] := GUIPage.Directories[FGUIBPLPathIndex];
- if Target.RadToolKind = brCppBuilder then
- AConfiguration.OptionAsStringByName[TargetName, RsNameBPIPath] := GUIPage.Directories[FGUIDCPPathIndex]
- else
- AConfiguration.OptionAsStringByName[TargetName, RsNameDCPPath] := GUIPage.Directories[FGUIDCPPathIndex];
end;
begin
SaveOptions;
-
+
FGUIPage := nil;
FGUI := nil;
end;
@@ -2853,7 +2879,7 @@
FTargetInstalls.Add(Inst);
{$IFDEF MSWINDOWS}
// .net "virtual" targets
- if (Target is TJclBDSInstallation) and (Target.IDEVersionNumber >= 3) then
+ if (Target is TJclBDSInstallation) and (Target.IDEVersionNumber >= 3) and not Target.IsTurboExplorer then
begin
for Index := 0 to FCLRVersions.Count - 1 do
begin
@@ -3098,7 +3124,6 @@
end;
initialization
+ JediInstall.InstallCore.AddProduct(TJclDistribution.Create);
-JediInstall.InstallCore.AddProduct(TJclDistribution.Create);
-
end.
Modified: trunk/jcl/source/common/JclBorlandTools.pas
===================================================================
--- trunk/jcl/source/common/JclBorlandTools.pas 2006-12-03 10:03:23 UTC (rev 1828)
+++ trunk/jcl/source/common/JclBorlandTools.pas 2006-12-05 22:19:39 UTC (rev 1829)
@@ -554,6 +554,7 @@
function GetGlobals: TStrings;
function GetIdeExeBuildNumber: string;
function GetIdePackages: TJclBorRADToolIdePackages;
+ function GetIsTurboExplorer: Boolean;
function GetLatestUpdatePack: Integer;
function GetLibrarySearchPath: TJclBorRADToolPath;
function GetPalette: TJclBorRADToolPalette;
@@ -709,6 +710,7 @@
{$ENDIF KEEP_DEPRECATED}
property SupportsLibSuffix: Boolean read GetSupportsLibSuffix;
property OutputCallback: TTextHandler read FOutputCallback write SetOutputCallback;
+ property IsTurboExplorer: Boolean read GetIsTurboExplorer;
end;
TJclBCBInstallation = class(TJclBorRADToolInstallation)
@@ -791,7 +793,7 @@
function GetDefaultProjectsDir: string; override;
{class }function RadToolName: string; override;
- function AddToCppSearchPath(const Path: string): Boolean;
+ function AddToCppSearchPath(const Path: string): Boolean;
function AddToCppBrowsingPath(const Path: string): Boolean;
function RemoveFromCppSearchPath(const Path: string): Boolean;
function RemoveFromCppBrowsingPath(const Path: string): Boolean;
@@ -3222,6 +3224,11 @@
Result := FIdePackages;
end;
+function TJclBorRADToolInstallation.GetIsTurboExplorer: Boolean;
+begin
+ Result := (RadToolKind = brBorlandDevStudio) and (VersionNumber = 4) and not (clDcc32 in CommandLineTools);
+end;
+
function TJclBorRADToolInstallation.GetLatestUpdatePack: Integer;
begin
Result := GetLatestUpdatePackForVersion(VersionNumber);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-12-03 10:03:24
|
Revision: 1828
http://svn.sourceforge.net/jcl/?rev=1828&view=rev
Author: outchy
Date: 2006-12-03 02:03:23 -0800 (Sun, 03 Dec 2006)
Log Message:
-----------
HyperThreadingTechnology detection
Modified Paths:
--------------
trunk/jcl/source/common/JclSysInfo.pas
Modified: trunk/jcl/source/common/JclSysInfo.pas
===================================================================
--- trunk/jcl/source/common/JclSysInfo.pas 2006-12-03 10:01:17 UTC (rev 1827)
+++ trunk/jcl/source/common/JclSysInfo.pas 2006-12-03 10:03:23 UTC (rev 1828)
@@ -472,6 +472,7 @@
L3LinesPerSector: Byte;
LogicalCore: Byte;
PhysicalCore: Byte;
+ HyperThreadingTechnology: Boolean;
// todo: TLB
case CpuType: Byte of
CPU_TYPE_INTEL: (IntelSpecific: TIntelSpecific;);
@@ -4058,6 +4059,8 @@
CPUInfo.IntelSpecific.FlushLineSize := (AdditionalInfo and $0000FF00) shr 8;
CPUInfo.IntelSpecific.APICID := (AdditionalInfo and $FF000000) shr 24;
CPUInfo.LogicalCore := (AdditionalInfo and $00FF0000) shr 16;
+ CPUInfo.HyperThreadingTechnology := (CPUInfo.Features and INTEL_HTT) <> 0;
+
if HiVal >= 2 then
begin
CPUInfo.HasCacheInfo := True;
@@ -4263,7 +4266,7 @@
CPUInfo.Is64Bits := CPUInfo.HasExtendedInfo and ((CPUInfo.IntelSpecific.Ex64Features and EINTEL64_EM64T)<>0);
CPUInfo.DepCapable := CPUInfo.HasExtendedInfo and ((CPUInfo.IntelSpecific.Ex64Features and EINTEL64_EDB) <> 0);
end;
-
+
procedure ProcessAMD(var CPUInfo: TCpuInfo; HiVal: Cardinal);
var
ExHiVal, Unused, VersionInfo, AdditionalInfo: Cardinal;
@@ -4279,7 +4282,8 @@
CPUInfo.AMDSpecific.BrandID := VersionInfo and $000000FF;
CPUInfo.AMDSpecific.FlushLineSize := (VersionInfo and $0000FF00) shr 8;
CPUInfo.AMDSpecific.APICID := (VersionInfo and $FF000000) shr 24;
- if (CPUInfo.Features and AMD_HTT) <> 0 then
+ CPUInfo.HyperThreadingTechnology := (CPUInfo.Features and AMD_HTT) <> 0;
+ if CPUInfo.HyperThreadingTechnology then
CPUInfo.LogicalCore := (AdditionalInfo and $00FF0000) shr 16;
end;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-12-03 10:01:18
|
Revision: 1827
http://svn.sourceforge.net/jcl/?rev=1827&view=rev
Author: outchy
Date: 2006-12-03 02:01:17 -0800 (Sun, 03 Dec 2006)
Log Message:
-----------
Minor style cleaning.
Modified Paths:
--------------
trunk/jcl/source/common/JclEDIXML.pas
Modified: trunk/jcl/source/common/JclEDIXML.pas
===================================================================
--- trunk/jcl/source/common/JclEDIXML.pas 2006-11-30 19:19:48 UTC (rev 1826)
+++ trunk/jcl/source/common/JclEDIXML.pas 2006-12-03 10:01:17 UTC (rev 1827)
@@ -197,6 +197,7 @@
// EDI Element
TEDIXMLElement = class(TEDIXMLDataObject)
+ private
FCData: Boolean;
public
constructor Create(Parent: TEDIXMLDataObject); reintroduce;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-30 19:19:50
|
Revision: 1826
http://svn.sourceforge.net/jcl/?rev=1826&view=rev
Author: outchy
Date: 2006-11-30 11:19:48 -0800 (Thu, 30 Nov 2006)
Log Message:
-----------
Updated to the latest specifications of Intel and AMD
CPUID rewritten in purepascal (easier to maintain)
New features detection: logical cores, physical cores, NX (non execute) bit, SSE3 (Streaming SIMD Extension 3), SSSE3 (Supplement to Streaming SIMD Extensions 3).
Modified Paths:
--------------
trunk/jcl/source/common/JclResources.pas
trunk/jcl/source/common/JclSysInfo.pas
Modified: trunk/jcl/source/common/JclResources.pas
===================================================================
--- trunk/jcl/source/common/JclResources.pas 2006-11-27 21:19:43 UTC (rev 1825)
+++ trunk/jcl/source/common/JclResources.pas 2006-11-30 19:19:48 UTC (rev 1826)
@@ -1650,56 +1650,64 @@
RsIntelUnknownCache = 'Unknown cache ID (%.2x)';
RsIntelCacheDescr00 = 'Null descriptor';
- RsIntelCacheDescr01 = 'Instruction TLB, 4Kb pages, 4-way set associative, 32 entries';
- RsIntelCacheDescr02 = 'Instruction TLB, 4Mb pages, fully associative, 2 entries';
- RsIntelCacheDescr03 = 'Data TLB, 4Kb pages, 4-way set associative, 64 entries';
- RsIntelCacheDescr04 = 'Data TLB, 4Mb pages, 4-way set associative, 8 entries';
- RsIntelCacheDescr06 = '8KB instruction cache, 4-way set associative, 32 byte line size';
- RsIntelCacheDescr08 = '16KB instruction cache, 4-way set associative, 32 byte line size';
- RsIntelCacheDescr0A = '8KB data cache 2-way set associative, 32 byte line size';
- RsIntelCacheDescr0C = '16KB data cache, 4-way set associative, 32 byte line size';
- RsIntelCacheDescr22 = '3 Level cache, 512 KBytes, 4-way set associative, 2 lines per sector, 128 byte sector size';
- RsIntelCacheDescr23 = '3 Level cache, 1 MBytes, 8-way set associative, 2 lines per sector, 128 byte sector size';
- RsIntelCacheDescr25 = '3 Level cache, 2 MBytes, 8-way set associative, 2 lines per sector, 128 byte line size';
- RsIntelCacheDescr29 = '3 Level cache, 4M Bytes, 8-way set associative, 2 lines per sector, 128 byte line size';
- RsIntelCacheDescr2C = '1 Level data cache: 32K Bytes, 8-way set associative, 64 byte line size';
- RsIntelCacheDescr30 = '1 Level instruction cache: 32K Bytes, 8-way set associative, 64 byte line size';
- RsIntelCacheDescr40 = 'No L2 cache';
- RsIntelCacheDescr41 = 'Unified cache, 32 byte cache line, 4-way set associative, 128Kb';
- RsIntelCacheDescr42 = 'Unified cache, 32 byte cache line, 4-way set associative, 256Kb';
- RsIntelCacheDescr43 = 'Unified cache, 32 byte cache line, 4-way set associative, 512Kb';
- RsIntelCacheDescr44 = 'Unified cache, 32 byte cache line, 4-way set associative, 1Mb';
- RsIntelCacheDescr45 = 'Unified cache, 32 byte cache line, 4-way set associative, 2Mb';
- RsIntelCacheDescr50 = 'Instruction TLB, 4 KBytes and 2 MBytes or 4 MBytes pages, 64 Entries';
- RsIntelCacheDescr51 = 'Instruction TLB, 4 KBytes and 2 MBytes or 4 MBytes pages, 128 Entries';
- RsIntelCacheDescr52 = 'Instruction TLB, 4 KBytes and 2 MBytes or 4 MBytes pages, 256 Entries';
- RsIntelCacheDescr5B = 'Data TLB, 4 KBytes and 4 MBytes pages, 64 Entries';
- RsIntelCacheDescr5C = 'Data TLB, 4 KBytes and 4 MBytes pages, 128 Entries';
- RsIntelCacheDescr5D = 'Data TLB, 4 KBytes and 4 MBytes pages, 256 Entries';
- RsIntelCacheDescr60 = '1 Level data cache: 16 KByte, 8-way set associative, 64 byte line size';
- RsIntelCacheDescr66 = '1 Level Data cache, 8 KBytes, 4-way set associative, 64 Bytes line size';
- RsIntelCacheDescr67 = '1 Level Data cache, 16 KBytes, 4-way set associative, 64 Bytes line size';
- RsIntelCacheDescr68 = '1 Level Data cache, 32 KBytes, 4-way set associative, 64 Bytes line size';
- RsIntelCacheDescr70 = 'Trace cache, 12 KOps, 8-way set associative';
- RsIntelCacheDescr71 = 'Trace cache, 16 KOps, 8-way set associative';
- RsIntelCacheDescr72 = 'Trace cache, 32 KOps, 8-way set associative';
- RsIntelCacheDescr78 = '2 Level cache, 1 MBytes, 4-way set associative, 64 Bytes line size';
- RsIntelCacheDescr79 = '2 Level cache, 128 KBytes, 8-way set associative, dual-sectored line, 64 Bytes sector size';
- RsIntelCacheDescr7A = '2 Level cache, 256 KBytes, 8-way set associative, dual-sectored line, 64 Bytes sector size';
- RsIntelCacheDescr7B = '2 Level cache, 512 KBytes, 8-way set associative, dual-sectored line, 64 Bytes sector size';
- RsIntelCacheDescr7C = '2 Level cache, 1 MBytes, 8-way set associative, dual-sectored line, 64 Bytes sector size';
- RsIntelCacheDescr7D = '2 Level cache, 2 MByte, 8-way set associative, 64byte line size';
- RsIntelCacheDescr7F = '2 Level cache, 512 KByte, 2-way set associative, 64-byte line size';
- RsIntelCacheDescr82 = '2 Level cache, 256 KBytes, 8-way associative, 32 Bytes line size';
- RsIntelCacheDescr83 = '2 Level cache, 512 KBytes, 8-way associative, 32 Bytes line size';
- RsIntelCacheDescr84 = '2 Level cache, 1 MBytes, 8-way associative, 32 Bytes line size';
- RsIntelCacheDescr85 = '2 Level cache, 2 MBytes, 8-way associative, 32 Bytes line size';
- RsIntelCacheDescr86 = '2 Level cache, 512 KByte, 4-way set associative, 64 byte line size';
- RsIntelCacheDescr87 = '2 Level cache, 1 MByte, 8-way set associative, 64 byte line size';
- RsIntelCacheDescrB0 = 'Instruction TLB, 4 KByte Pages, 4-way set associative, 128 entries';
- RsIntelCacheDescrB3 = 'Data TLB, 4 KByte Pages, 4-way set associative, 128 entries';
- RsIntelCacheDescrF0 = '64-Byte Prefetching';
- RsIntelCacheDescrF1 = '128-Byte Prefetching';
+ RsIntelCacheDescr01 = 'Instruction TLB: 4 KByte pages, 4-way set associative, 32 entries';
+ RsIntelCacheDescr02 = 'Instruction TLB: 4 MByte pages, 4-way set associative, 2 entries';
+ RsIntelCacheDescr03 = 'Data TLB: 4 KByte pages, 4-way set associative, 64 entries';
+ RsIntelCacheDescr04 = 'Data TLB: 4 MByte pages, 4-way set associative, 8 entries';
+ RsIntelCacheDescr05 = 'Data TLB1: 4 MByte pages, 4-way set associative, 32 entries';
+ RsIntelCacheDescr06 = '1st level instruction cache: 8 KBytes, 4-way set associative, 32 byte line size';
+ RsIntelCacheDescr08 = '1st level instruction cache: 16 KBytes, 4-way set associative, 32 byte line size';
+ RsIntelCacheDescr0A = '1st level data cache: 8 KBytes, 2-way set associative, 32 byte line size';
+ RsIntelCacheDescr0B = 'Instruction TLB: 4 MByte pages, 4-way set associative, 4 entries';
+ RsIntelCacheDescr0C = '1st level data cache: 16 KBytes, 4-way set associative, 32 byte line size';
+ RsIntelCacheDescr22 = '3rd level cache: 512 KBytes, 4-way set associative, 64 byte line size, 2 lines per sector';
+ RsIntelCacheDescr23 = '3rd level cache: 1 MBytes, 8-way set associative, 64 byte line size, 2 lines per sector';
+ RsIntelCacheDescr25 = '3rd level cache: 2 MBytes, 8-way set associative, 64 byte line size, 2 lines per sector';
+ RsIntelCacheDescr29 = '3rd level cache: 4 MBytes, 8-way set associative, 64 byte line size, 2 lines per sector';
+ RsIntelCacheDescr2C = '1st level data cache: 32 KBytes, 8-way set associative, 64 byte line size';
+ RsIntelCacheDescr30 = '1st level instruction cache: 32 KBytes, 8-way set associative, 64 byte line size';
+ RsIntelCacheDescr40 = 'No 2nd-level cache or, if processor contains a valid 2nd-level cache, no 3rd-level cache';
+ RsIntelCacheDescr41 = '2nd-level cache: 128 KBytes, 4-way set associative, 32 byte line size';
+ RsIntelCacheDescr42 = '2nd-level cache: 256 KBytes, 4-way set associative, 32 byte line size';
+ RsIntelCacheDescr43 = '2nd-level cache: 512 KBytes, 4-way set associative, 32 byte line size';
+ RsIntelCacheDescr44 = '2nd-level cache: 1 MBytes, 4-way set associative, 32 byte line size';
+ RsIntelCacheDescr45 = '2nd-level cache: 2 MBytes, 4-way set associative, 32 byte line size';
+ RsIntelCacheDescr46 = '3rd-level cache: 4 MBytes, 4-way set associative, 64 byte line size';
+ RsIntelCacheDescr47 = '3rd-level cache: 8 MBytes, 4-way set associative, 64 byte line size';
+ RsIntelCacheDescr49 = '2nd-level cache: 4 MBytes, 16-way set associative, 64 byte line size';
+ RsIntelCacheDescr50 = 'Instruction TLB: 4 KByte and 2 MByte or 4 MByte pages, 64 Entries';
+ RsIntelCacheDescr51 = 'Instruction TLB: 4 KByte and 2 MByte or 4 MByte pages, 128 Entries';
+ RsIntelCacheDescr52 = 'Instruction TLB: 4 KByte and 2 MByte or 4 MByte pages, 256 Entries';
+ RsIntelCacheDescr56 = 'Data TLB0: 4 MByte pages, 4-way set associative, 16 entries';
+ RsIntelCacheDescr57 = 'Data TLB0: 4 KByte pages, 4-way associative, 16 entries';
+ RsIntelCacheDescr5B = 'Data TLB: 4 KByte and 4 MByte pages, 64 Entries';
+ RsIntelCacheDescr5C = 'Data TLB: 4 KByte and 4 MByte pages, 128 Entries';
+ RsIntelCacheDescr5D = 'Data TLB: 4 KByte and 4 MByte pages, 256 Entries';
+ RsIntelCacheDescr60 = '1st-level data cache: 16 KByte, 8-way set associative, 64 byte line size';
+ RsIntelCacheDescr66 = '1st-level data cache: 8 KBytes, 4-way set associative, 64 byte line size';
+ RsIntelCacheDescr67 = '1st-level data cache: 16 KBytes, 4-way set associative, 64 byte line size';
+ RsIntelCacheDescr68 = '1st-level data cache: 32 KBytes, 4-way set associative, 64 byte line size';
+ RsIntelCacheDescr70 = 'Trace cache: 12 K-\xB5Ops, 8-way set associative';
+ RsIntelCacheDescr71 = 'Trace cache: 16 K-\xB5Ops, 8-way set associative';
+ RsIntelCacheDescr72 = 'Trace cache: 32 K-\xB5Ops, 8-way set associative';
+ RsIntelCacheDescr78 = '2nd-level cache: 1 MBytes, 4-way set associative, 64 bytes line size';
+ RsIntelCacheDescr79 = '2nd-level cache: 128 KBytes, 8-way set associative, 64 bytes line size, 2 lines per sector';
+ RsIntelCacheDescr7A = '2nd-level cache: 256 KBytes, 8-way set associative, 64 bytes line size, 2 lines per sector';
+ RsIntelCacheDescr7B = '2nd-level cache: 512 KBytes, 8-way set associative, 64 bytes line size, 2 lines per sector';
+ RsIntelCacheDescr7C = '2nd-level cache: 1 MBytes, 8-way set associative, 64 bytes line size, 2 lines per sector';
+ RsIntelCacheDescr7D = '2nd-level cache: 2 MBytes, 8-way set associative, 64 byte line size';
+ RsIntelCacheDescr7F = '2nd-level cache: 512 KBytes, 2-way set associative, 64 byte line size';
+ RsIntelCacheDescr82 = '2nd-level cache: 256 KBytes, 8-way associative, 32 byte line size';
+ RsIntelCacheDescr83 = '2nd-level cache: 512 KBytes, 8-way associative, 32 byte line size';
+ RsIntelCacheDescr84 = '2nd-level cache: 1 MBytes, 8-way associative, 32 byte line size';
+ RsIntelCacheDescr85 = '2nd-level cache: 2 MBytes, 8-way associative, 32 byte line size';
+ RsIntelCacheDescr86 = '2nd-level cache: 512 KByte, 4-way set associative, 64 byte line size';
+ RsIntelCacheDescr87 = '2nd-level cache: 1 MByte, 8-way set associative, 64 byte line size';
+ RsIntelCacheDescrB0 = 'Instruction TLB: 4 KByte pages, 4-way set associative, 128 entries';
+ RsIntelCacheDescrB3 = 'Data TLB: 4 KByte pages, 4-way set associative, 128 entries';
+ RsIntelCacheDescrB4 = 'Data TLB1: 4 KByte pages, 4-way set associative, 256 entries';
+ RsIntelCacheDescrF0 = '64-Byte Prefetching';
+ RsIntelCacheDescrF1 = '128-Byte Prefetching';
RsOSVersionWin95 = 'Windows 95';
RsOSVersionWin95OSR2 = 'Windows 95 OSR2';
Modified: trunk/jcl/source/common/JclSysInfo.pas
===================================================================
--- trunk/jcl/source/common/JclSysInfo.pas 2006-11-27 21:19:43 UTC (rev 1825)
+++ trunk/jcl/source/common/JclSysInfo.pas 2006-11-30 19:19:48 UTC (rev 1826)
@@ -333,8 +333,13 @@
L2Cache: Cardinal;
CacheDescriptors: array [0..15] of Byte;
BrandID: Byte;
+ FlushLineSize: Byte;
+ APICID: Byte;
ExFeatures: Cardinal;
Ex64Features: Cardinal;
+ Ex64Features2: Cardinal;
+ PhysicalAddressBits: Byte;
+ VirtualAddressBits: Byte;
end;
TCyrixSpecific = record
@@ -342,16 +347,26 @@
TLBInfo: array [0..3] of Byte;
end;
- TAMDSpecific = record
+ TAMDSpecific = packed record
ExFeatures: Cardinal;
- MByteDataTLB: array [TTLBInformation] of Byte;
- MByteInstructionTLB: array [TTLBInformation] of Byte;
- KByteDataTLB: array [TTLBInformation] of Byte;
- KByteInstructionTLB: array [TTLBInformation] of Byte;
+ ExFeatures2: Cardinal;
+ Features2: Cardinal;
+ BrandID: Byte;
+ FlushLineSize: Byte;
+ APICID: Byte;
+ ExBrandID: Word;
+ // do not split L1 MByte TLB
+ L1MByteInstructionTLB: array [TTLBInformation] of Byte;
+ L1MByteDataTLB: array [TTLBInformation] of Byte;
+ // do not split L1 KByte TLB
+ L1KByteInstructionTLB: array [TTLBInformation] of Byte;
+ L1KByteDataTLB: array [TTLBInformation] of Byte;
L1DataCache: array [TCacheInformation] of Byte;
L1InstructionCache: array [TCacheInformation] of Byte;
- L2MByteDataTLB: array [TTLBInformation] of Byte; // L2 TLB for 2-MByte and 4-MByte pages
+ // do not split L2 MByte TLB
L2MByteInstructionTLB: array [TTLBInformation] of Byte; // L2 TLB for 2-MByte and 4-MByte pages
+ L2MByteDataTLB: array [TTLBInformation] of Byte; // L2 TLB for 2-MByte and 4-MByte pages
+ // do not split L2 KByte TLB
L2KByteDataTLB: array [TTLBInformation] of Byte; // L2 TLB for 4-KByte pages
L2KByteInstructionTLB: array [TTLBInformation] of Byte; // L2 TLB for 4-KByte pages
L2Cache: Cardinal;
@@ -428,7 +443,7 @@
SSE: Byte; // SSE version 0 = no SSE, 1 = SSE, 2 = SSE2, 3 = SSE3
IsFDIVOK: Boolean;
Is64Bits: Boolean;
- DEPEnabled: Boolean; // incomplete
+ DEPCapable: Boolean;
HasCacheInfo: Boolean;
HasExtendedInfo: Boolean;
PType: Byte;
@@ -455,6 +470,8 @@
L3CacheLineSize: Byte; // in Byte
L3CacheAssociativity: Byte;
L3LinesPerSector: Byte;
+ LogicalCore: Byte;
+ PhysicalCore: Byte;
// todo: TLB
case CpuType: Byte of
CPU_TYPE_INTEL: (IntelSpecific: TIntelSpecific;);
@@ -587,15 +604,15 @@
EINTEL_BIT_2 = BIT_2; // Reserved, do not count on value
EINTEL_MONITOR = BIT_3; // Monitor/MWAIT
EINTEL_DSCPL = BIT_4; // CPL Qualified debug Store
- EINTEL_BIT_5 = BIT_5; // Reserved, do not count on value
+ EINTEL_VMX = BIT_5; // Virtual Machine Technology
EINTEL_BIT_6 = BIT_6; // Reserved, do not count on value
EINTEL_EST = BIT_7; // Enhanced Intel Speedstep technology
EINTEL_TM2 = BIT_8; // Thermal monitor 2
- EINTEL_BIT_9 = BIT_9; // Reserved, do not count on value
+ EINTEL_SSSE3 = BIT_9; // SSSE 3 extensions
EINTEL_CNXTID = BIT_10; // L1 Context ID
EINTEL_BIT_11 = BIT_11; // Reserved, do not count on value
EINTEL_BIT_12 = BIT_12; // Reserved, do not count on value
- EINTEL_BIT_13 = BIT_13; // Reserved, do not count on value
+ EINTEL_CMPXCHG16B = BIT_13; // CMPXCHG16B instruction
EINTEL_XTPR = BIT_14; // Send Task Priority messages
EINTEL_BIT_15 = BIT_15; // Reserved, do not count on value
EINTEL_BIT_16 = BIT_16; // Reserved, do not count on value
@@ -636,7 +653,7 @@
EINTEL64_BIT_17 = BIT_17; // Reserved, do not count on value
EINTEL64_BIT_18 = BIT_18; // Reserved, do not count on value
EINTEL64_BIT_19 = BIT_19; // Reserved, do not count on value
- EINTEL64_BIT_20 = BIT_20; // Reserved, do not count on value
+ EINTEL64_EDB = BIT_20; // Execute Disable Bit
EINTEL64_BIT_21 = BIT_21; // Reserved, do not count on value
EINTEL64_BIT_22 = BIT_22; // Reserved, do not count on value
EINTEL64_BIT_23 = BIT_23; // Reserved, do not count on value
@@ -649,6 +666,40 @@
EINTEL64_BIT_30 = BIT_30; // Reserved, do not count on value
EINTEL64_BIT_31 = BIT_31; // Reserved, do not count on value
+ { Extended Intel 64 Bits Feature Flags continued }
+ EINTEL64_2_LAHF = BIT_0; // LAHF/SAHF available in 64 bit mode
+ EINTEL64_2_BIT_1 = BIT_1; // Reserved, do not count on value
+ EINTEL64_2_BIT_2 = BIT_2; // Reserved, do not count on value
+ EINTEL64_2_BIT_3 = BIT_3; // Reserved, do not count on value
+ EINTEL64_2_BIT_4 = BIT_4; // Reserved, do not count on value
+ EINTEL64_2_BIT_5 = BIT_5; // Reserved, do not count on value
+ EINTEL64_2_BIT_6 = BIT_6; // Reserved, do not count on value
+ EINTEL64_2_BIT_7 = BIT_7; // Reserved, do not count on value
+ EINTEL64_2_BIT_8 = BIT_8; // Reserved, do not count on value
+ EINTEL64_2_BIT_9 = BIT_9; // Reserved, do not count on value
+ EINTEL64_2_BIT_10 = BIT_10; // Reserved, do not count on value
+ EINTEL64_2_BIT_11 = BIT_11; // Reserved, do not count on value
+ EINTEL64_2_BIT_12 = BIT_12; // Reserved, do not count on value
+ EINTEL64_2_BIT_13 = BIT_13; // Reserved, do not count on value
+ EINTEL64_2_BIT_14 = BIT_14; // Reserved, do not count on value
+ EINTEL64_2_BIT_15 = BIT_15; // Reserved, do not count on value
+ EINTEL64_2_BIT_16 = BIT_16; // Reserved, do not count on value
+ EINTEL64_2_BIT_17 = BIT_17; // Reserved, do not count on value
+ EINTEL64_2_BIT_18 = BIT_18; // Reserved, do not count on value
+ EINTEL64_2_BIT_19 = BIT_19; // Reserved, do not count on value
+ EINTEL64_2_BIT_20 = BIT_20; // Reserved, do not count on value
+ EINTEL64_2_BIT_21 = BIT_21; // Reserved, do not count on value
+ EINTEL64_2_BIT_22 = BIT_22; // Reserved, do not count on value
+ EINTEL64_2_BIT_23 = BIT_23; // Reserved, do not count on value
+ EINTEL64_2_BIT_24 = BIT_24; // Reserved, do not count on value
+ EINTEL64_2_BIT_25 = BIT_25; // Reserved, do not count on value
+ EINTEL64_2_BIT_26 = BIT_26; // Reserved, do not count on value
+ EINTEL64_2_BIT_27 = BIT_27; // Reserved, do not count on value
+ EINTEL64_2_BIT_28 = BIT_28; // Reserved, do not count on value
+ EINTEL64_2_BIT_29 = BIT_29; // Reserved, do not count on value
+ EINTEL64_2_BIT_30 = BIT_30; // Reserved, do not count on value
+ EINTEL64_2_BIT_31 = BIT_31; // Reserved, do not count on value
+
{ AMD Standard Feature Flags }
AMD_FPU = BIT_0; // Floating-Point unit on chip
AMD_VME = BIT_1; // Virtual Mode Extention
@@ -667,22 +718,56 @@
AMD_MCA = BIT_14; // Machine Check Architecture
AMD_CMOV = BIT_15; // Conditional Move Instruction
AMD_PAT = BIT_16; // Page Attribute Table
- AMD_PSE2 = BIT_17; // Page Size Extensions
+ AMD_PSE32 = BIT_17; // Page Size Extensions
AMD_BIT_18 = BIT_18; // Reserved, do not count on value
AMD_CLFLSH = BIT_19; // CLFLUSH instruction
AMD_BIT_20 = BIT_20; // Reserved, do not count on value
AMD_BIT_21 = BIT_21; // Reserved, do not count on value
AMD_BIT_22 = BIT_22; // Reserved, do not count on value
AMD_MMX = BIT_23; // MMX technology
- AMD_FX = BIT_24; // FXSAVE and FXSTORE instructions
+ AMD_FXSR = BIT_24; // FXSAVE and FXSTORE instructions
AMD_SSE = BIT_25; // SSE Extensions
AMD_SSE2 = BIT_26; // SSE2 Extensions
AMD_BIT_27 = BIT_27; // Reserved, do not count on value
- AMD_BIT_28 = BIT_28; // Reserved, do not count on value
+ AMD_HTT = BIT_28; // Hyper-Threading Technology
AMD_BIT_29 = BIT_29; // Reserved, do not count on value
AMD_BIT_30 = BIT_30; // Reserved, do not count on value
AMD_BIT_31 = BIT_31; // Reserved, do not count on value
+ { AMD Standard Feature Flags continued }
+ AMD2_SSE3 = BIT_0; // SSE3 extensions
+ AMD2_BIT_1 = BIT_1; // Reserved, do not count on value
+ AMD2_BIT_2 = BIT_2; // Reserved, do not count on value
+ AMD2_BIT_3 = BIT_3; // Reserved, do not count on value
+ AMD2_BIT_4 = BIT_4; // Reserved, do not count on value
+ AMD2_BIT_5 = BIT_5; // Reserved, do not count on value
+ AMD2_BIT_6 = BIT_6; // Reserved, do not count on value
+ AMD2_BIT_7 = BIT_7; // Reserved, do not count on value
+ AMD2_BIT_8 = BIT_8; // Reserved, do not count on value
+ AMD2_BIT_9 = BIT_9; // Reserved, do not count on value
+ AMD2_BIT_10 = BIT_10; // Reserved, do not count on value
+ AMD2_BIT_11 = BIT_11; // Reserved, do not count on value
+ AMD2_BIT_12 = BIT_12; // Reserved, do not count on value
+ AMD2_CMPXCHG16B = BIT_13; // CMPXCHG16B available
+ AMD2_BIT_14 = BIT_14; // Reserved, do not count on value
+ AMD2_BIT_15 = BIT_15; // Reserved, do not count on value
+ AMD2_BIT_16 = BIT_16; // Reserved, do not count on value
+ AMD2_BIT_17 = BIT_17; // Reserved, do not count on value
+ AMD2_BIT_18 = BIT_18; // Reserved, do not count on value
+ AMD2_BIT_19 = BIT_19; // Reserved, do not count on value
+ AMD2_BIT_20 = BIT_20; // Reserved, do not count on value
+ AMD2_BIT_21 = BIT_21; // Reserved, do not count on value
+ AMD2_BIT_22 = BIT_22; // Reserved, do not count on value
+ AMD2_BIT_23 = BIT_23; // Reserved, do not count on value
+ AMD2_BIT_24 = BIT_24; // Reserved, do not count on value
+ AMD2_BIT_25 = BIT_25; // Reserved, do not count on value
+ AMD2_BIT_26 = BIT_26; // Reserved, do not count on value
+ AMD2_BIT_27 = BIT_27; // Reserved, do not count on value
+ AMD2_BIT_28 = BIT_28; // Reserved, do not count on value
+ AMD2_BIT_29 = BIT_29; // Reserved, do not count on value
+ AMD2_BIT_30 = BIT_30; // Reserved, do not count on value
+ AMD2_RAZ = BIT_31; // RAZ
+
{ AMD Enhanced Feature Flags }
EAMD_FPU = BIT_0; // Floating-Point unit on chip
EAMD_VME = BIT_1; // Virtual Mode Extention
@@ -704,7 +789,7 @@
EAMD_PSE2 = BIT_17; // Page Size Extensions
EAMD_BIT_18 = BIT_18; // Reserved, do not count on value
EAMD_BIT_19 = BIT_19; // Reserved, do not count on value
- EAMD_NEPP = BIT_20; // No-Execute Page Protection
+ EAMD_NX = BIT_20; // No-Execute Page Protection
EAMD_BIT_21 = BIT_21; // Reserved, do not count on value
EAMD_EXMMX = BIT_22; // AMD Extensions to MMX technology
EAMD_MMX = BIT_23; // MMX technology
@@ -717,13 +802,73 @@
EAMD_EX3DNOW = BIT_30; // AMD Extensions to 3DNow! intructions
EAMD_3DNOW = BIT_31; // AMD 3DNOW! Technology
+ { AMD Extended Feature Flags continued }
+ EAMD2_LAHF = BIT_0; // LAHF/SAHF available in 64-bit mode
+ EAMD2_CMPLEGACY = BIT_1; // core multi-processing legacy mode
+ EAMD2_SVM = BIT_2; // Secure Virtual Machine
+ EAMD2_BIT_3 = BIT_3; // Reserved, do not count on value
+ EAMD2_ALTMOVCR8 = BIT_4; // LOCK MOV CR0 means MOV CR8
+ EAMD2_BIT_5 = BIT_5; // Reserved, do not count on value
+ EAMD2_BIT_6 = BIT_6; // Reserved, do not count on value
+ EAMD2_BIT_7 = BIT_7; // Reserved, do not count on value
+ EAMD2_BIT_8 = BIT_8; // Reserved, do not count on value
+ EAMD2_BIT_9 = BIT_9; // Reserved, do not count on value
+ EAMD2_BIT_10 = BIT_10; // Reserved, do not count on value
+ EAMD2_BIT_11 = BIT_11; // Reserved, do not count on value
+ EAMD2_BIT_12 = BIT_12; // Reserved, do not count on value
+ EAMD2_BIT_13 = BIT_13; // Reserved, do not count on value
+ EAMD2_BIT_14 = BIT_14; // Reserved, do not count on value
+ EAMD2_BIT_15 = BIT_15; // Reserved, do not count on value
+ EAMD2_BIT_16 = BIT_16; // Reserved, do not count on value
+ EAMD2_BIT_17 = BIT_17; // Reserved, do not count on value
+ EAMD2_BIT_18 = BIT_18; // Reserved, do not count on value
+ EAMD2_BIT_19 = BIT_19; // Reserved, do not count on value
+ EAMD2_BIT_20 = BIT_20; // Reserved, do not count on value
+ EAMD2_BIT_21 = BIT_21; // Reserved, do not count on value
+ EAMD2_BIT_22 = BIT_22; // Reserved, do not count on value
+ EAMD2_BIT_23 = BIT_23; // Reserved, do not count on value
+ EAMD2_BIT_24 = BIT_24; // Reserved, do not count on value
+ EAMD2_BIT_25 = BIT_25; // Reserved, do not count on value
+ EAMD2_BIT_26 = BIT_26; // Reserved, do not count on value
+ EAMD2_BIT_27 = BIT_27; // Reserved, do not count on value
+ EAMD2_BIT_28 = BIT_28; // Reserved, do not count on value
+ EAMD2_BIT_29 = BIT_29; // Reserved, do not count on value
+ EAMD2_BIT_30 = BIT_30; // Reserved, do not count on value
+ EAMD2_BIT_31 = BIT_31; // Reserved, do not count on value
+
{ AMD Power Management Features Flags }
- PAMD_TEMPSENSOR = $00000001; // Temperature Sensor
- PAMD_FREQUENCYID = $00000002; // Frequency ID Control
- PAMD_VOLTAGEID = $00000004; // Voltage ID Control
- PAMD_THERMALTRIP = $00000008; // Thermal Trip
- PAMD_THERMALMONITOR = $00000010; // Thermal Monitoring
- PAMD_SOFTTHERMCONTROL = $00000020; // Software Thermal Control
+ PAMD_TEMPSENSOR = BIT_0; // Temperature Sensor
+ PAMD_FREQUENCYID = BIT_1; // Frequency ID Control
+ PAMD_VOLTAGEID = BIT_2; // Voltage ID Control
+ PAMD_THERMALTRIP = BIT_3; // Thermal Trip
+ PAMD_THERMALMONITOR = BIT_4; // Thermal Monitoring
+ PAMD_SOFTTHERMCONTROL = BIT_5; // Software Thermal Control
+ PAMD_BIT_6 = BIT_6; // Reserved, do not count on value
+ PAMD_BIT_7 = BIT_7; // Reserved, do not count on value
+ PAMD_TSC_INVARIANT = BIT_8; // TSC rate is invariant
+ PAMD_BIT_9 = BIT_9; // Reserved, do not count on value
+ PAMD_BIT_10 = BIT_10; // Reserved, do not count on value
+ PAMD_BIT_11 = BIT_11; // Reserved, do not count on value
+ PAMD_BIT_12 = BIT_12; // Reserved, do not count on value
+ PAMD_BIT_13 = BIT_13; // Reserved, do not count on value
+ PAMD_BIT_14 = BIT_14; // Reserved, do not count on value
+ PAMD_BIT_15 = BIT_15; // Reserved, do not count on value
+ PAMD_BIT_16 = BIT_16; // Reserved, do not count on value
+ PAMD_BIT_17 = BIT_17; // Reserved, do not count on value
+ PAMD_BIT_18 = BIT_18; // Reserved, do not count on value
+ PAMD_BIT_19 = BIT_19; // Reserved, do not count on value
+ PAMD_BIT_20 = BIT_20; // Reserved, do not count on value
+ PAMD_BIT_21 = BIT_21; // Reserved, do not count on value
+ PAMD_BIT_22 = BIT_22; // Reserved, do not count on value
+ PAMD_BIT_23 = BIT_23; // Reserved, do not count on value
+ PAMD_BIT_24 = BIT_24; // Reserved, do not count on value
+ PAMD_BIT_25 = BIT_25; // Reserved, do not count on value
+ PAMD_BIT_26 = BIT_26; // Reserved, do not count on value
+ PAMD_BIT_27 = BIT_27; // Reserved, do not count on value
+ PAMD_BIT_28 = BIT_28; // Reserved, do not count on value
+ PAMD_BIT_29 = BIT_29; // Reserved, do not count on value
+ PAMD_BIT_30 = BIT_30; // Reserved, do not count on value
+ PAMD_BIT_31 = BIT_31; // Reserved, do not count on value
{ AMD TLB and L1 Associativity constants }
AMD_ASSOC_RESERVED = 0;
@@ -998,58 +1143,66 @@
MXCSR_FZ = BIT_15; // Flush to Zero
const
- IntelCacheDescription: array [0..50] of TCacheInfo = (
- (D: $00; Family: cfOther; I: RsIntelCacheDescr00),
- (D: $01; Family: cfInstructionTLB; Size: 4; WaysOfAssoc: 4; Entries: 32; I: RsIntelCacheDescr01), // Instruction TLB: 4 KByte Pages, 4-way set associative, 32 entries
- (D: $02; Family: cfInstructionTLB; Size: 4096; WaysOfAssoc: 4; Entries: 2; I: RsIntelCacheDescr02), // Instruction TLB: 4 MByte Pages, 4-way set associative, 2 entries
- (D: $03; Family: cfDataTLB; Size: 4; WaysOfAssoc: 4; Entries: 64; I: RsIntelCacheDescr03), // Data TLB: 4KByte Pages, 4-way set associative, 64 entries
- (D: $04; Family: cfDataTLB; Size: 4096; WaysOfAssoc: 4; Entries: 8; I: RsIntelCacheDescr04), // Data TLB: 4MByte Pages, 4-way set associative, 8 entries
- (D: $06; Family: cfL1InstructionCache; Size: 8; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr06), // 1st-level instruction cache: 8 KBytes, 4-way set associative, 32 byte line size
- (D: $08; Family: cfL1InstructionCache; Size: 16; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr08), // 1st-level instruction cache: 16 KBytes, 4-way set associative, 32 byte line size
- (D: $0A; Family: cfL1DataCache; Size: 8; WaysOfAssoc: 2; LineSize: 32; I: RsIntelCacheDescr0A), // 1st-level data cache: 8 KBytes, 2-way set associative, 32 byte line size
- (D: $0C; Family: cfL1DataCache; Size: 16; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr0C), // 1st-level data cache: 16 KBytes, 4-way set associative, 32 byte line size
- (D: $22; Family: cfL3Cache; Size: 512; WaysOfAssoc: 4; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr22), // 3rd-level cache: 512 KBytes, 4-way set associative, 64 byte line size, 2 lines per sector
- (D: $23; Family: cfL3Cache; Size: 1024; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr23), // 3rd-level cache: 1 MBytes, 8-way set associative, 64 byte line size, 2 lines per sector
- (D: $25; Family: cfL3Cache; Size: 2048; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr25), // 3rd-level cache: 2 MBytes, 8-way set associative, 64 byte line size, 2 lines per sector
- (D: $29; Family: cfL3Cache; Size: 4096; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr29), // 3rd-level cache: 4M Bytes, 8-way set associative, 64 byte line size, 2 lines per sector
- (D: $2C; Family: cfL1DataCache; Size: 32; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr2C), // 1st-level data cache: 32K Bytes, 8-way set associative, 64 byte line size
- (D: $30; Family: cfL1InstructionCache; Size: 32; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr30), // 1st-level instruction cache: 32K Bytes, 8-way set associative, 64 byte line size
- (D: $40; Family: cfOther; I: RsIntelCacheDescr40), // No 2nd-level cache or, if processor contains a valid 2nd-level cache, no 3rd-level cache
- (D: $41; Family: cfL2Cache; Size: 128; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr41), // 2nd-level cache: 128 KBytes, 4-way set associative, 32 byte line size
- (D: $42; Family: cfL2Cache; Size: 256; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr42), // 2nd-level cache: 256 KBytes, 4-way set associative, 32 byte line size
- (D: $43; Family: cfL2Cache; Size: 512; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr43), // 2nd-level cache: 512 KBytes, 4-way set associative, 32 byte line size
- (D: $44; Family: cfL2Cache; Size: 1024; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr44), // 2nd-level cache: 1 MByte, 4-way set associative, 32 byte line size
- (D: $45; Family: cfL2Cache; Size: 2048; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr45), // 2nd-level cache: 2 MByte, 4-way set associative, 32 byte line size
- (D: $50; Family: cfInstructionTLB; Size: 4096; Entries: 64; I: RsIntelCacheDescr50), // Instruction TLB: 4 KByte and 2-MByte or 4-MByte pages, 64 entries
- (D: $51; Family: cfInstructionTLB; Size: 4096; Entries: 128; I: RsIntelCacheDescr51), // Instruction TLB: 4 KByte and 2-MByte or 4-MByte pages, 128 entries
- (D: $52; Family: cfInstructionTLB; Size: 4096; Entries: 256; I: RsIntelCacheDescr52), // Instruction TLB: 4 KByte and 2-MByte or 4-MByte pages, 256 entries
- (D: $5B; Family: cfDataTLB; Size: 4096; Entries: 64; I: RsIntelCacheDescr5B), // Data TLB: 4 KByte and 4 MByte pages, 64 entries
- (D: $5C; Family: cfDataTLB; Size: 4096; Entries: 128; I: RsIntelCacheDescr5C), // Data TLB: 4 KByte and 4 MByte pages,128 entries
- (D: $5D; Family: cfDataTLB; Size: 4096; Entries: 256; I: RsIntelCacheDescr5D), // Data TLB: 4 KByte and 4 MByte pages,256 entries
- (D: $60; Family: cfL1DataCache; Size: 16; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr60), // 1st-level data cache: 16 KByte, 8-way set associative, 64 byte line size
- (D: $66; Family: cfL1DataCache; Size: 8; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr66), // 1st-level data cache: 8 KByte, 4-way set associative, 64 byte line size
- (D: $67; Family: cfL1DataCache; Size: 16; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr67), // 1st-level data cache: 16 KByte, 4-way set associative, 64 byte line size
- (D: $68; Family: cfL1DataCache; Size: 32; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr68), // 1st-level data cache: 32 KByte, 4-way set associative, 64 byte line size
- (D: $70; Family: cfTrace; Size: 12; WaysOfAssoc: 8; I: RsIntelCacheDescr70), // Trace cache: 12 K-\xB5op, 8-way set associative
- (D: $71; Family: cfTrace; Size: 16; WaysOfAssoc: 8; I: RsIntelCacheDescr71), // Trace cache: 16 K-\xB5op, 8-way set associative
- (D: $72; Family: cfTrace; Size: 32; WaysOfAssoc: 8; I: RsIntelCacheDescr72), // Trace cache: 32 K-\xB5op, 8-way set associative
- (D: $78; Family: cfL2Cache; Size: 1024; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr78), // 2nd-level cache: 1 MByte, 4-way set associative, 64byte line size
- (D: $79; Family: cfL2Cache; Size: 128; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr79), // 2nd-level cache: 128 KByte, 8-way set associative, 64 byte line size, 2 lines per sector
- (D: $7A; Family: cfL2Cache; Size: 256; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr7A), // 2nd-level cache: 256 KByte, 8-way set associative, 64 byte line size, 2 lines per sector
- (D: $7B; Family: cfL2Cache; Size: 512; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr7B), // 2nd-level cache: 512 KByte, 8-way set associative, 64 byte line size, 2 lines per sector
- (D: $7C; Family: cfL2Cache; Size: 1024; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr7C), // 2nd-level cache: 1 MByte, 8-way set associative, 64 byte line size, 2 lines per sector
- (D: $7D; Family: cfL2Cache; Size: 2048; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr7D), // 2nd-level cache: 2 MByte, 8-way set associative, 64byte line size
- (D: $7F; Family: cfL2Cache; Size: 512; WaysOfAssoc: 2; LineSize: 64; I: RsIntelCacheDescr7F), // 2nd-level cache: 512 KByte, 2-way set associative, 64-byte line size
- (D: $82; Family: cfL2Cache; Size: 256; WaysOfAssoc: 8; LineSize: 32; I: RsIntelCacheDescr82), // 2nd-level cache: 256 KByte, 8-way set associative, 32 byte line size
- (D: $83; Family: cfL2Cache; Size: 512; WaysOfAssoc: 8; LineSize: 32; I: RsIntelCacheDescr83), // 2nd-level cache: 512 KByte, 8-way set associative, 32 byte line size
- (D: $84; Family: cfL2Cache; Size: 1024; WaysOfAssoc: 8; LineSize: 32; I: RsIntelCacheDescr84), // 2nd-level cache: 1 MByte, 8-way set associative, 32 byte line size
- (D: $85; Family: cfL2Cache; Size: 2048; WaysOfAssoc: 8; LineSize: 32; I: RsIntelCacheDescr85), // 2nd-level cache: 2 MByte, 8-way set associative, 32 byte line size
- (D: $86; Family: cfL2Cache; Size: 512; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr86), // 2nd-level cache: 512 KByte, 4-way set associative, 64 byte line size
- (D: $87; Family: cfL2Cache; Size: 1024; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr87), // 2nd-level cache: 1 MByte, 8-way set associative, 64 byte line size
- (D: $B0; Family: cfInstructionTLB; Size: 4; WaysOfAssoc: 4; Entries: 128; I: RsIntelCacheDescrB0), // Instruction TLB: 4 KByte Pages, 4-way set associative, 128 entries
- (D: $B3; Family: cfDataTLB; Size: 4; WaysOfAssoc: 4; Entries: 128; I: RsIntelCacheDescrB3), // Data TLB: 4 KByte Pages, 4-way set associative, 128 entries
- (D: $F0; Family: cfOther; I: RsIntelCacheDescrF0), // 64-Byte Prefetching
- (D: $F1; Family: cfOther; I: RsIntelCacheDescrF1) // 128-Byte Prefetching
+ IntelCacheDescription: array [0..58] of TCacheInfo = (
+ (D: $00; Family: cfOther; I: RsIntelCacheDescr00),
+ (D: $01; Family: cfInstructionTLB; Size: 4; WaysOfAssoc: 4; Entries: 32; I: RsIntelCacheDescr01),
+ (D: $02; Family: cfInstructionTLB; Size: 4096; WaysOfAssoc: 4; Entries: 2; I: RsIntelCacheDescr02),
+ (D: $03; Family: cfDataTLB; Size: 4; WaysOfAssoc: 4; Entries: 64; I: RsIntelCacheDescr03),
+ (D: $04; Family: cfDataTLB; Size: 4096; WaysOfAssoc: 4; Entries: 8; I: RsIntelCacheDescr04),
+ (D: $05; Family: cfDataTLB; Size: 4096; WaysOfAssoc: 4; Entries: 32; I: RsIntelCacheDescr05),
+ (D: $06; Family: cfL1InstructionCache; Size: 8; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr06),
+ (D: $08; Family: cfL1InstructionCache; Size: 16; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr08),
+ (D: $0A; Family: cfL1DataCache; Size: 8; WaysOfAssoc: 2; LineSize: 32; I: RsIntelCacheDescr0A),
+ (D: $0B; Family: cfInstructionTLB; Size: 4; WaysOfAssoc: 4; Entries: 4; I: RsIntelCacheDescr0B),
+ (D: $0C; Family: cfL1DataCache; Size: 16; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr0C),
+ (D: $22; Family: cfL3Cache; Size: 512; WaysOfAssoc: 4; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr22),
+ (D: $23; Family: cfL3Cache; Size: 1024; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr23),
+ (D: $25; Family: cfL3Cache; Size: 2048; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr25),
+ (D: $29; Family: cfL3Cache; Size: 4096; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr29),
+ (D: $2C; Family: cfL1DataCache; Size: 32; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr2C),
+ (D: $30; Family: cfL1InstructionCache; Size: 32; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr30),
+ (D: $40; Family: cfOther; I: RsIntelCacheDescr40),
+ (D: $41; Family: cfL2Cache; Size: 128; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr41),
+ (D: $42; Family: cfL2Cache; Size: 256; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr42),
+ (D: $43; Family: cfL2Cache; Size: 512; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr43),
+ (D: $44; Family: cfL2Cache; Size: 1024; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr44),
+ (D: $45; Family: cfL2Cache; Size: 2048; WaysOfAssoc: 4; LineSize: 32; I: RsIntelCacheDescr45),
+ (D: $46; Family: cfL3Cache; Size: 4096; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr46),
+ (D: $47; Family: cfL3Cache; Size: 8192; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr47),
+ (D: $49; Family: cfL2Cache; Size: 4096; WaysOfAssoc: 16; LineSize: 64; I: RsIntelCacheDescr49),
+ (D: $50; Family: cfInstructionTLB; Size: 4; Entries: 64; I: RsIntelCacheDescr50),
+ (D: $51; Family: cfInstructionTLB; Size: 4; Entries: 128; I: RsIntelCacheDescr51),
+ (D: $52; Family: cfInstructionTLB; Size: 4; Entries: 256; I: RsIntelCacheDescr52),
+ (D: $56; Family: cfDataTLB; Size: 4096; WaysOfAssoc: 4; Entries: 16; I: RsIntelCacheDescr56),
+ (D: $57; Family: cfDataTLB; Size: 4; WaysOfAssoc: 4; Entries: 16; I: RsIntelCacheDescr57),
+ (D: $5B; Family: cfDataTLB; Size: 4096; Entries: 64; I: RsIntelCacheDescr5B),
+ (D: $5C; Family: cfDataTLB; Size: 4096; Entries: 128; I: RsIntelCacheDescr5C),
+ (D: $5D; Family: cfDataTLB; Size: 4096; Entries: 256; I: RsIntelCacheDescr5D),
+ (D: $60; Family: cfL1DataCache; Size: 16; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr60),
+ (D: $66; Family: cfL1DataCache; Size: 8; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr66),
+ (D: $67; Family: cfL1DataCache; Size: 16; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr67),
+ (D: $68; Family: cfL1DataCache; Size: 32; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr68),
+ (D: $70; Family: cfTrace; Size: 12; WaysOfAssoc: 8; I: RsIntelCacheDescr70),
+ (D: $71; Family: cfTrace; Size: 16; WaysOfAssoc: 8; I: RsIntelCacheDescr71),
+ (D: $72; Family: cfTrace; Size: 32; WaysOfAssoc: 8; I: RsIntelCacheDescr72),
+ (D: $78; Family: cfL2Cache; Size: 1024; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr78),
+ (D: $79; Family: cfL2Cache; Size: 128; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr79),
+ (D: $7A; Family: cfL2Cache; Size: 256; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr7A),
+ (D: $7B; Family: cfL2Cache; Size: 512; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr7B),
+ (D: $7C; Family: cfL2Cache; Size: 1024; WaysOfAssoc: 8; LineSize: 64; LinePerSector: 2; I: RsIntelCacheDescr7C),
+ (D: $7D; Family: cfL2Cache; Size: 2048; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr7D),
+ (D: $7F; Family: cfL2Cache; Size: 512; WaysOfAssoc: 2; LineSize: 64; I: RsIntelCacheDescr7F),
+ (D: $82; Family: cfL2Cache; Size: 256; WaysOfAssoc: 8; LineSize: 32; I: RsIntelCacheDescr82),
+ (D: $83; Family: cfL2Cache; Size: 512; WaysOfAssoc: 8; LineSize: 32; I: RsIntelCacheDescr83),
+ (D: $84; Family: cfL2Cache; Size: 1024; WaysOfAssoc: 8; LineSize: 32; I: RsIntelCacheDescr84),
+ (D: $85; Family: cfL2Cache; Size: 2048; WaysOfAssoc: 8; LineSize: 32; I: RsIntelCacheDescr85),
+ (D: $86; Family: cfL2Cache; Size: 512; WaysOfAssoc: 4; LineSize: 64; I: RsIntelCacheDescr86),
+ (D: $87; Family: cfL2Cache; Size: 1024; WaysOfAssoc: 8; LineSize: 64; I: RsIntelCacheDescr87),
+ (D: $B0; Family: cfInstructionTLB; Size: 4; WaysOfAssoc: 4; Entries: 128; I: RsIntelCacheDescrB0),
+ (D: $B3; Family: cfDataTLB; Size: 4; WaysOfAssoc: 4; Entries: 128; I: RsIntelCacheDescrB3),
+ (D: $B4; Family: cfDataTLB; Size: 4; WaysOfAssoc: 4; Entries: 256; I: RsIntelCacheDescrB4),
+ (D: $F0; Family: cfOther; I: RsIntelCacheDescrF0),
+ (D: $F1; Family: cfOther; I: RsIntelCacheDescrF1)
);
procedure GetCpuInfo(var CpuInfo: TCpuInfo);
@@ -3835,1039 +3988,661 @@
end;
{$ENDIF MSWINDOWS}
-// Helper function for CPUID. Initializes Intel specific fields.
+resourcestring
+ RsUnknownAMDModel = 'Unknown AMD (Model %d)';
-procedure IntelSpecific(var CpuInfo: TCpuInfo);
-var
- I, J: Integer;
-begin
- with CpuInfo do
+function CPUID: TCpuInfo;
+ function HasCPUIDInstruction: Boolean;
+ const
+ ID_FLAG = $200000;
begin
- Manufacturer := 'Intel';
- if HasCacheInfo then
+ asm
+ PUSHFD
+ POP EAX
+ MOV ECX, EAX
+ XOR EAX, ID_FLAG
+ AND ECX, ID_FLAG
+ PUSH EAX
+ POPFD
+ PUSHFD
+ POP EAX
+ AND EAX, ID_FLAG
+ XOR EAX, ECX
+ SETNZ Result
+ end;
+ end;
+ procedure CallCPUID(ValueEAX, ValueECX: Cardinal; var ReturnedEAX, ReturnedEBX, ReturnedECX, ReturnedEDX);
+ begin
+ asm
+ PUSH EDI
+ PUSH EBX
+
+ MOV EAX, ValueEAX
+ MOV ECX, ValueECX
+ // CPUID
+ DB 0FH
+ DB 0A2H
+ MOV EDI, ReturnedEAX
+ MOV Cardinal PTR [EDI], EAX
+ MOV EAX, ReturnedEBX
+ MOV EDI, ReturnedECX
+ MOV Cardinal PTR [EAX], EBX
+ MOV Cardinal PTR [EDI], ECX
+ MOV EAX, ReturnedEDX
+ MOV Cardinal PTR [EAX], EDX
+
+ POP EBX
+ POP EDI
+ end;
+ end;
+
+ procedure ProcessStandard(var CPUInfo: TCpuInfo; HiVal: Cardinal);
+ var
+ VersionInfo, AdditionalInfo, ExFeatures: Cardinal;
+ begin
+ if HiVal >= 1 then
begin
- if (IntelSpecific.L2Cache <> 0) then
+ CallCPUID(1, 0, VersionInfo, AdditionalInfo, ExFeatures, CPUInfo.Features);
+
+ CPUInfo.PType := (VersionInfo and $00003000) shr 12;
+ CPUInfo.Family := (VersionInfo and $00000F00) shr 8;
+ CPUInfo.Model := (VersionInfo and $000000F0) shr 4;
+ CPUInfo.Stepping := (VersionInfo and $0000000F);
+ CPUInfo.ExtendedModel := (VersionInfo and $000F0000) shr 16;
+ CPUInfo.ExtendedFamily := (VersionInfo and $0FF00000) shr 20;
+
+ if CPUInfo.CpuType = CPU_TYPE_INTEL then
begin
- L2CacheSize := IntelSpecific.L2Cache shr 16;
- L2CacheLineSize := IntelSpecific.L2Cache and $FF;
- L2CacheAssociativity := (IntelSpecific.L2Cache shr 12) and $F;
+ CPUInfo.IntelSpecific.ExFeatures := ExFeatures;
+ CPUInfo.IntelSpecific.BrandID := AdditionalInfo and $000000FF;
+ CPUInfo.IntelSpecific.FlushLineSize := (AdditionalInfo and $0000FF00) shr 8;
+ CPUInfo.IntelSpecific.APICID := (AdditionalInfo and $FF000000) shr 24;
+ CPUInfo.LogicalCore := (AdditionalInfo and $00FF0000) shr 16;
+ if HiVal >= 2 then
+ begin
+ CPUInfo.HasCacheInfo := True;
+ // TODO: multiple loops
+ CallCPUID(2, 0, CPUInfo.IntelSpecific.CacheDescriptors[0], CPUInfo.IntelSpecific.CacheDescriptors[4],
+ CPUInfo.IntelSpecific.CacheDescriptors[8], CPUInfo.IntelSpecific.CacheDescriptors[12]);
+ end;
end;
- for I := Low(IntelSpecific.CacheDescriptors) to High(IntelSpecific.CacheDescriptors) do
- if IntelSpecific.CacheDescriptors[I]<>0 then
+ end;
+ end;
+
+ procedure ProcessIntel(var CPUInfo: TCpuInfo; HiVal: Cardinal);
+ var
+ ExHiVal, Unused, AddressSize, CoreInfo: Cardinal;
+ I, J: Integer;
+ begin
+ CPUInfo.CpuType := CPU_TYPE_INTEL;
+ CPUInfo.Manufacturer := 'Intel';
+
+ ProcessStandard(CPUInfo, HiVal);
+
+ if HiVal >= 4 then
+ begin
+ CallCPUID(4, 0, CoreInfo, Unused, Unused, Unused);
+ CPUInfo.PhysicalCore := ((CoreInfo and $FC000000) shr 26) + 1;
+ end;
+
+ // check Intel extended
+ CallCPUID($80000000, 0, ExHiVal, Unused, Unused, Unused);
+ if ExHiVal >= $80000001 then
+ begin
+ CPUInfo.HasExtendedInfo := True;
+ CallCPUID($80000001, 0, Unused, Unused, CPUInfo.IntelSpecific.Ex64Features2,
+ CPUInfo.IntelSpecific.Ex64Features);
+ end;
+ if ExHiVal >= $80000002 then
+ CallCPUID($80000002, 0, CPUInfo.CpuName[0], CPUInfo.CpuName[4], CPUInfo.CpuName[8], CPUInfo.CpuName[12]);
+ if ExHiVal >= $80000003 then
+ CallCPUID($80000003, 0, CPUInfo.CpuName[16], CPUInfo.CpuName[20], CPUInfo.CpuName[24], CPUInfo.CpuName[28]);
+ if ExHiVal >= $80000004 then
+ CallCPUID($80000004, 0, CPUInfo.CpuName[32], CPUInfo.CpuName[36], CPUInfo.CpuName[40], CPUInfo.CpuName[44]);
+ if ExHiVal >= $80000006 then
+ CallCPUID($80000006, 0, Unused, Unused, CPUInfo.IntelSpecific.L2Cache, Unused);
+ if ExHiVal >= $80000008 then
+ begin
+ CallCPUID($80000008, 0, AddressSize, Unused, Unused, Unused);
+ CPUInfo.IntelSpecific.PhysicalAddressBits := AddressSize and $000000FF;
+ CPUInfo.IntelSpecific.VirtualAddressBits := (AddressSize and $0000FF00) shr 8;
+ end;
+
+ if CPUInfo.HasCacheInfo then
+ begin
+ if (CPUInfo.IntelSpecific.L2Cache <> 0) then
+ begin
+ CPUInfo.L2CacheSize := CPUInfo.IntelSpecific.L2Cache shr 16;
+ CPUInfo.L2CacheLineSize := CPUInfo.IntelSpecific.L2Cache and $FF;
+ CPUInfo.L2CacheAssociativity := (CPUInfo.IntelSpecific.L2Cache shr 12) and $F;
+ end;
+ for I := Low(CPUInfo.IntelSpecific.CacheDescriptors) to High(CPUInfo.IntelSpecific.CacheDescriptors) do
+ if CPUInfo.IntelSpecific.CacheDescriptors[I]<>0 then
for J := Low(IntelCacheDescription) to High(IntelCacheDescription) do
- if IntelCacheDescription[J].D = IntelSpecific.CacheDescriptors[I] then
+ if IntelCacheDescription[J].D = CPUInfo.IntelSpecific.CacheDescriptors[I] then
with IntelCacheDescription[J] do
case Family of
//cfInstructionTLB :
//cfDataTLB :
cfL1InstructionCache :
begin
- Inc(L1InstructionCacheSize,Size);
- L1InstructionCacheLineSize := LineSize;
- L1InstructionCacheAssociativity := WaysOfAssoc;
+ Inc(CPUInfo.L1InstructionCacheSize,Size);
+ CPUInfo.L1InstructionCacheLineSize := LineSize;
+ CPUInfo.L1InstructionCacheAssociativity := WaysOfAssoc;
end;
cfL1DataCache :
begin
- Inc(L1DataCacheSize,Size);
- L1DataCacheLineSize := LineSize;
- L1DataCacheAssociativity := WaysOfAssoc;
+ Inc(CPUInfo.L1DataCacheSize,Size);
+ CPUInfo.L1DataCacheLineSize := LineSize;
+ CPUInfo.L1DataCacheAssociativity := WaysOfAssoc;
end;
cfL2Cache :
- if (IntelSpecific.L2Cache = 0) then
+ if (CPUInfo.IntelSpecific.L2Cache = 0) then
begin
- Inc(L2CacheSize,Size);
- L2CacheLineSize := LineSize;
- L2CacheAssociativity := WaysOfAssoc;
+ Inc(CPUInfo.L2CacheSize,Size);
+ CPUInfo.L2CacheLineSize := LineSize;
+ CPUInfo.L2CacheAssociativity := WaysOfAssoc;
end;
cfL3Cache :
begin
- Inc(L3CacheSize,Size);
- L3CacheLineSize := LineSize;
- L3CacheAssociativity := WaysOfAssoc;
- L3LinesPerSector := LinePerSector;
+ Inc(CPUInfo.L3CacheSize,Size);
+ CPUInfo.L3CacheLineSize := LineSize;
+ CPUInfo.L3CacheAssociativity := WaysOfAssoc;
+ CPUInfo.L3LinesPerSector := LinePerSector;
end;
//cfTrace : // no numeric informations
//cfOther :
end;
end;
- if not HasExtendedInfo then
+ if not CPUInfo.HasExtendedInfo then
begin
- case Family of
+ case CPUInfo.Family of
4:
- case Model of
+ case CPUInfo.Model of
1:
- CpuName := 'Intel 486DX Processor';
+ CPUInfo.CpuName := 'Intel 486DX Processor';
2:
- CpuName := 'Intel 486SX Processor';
+ CPUInfo.CpuName := 'Intel 486SX Processor';
3:
- CpuName := 'Intel DX2 Processor';
+ CPUInfo.CpuName := 'Intel DX2 Processor';
4:
- CpuName := 'Intel 486 Processor';
+ CPUInfo.CpuName := 'Intel 486 Processor';
5:
- CpuName := 'Intel SX2 Processor';
+ CPUInfo.CpuName := 'Intel SX2 Processor';
7:
- CpuName := 'Write-Back Enhanced Intel DX2 Processor';
+ CPUInfo.CpuName := 'Write-Back Enhanced Intel DX2 Processor';
8:
- CpuName := 'Intel DX4 Processor';
+ CPUInfo.CpuName := 'Intel DX4 Processor';
else
- CpuName := 'Intel 486 Processor';
+ CPUInfo.CpuName := 'Intel 486 Processor';
end;
5:
- CpuName := 'Pentium';
+ CPUInfo.CpuName := 'Pentium';
6:
- case Model of
+ case CPUInfo.Model of
1:
- CpuName := 'Pentium Pro';
+ CPUInfo.CpuName := 'Pentium Pro';
3:
- CpuName := 'Pentium II';
+ CPUInfo.CpuName := 'Pentium II';
5:
- case L2CacheSize of
+ case CPUInfo.L2CacheSize of
0:
- CpuName := 'Celeron';
+ CPUInfo.CpuName := 'Celeron';
1024:
- CpuName := 'Pentium II Xeon';
+ CPUInfo.CpuName := 'Pentium II Xeon';
2048:
- CpuName := 'Pentium II Xeon';
+ CPUInfo.CpuName := 'Pentium II Xeon';
else
- CpuName := 'Pentium II';
+ CPUInfo.CpuName := 'Pentium II';
end;
6:
- case L2CacheSize of
+ case CPUInfo.L2CacheSize of
0:
- CpuName := 'Celeron';
+ CPUInfo.CpuName := 'Celeron';
128:
- CpuName := 'Celeron';
+ CPUInfo.CpuName := 'Celeron';
else
- CpuName := 'Pentium II';
+ CPUInfo.CpuName := 'Pentium II';
end;
7:
- case L2CacheSize of
+ case CPUInfo.L2CacheSize of
1024:
- CpuName := 'Pentium III Xeon';
+ CPUInfo.CpuName := 'Pentium III Xeon';
2048:
- CpuName := 'Pentium III Xeon';
+ CPUInfo.CpuName := 'Pentium III Xeon';
else
- CpuName := 'Pentium III';
+ CPUInfo.CpuName := 'Pentium III';
end;
8:
- case IntelSpecific.BrandID of
+ case CPUInfo.IntelSpecific.BrandID of
1:
- CpuName := 'Celeron';
+ CPUInfo.CpuName := 'Celeron';
2:
- CpuName := 'Pentium III';
+ CPUInfo.CpuName := 'Pentium III';
3:
- CpuName := 'Pentium III Xeon';
+ CPUInfo.CpuName := 'Pentium III Xeon';
4:
- CpuName := 'Pentium III';
+ CPUInfo.CpuName := 'Pentium III';
else
- CpuName := 'Pentium III';
+ CPUInfo.CpuName := 'Pentium III';
end;
10:
- CpuName := 'Pentium III Xeon';
+ CPUInfo.CpuName := 'Pentium III Xeon';
11:
- CpuName := 'Pentium III';
+ CPUInfo.CpuName := 'Pentium III';
else
- StrPCopy(CpuName, Format('P6 (Model %d)', [Model]));
+ StrPCopy(CPUInfo.CpuName, Format('P6 (Model %d)', [CPUInfo.Model]));
end;
15:
- case IntelSpecific.BrandID of
+ case CPUInfo.IntelSpecific.BrandID of
1:
- CpuName := 'Celeron';
+ CPUInfo.CpuName := 'Celeron';
8:
- CpuName := 'Pentium 4';
+ CPUInfo.CpuName := 'Pentium 4';
14:
- CpuName := 'Xeon';
+ CPUInfo.CpuName := 'Xeon';
else
- CpuName := 'Pentium 4';
+ CPUInfo.CpuName := 'Pentium 4';
end;
else
- StrPCopy(CpuName, Format('P%d', [Family]));
+ StrPCopy(CPUInfo.CpuName, Format('P%d', [CPUInfo.Family]));
end;
end;
- MMX := (Features and MMX_FLAG) <> 0;
- if (Features and SSE_FLAG) <> 0 then
- if (Features and SSE2_FLAG) <> 0 then
- if (IntelSpecific.ExFeatures and EINTEL_SSE3) <> 0 then
- SSE := 3
+ CPUInfo.MMX := (CPUInfo.Features and MMX_FLAG) <> 0;
+ if (CPUInfo.Features and SSE_FLAG) <> 0 then
+ if (CPUInfo.Features and SSE2_FLAG) <> 0 then
+ if (CPUInfo.IntelSpecific.ExFeatures and EINTEL_SSE3) <> 0 then
+ CPUInfo.SSE := 3
else
- SSE := 2
+ CPUInfo.SSE := 2
else
- SSE := 1
+ CPUInfo.SSE := 1
else
- SSE := 0;
- Is64Bits := HasExtendedInfo and ((IntelSpecific.Ex64Features and EINTEL64_EM64T)<>0);
+ CPUInfo.SSE := 0;
+ CPUInfo.Is64Bits := CPUInfo.HasExtendedInfo and ((CPUInfo.IntelSpecific.Ex64Features and EINTEL64_EM64T)<>0);
+ CPUInfo.DepCapable := CPUInfo.HasExtendedInfo and ((CPUInfo.IntelSpecific.Ex64Features and EINTEL64_EDB) <> 0);
end;
-end;
-
-// Helper function for CPUID. Initializes Cyrix specific fields.
-
-procedure CyrixSpecific(var CpuInfo: TCpuInfo);
-begin
- with CpuInfo do
+
+ procedure ProcessAMD(var CPUInfo: TCpuInfo; HiVal: Cardinal);
+ var
+ ExHiVal, Unused, VersionInfo, AdditionalInfo: Cardinal;
begin
- Manufacturer := 'Cyrix';
- if not HasExtendedInfo then
+ CPUInfo.CpuType := CPU_TYPE_AMD;
+ CPUInfo.Manufacturer := 'AMD';
+
+ // check AMD extended
+ if HiVal >= 1 then
begin
- case Family of
- 4:
- CpuName := 'Cyrix MediaGX';
- 5:
- case Model of
- 2:
- CpuName := 'Cyrix 6x86';
- 4:
- CpuName := 'Cyrix GXm';
- end;
- 6:
- CpuName := '6x86MX';
- else
- StrPCopy(CpuName, Format('%dx86', [Family]));
- end;
+ CallCPUID(1, 0, Unused, VersionInfo, CPUInfo.AMDSpecific.Features2, CPUInfo.Features);
+
+ CPUInfo.AMDSpecific.BrandID := VersionInfo and $000000FF;
+ CPUInfo.AMDSpecific.FlushLineSize := (VersionInfo and $0000FF00) shr 8;
+ CPUInfo.AMDSpecific.APICID := (VersionInfo and $FF000000) shr 24;
+ if (CPUInfo.Features and AMD_HTT) <> 0 then
+ CPUInfo.LogicalCore := (AdditionalInfo and $00FF0000) shr 16;
end;
- end;
-end;
-// Helper function for CPUID. Initializes AMD specific fields.
+ CallCPUID($80000000, 0, ExHiVal, Unused, Unused, Unused);
+ if ExHiVal <> 0 then
+ begin
+ // AMD only
+ CPUInfo.HasExtendedInfo := True;
-resourcestring
- RsUnknownAMDModel = 'Unknown AMD (Model %d)';
-
-procedure AMDSpecific(var CpuInfo: TCpuInfo);
-begin
- with CpuInfo do
- begin
- Manufacturer := 'AMD';
- if not HasExtendedInfo then
+ if ExHiVal >= $80000001 then
+ begin
+ CallCPUID($80000001, 0, VersionInfo, AdditionalInfo, CPUInfo.AMDSpecific.ExFeatures2, CPUInfo.AMDSpecific.ExFeatures);
+ CPUInfo.Family := (VersionInfo and $00000F00) shr 8;
+ CPUInfo.Model := (VersionInfo and $000000F0) shr 4;
+ CPUInfo.Stepping := (VersionInfo and $0000000F);
+ CPUInfo.ExtendedModel := (VersionInfo and $000F0000) shr 16;
+ CPUInfo.ExtendedFamily := (VersionInfo and $0FF00000) shr 20;
+ CPUInfo.AMDSpecific.ExBrandID := AdditionalInfo and $0000FFFF;
+ end;
+ if ExHiVal >= $80000002 then
+ CallCPUID($80000002, 0, CPUInfo.CpuName[0], CPUInfo.CpuName[4], CPUInfo.CpuName[8], CPUInfo.CpuName[12]);
+ if ExHiVal >= $80000003 then
+ CallCPUID($80000003, 0, CPUInfo.CpuName[16], CPUInfo.CpuName[20], CPUInfo.CpuName[24], CPUInfo.CpuName[28]);
+ if ExHiVal >= $80000004 then
+ CallCPUID($80000004, 0, CPUInfo...
[truncated message content] |
|
From: <ou...@us...> - 2006-11-27 21:19:50
|
Revision: 1825
http://svn.sourceforge.net/jcl/?rev=1825&view=rev
Author: outchy
Date: 2006-11-27 13:19:43 -0800 (Mon, 27 Nov 2006)
Log Message:
-----------
Replacing sequences of VirtualProtect/Write/VirtualProtect by call to WriteProtectedMemory.
WriteProtectedMemory: the instruction cache is flushed only if the memory is identified as containing code.
Modified Paths:
--------------
trunk/jcl/experts/debug/dialog/ExceptDlg.Delphi32.pas
trunk/jcl/source/common/JclSysUtils.pas
trunk/jcl/source/windows/JclPeImage.pas
Modified: trunk/jcl/experts/debug/dialog/ExceptDlg.Delphi32.pas
===================================================================
--- trunk/jcl/experts/debug/dialog/ExceptDlg.Delphi32.pas 2006-11-27 19:21:10 UTC (rev 1824)
+++ trunk/jcl/experts/debug/dialog/ExceptDlg.Delphi32.pas 2006-11-27 21:19:43 UTC (rev 1825)
@@ -169,7 +169,7 @@
TApplicationHandleExceptionAddr, SysUtilsShowExceptionAddr: Pointer;
CALLInstruction: TCALLInstruction;
CallAddress: Pointer;
- OldProtect, Dummy: DWORD;
+ WrittenBytes: Cardinal;
function CheckAddressForOffset(Offset: Cardinal): Boolean;
begin
@@ -186,7 +186,7 @@
end;
except
Result := False;
- end;
+ end;
end;
begin
@@ -195,16 +195,8 @@
Result := CheckAddressForOffset(CallOffset) or CheckAddressForOffset(CallOffsetDebug);
if Result then
begin
- Result := VirtualProtect(CallAddress, sizeof(CallInstruction), PAGE_EXECUTE_READWRITE, OldProtect);
- if Result then
- try
- CALLInstruction.Address := Integer(@HookShowException) - Integer(CallAddress) - SizeOf(CALLInstruction);
- PCALLInstruction(CallAddress)^ := CALLInstruction;
- if Result then
- FlushInstructionCache(GetCurrentProcess, CallAddress, SizeOf(CALLInstruction));
- finally
- VirtualProtect(CallAddress, sizeof(CallInstruction), OldProtect, Dummy);
- end;
+ CALLInstruction.Address := Integer(@HookShowException) - Integer(CallAddress) - SizeOf(CALLInstruction);
+ Result := WriteProtectedMemory(CallAddress, @CallInstruction, SizeOf(CallInstruction), WrittenBytes);
end;
end;
Modified: trunk/jcl/source/common/JclSysUtils.pas
===================================================================
--- trunk/jcl/source/common/JclSysUtils.pas 2006-11-27 19:21:10 UTC (rev 1824)
+++ trunk/jcl/source/common/JclSysUtils.pas 2006-11-27 21:19:43 UTC (rev 1825)
@@ -647,17 +647,22 @@
var
OldProtect, Dummy: Cardinal;
begin
- // (outchy) VirtualProtect for DEP issues
- // Result := WriteProcessMemory(GetCurrentProcess, BaseAddress, Buffer, Size, WrittenBytes);
- Result := VirtualProtect(BaseAddress, Size, PAGE_EXECUTE_READWRITE, OldProtect);
- if Result then
- try
- Move(Buffer^, BaseAddress^, Size);
- WrittenBytes := Size;
- FlushInstructionCache(GetCurrentProcess, BaseAddress, Size);
- finally
- VirtualProtect(BaseAddress, Size, OldProtect, Dummy);
+ WrittenBytes := 0;
+ if Size > 0 then
+ begin
+ // (outchy) VirtualProtect for DEP issues
+ Result := VirtualProtect(BaseAddress, Size, PAGE_EXECUTE_READWRITE, OldProtect);
+ if Result then
+ try
+ Move(Buffer^, BaseAddress^, Size);
+ WrittenBytes := Size;
+ if OldProtect in [PAGE_EXECUTE, PAGE_EXECUTE_READ, PAGE_EXECUTE_READWRITE, PAGE_EXECUTE_WRITECOPY] then
+ FlushInstructionCache(GetCurrentProcess, BaseAddress, Size);
+ finally
+ VirtualProtect(BaseAddress, Size, OldProtect, Dummy);
+ end;
end;
+ Result := WrittenBytes = Size;
end;
{$ENDIF MSWINDOWS}
{$IFDEF LINUX}
@@ -1599,8 +1604,6 @@
PatchAddress: PPointer;
begin
PatchAddress := Pointer(Integer(AClass) + Offset);
- //! StH: WriteProcessMemory IMO is not exactly the politically correct approach;
- // better VirtualProtect, direct patch, VirtualProtect
if not WriteProtectedMemory(PatchAddress, @Value, SizeOf(Value), WrittenBytes) then
raise EJclVMTError.CreateResFmt(@RsVMTMemoryWriteError, [SysErrorMessage(GetLastError)]);
@@ -1608,7 +1611,8 @@
raise EJclVMTError.CreateResFmt(@RsVMTMemoryWriteError, [IntToStr(WrittenBytes)]);
// make sure that everything keeps working in a dual processor setting
- FlushInstructionCache{$IFDEF MSWINDOWS}(GetCurrentProcess, PatchAddress, SizeOf(Pointer)){$ENDIF};
+ // (outchy) done by WriteProtectedMemory
+ // FlushInstructionCache{$IFDEF MSWINDOWS}(GetCurrentProcess, PatchAddress, SizeOf(Pointer)){$ENDIF};
end;
{$IFNDEF FPC}
@@ -1756,14 +1760,13 @@
PatchAddress: Pointer;
begin
PatchAddress := PPointer(Integer(AClass) + vmtParent)^;
- //! StH: WriteProcessMemory IMO is not exactly the politically correct approach;
- // better VirtualProtect, direct patch, VirtualProtect
if not WriteProtectedMemory(PatchAddress, @NewClassParent, SizeOf(Pointer), WrittenBytes) then
raise EJclVMTError.CreateResFmt(@RsVMTMemoryWriteError, [SysErrorMessage(GetLastError)]);
if WrittenBytes <> SizeOf(Pointer) then
raise EJclVMTError.CreateResFmt(@RsVMTMemoryWriteError, [IntToStr(WrittenBytes)]);
// make sure that everything keeps working in a dual processor setting
- FlushInstructionCache{$IFDEF MSWINDOWS}(GetCurrentProcess, PatchAddress, SizeOf(Pointer)){$ENDIF};
+ // (outchy) done by WriteProtectedMemory
+ // FlushInstructionCache{$IFDEF MSWINDOWS}(GetCurrentProcess, PatchAddress, SizeOf(Pointer)){$ENDIF};
end;
function GetClassParent(AClass: TClass): TClass; assembler;
Modified: trunk/jcl/source/windows/JclPeImage.pas
===================================================================
--- trunk/jcl/source/windows/JclPeImage.pas 2006-11-27 19:21:10 UTC (rev 1824)
+++ trunk/jcl/source/windows/JclPeImage.pas 2006-11-27 21:19:43 UTC (rev 1825)
@@ -5050,7 +5050,7 @@
CurrName: PChar;
ImportEntry: PImageThunkData;
FoundProc: Boolean;
- LastProtect, Dummy: Cardinal;
+ WrittenBytes: Cardinal;
begin
Result := False;
FromProcDebugThunk := PWin9xDebugThunk(FromProc);
@@ -5078,18 +5078,7 @@
else
FoundProc := Pointer(ImportEntry^.Function_) = FromProc;
if FoundProc then
- begin
- if VirtualProtect(@ImportEntry^.Function_, SizeOf(ToProc), PAGE_EXECUTE_READWRITE, @LastProtect) then
- try
- ImportEntry^.Function_ := Cardinal(ToProc);
- FlushInstructionCache(GetCurrentProcess, @ImportEntry^.Function_, SizeOf(ToProc));
- finally
- // According to Platform SDK documentation, the last parameter
- // has to be (point to) a valid variable
- VirtualProtect(@ImportEntry^.Function_, SizeOf(ToProc), LastProtect, Dummy);
- Result := True;
- end;
- end;
+ Result := WriteProtectedMemory(@ImportEntry^.Function_, @ToProc, SizeOf(ToProc), WrittenBytes);
Inc(ImportEntry);
end;
end;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-27 19:21:19
|
Revision: 1824
http://svn.sourceforge.net/jcl/?rev=1824&view=rev
Author: outchy
Date: 2006-11-27 11:21:10 -0800 (Mon, 27 Nov 2006)
Log Message:
-----------
Fixed compilation problem with C++Builder 5 and Delphi 5.
Modified Paths:
--------------
trunk/jcl/source/common/JclSimpleXml.pas
Modified: trunk/jcl/source/common/JclSimpleXml.pas
===================================================================
--- trunk/jcl/source/common/JclSimpleXml.pas 2006-11-27 18:57:33 UTC (rev 1823)
+++ trunk/jcl/source/common/JclSimpleXml.pas 2006-11-27 19:21:10 UTC (rev 1824)
@@ -1305,7 +1305,8 @@
function TJclSimpleXMLElem.GetFloatValue: Extended;
begin
- Result := StrToFloatDef(Value, 0.0);
+ if not TryStrToFloat(Value, Result) then
+ Result := 0.0;
end;
function TJclSimpleXMLElem.GetIntValue: Int64;
@@ -2273,7 +2274,8 @@
function TJclSimpleXMLProp.GetFloatValue: Extended;
begin
- Result := StrToFloatDef(Value, 0.0);
+ if not TryStrToFloat(Value, Result) then
+ Result := 0.0;
end;
function TJclSimpleXMLProp.FullName: string;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-27 18:57:34
|
Revision: 1823
http://svn.sourceforge.net/jcl/?rev=1823&view=rev
Author: outchy
Date: 2006-11-27 10:57:33 -0800 (Mon, 27 Nov 2006)
Log Message:
-----------
Introduction of JclSimpleXml.pas (copied and adapted from JvSimpleXml.pas of the Jedi Visual Component Library).
Modified Paths:
--------------
trunk/jcl/packages/c5/JclC50.bpk
trunk/jcl/packages/c5/JclC50.cpp
trunk/jcl/packages/c5/JclC50.dpk
trunk/jcl/packages/c6/Jcl.bpk
trunk/jcl/packages/c6/Jcl.dpk
trunk/jcl/packages/cs1/Jcl.dpk
trunk/jcl/packages/d10/Jcl.dpk
trunk/jcl/packages/d5/JclD50.dpk
trunk/jcl/packages/d5.dev/JclD50.dpk
trunk/jcl/packages/d6/Jcl.dpk
trunk/jcl/packages/d7/Jcl.dpk
trunk/jcl/packages/d8/Jcl.dpk
trunk/jcl/packages/d9/Jcl.dpk
trunk/jcl/packages/k3/Jcl.bpk
trunk/jcl/packages/k3/Jcl.dpk
trunk/jcl/packages/xml/Jcl-R.xml
trunk/jcl/source/common/JclResources.pas
Added Paths:
-----------
trunk/jcl/source/common/JclSimpleXml.pas
Modified: trunk/jcl/packages/c5/JclC50.bpk
===================================================================
--- trunk/jcl/packages/c5/JclC50.bpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/c5/JclC50.bpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -5,7 +5,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 24-09-2006 19:22:39 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
*****************************************************************************
-->
<PROJECT>
@@ -50,6 +50,7 @@
..\..\lib\c5\JclQueues.obj
..\..\lib\c5\JclResources.obj
..\..\lib\c5\JclRTTI.obj
+ ..\..\lib\c5\JclSimpleXml.obj
..\..\lib\c5\JclSchedule.obj
..\..\lib\c5\JclStacks.obj
..\..\lib\c5\JclStatistics.obj
Modified: trunk/jcl/packages/c5/JclC50.cpp
===================================================================
--- trunk/jcl/packages/c5/JclC50.cpp 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/c5/JclC50.cpp 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:22 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
*/
@@ -47,6 +47,7 @@
USEUNIT("..\..\source\common\JclQueues.pas");
USEUNIT("..\..\source\common\JclResources.pas");
USEUNIT("..\..\source\common\JclRTTI.pas");
+USEUNIT("..\..\source\common\JclSimpleXml.pas");
USEUNIT("..\..\source\common\JclSchedule.pas");
USEUNIT("..\..\source\common\JclStacks.pas");
USEUNIT("..\..\source\common\JclStatistics.pas");
Modified: trunk/jcl/packages/c5/JclC50.dpk
===================================================================
--- trunk/jcl/packages/c5/JclC50.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/c5/JclC50.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:22 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -76,6 +76,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSchedule in '..\..\source\common\JclSchedule.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
Modified: trunk/jcl/packages/c6/Jcl.bpk
===================================================================
--- trunk/jcl/packages/c6/Jcl.bpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/c6/Jcl.bpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -5,7 +5,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 24-09-2006 19:28:07 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
*****************************************************************************
-->
<PROJECT>
@@ -50,6 +50,7 @@
..\..\lib\c6\obj\JclQueues.obj
..\..\lib\c6\obj\JclResources.obj
..\..\lib\c6\obj\JclRTTI.obj
+ ..\..\lib\c6\obj\JclSimpleXml.obj
..\..\lib\c6\obj\JclSchedule.obj
..\..\lib\c6\obj\JclStacks.obj
..\..\lib\c6\obj\JclStatistics.obj
@@ -185,6 +186,7 @@
<FILE FILENAME="..\..\source\common\JclQueues.pas" FORMNAME="" UNITNAME="JclQueues" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="..\..\source\common\JclResources.pas" FORMNAME="" UNITNAME="JclResources" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="..\..\source\common\JclRTTI.pas" FORMNAME="" UNITNAME="JclRTTI" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
+ <FILE FILENAME="..\..\source\common\JclSimpleXml.pas" FORMNAME="" UNITNAME="JclSimpleXml" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="..\..\source\common\JclSchedule.pas" FORMNAME="" UNITNAME="JclSchedule" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="..\..\source\common\JclStacks.pas" FORMNAME="" UNITNAME="JclStacks" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="..\..\source\common\JclStatistics.pas" FORMNAME="" UNITNAME="JclStatistics" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
Modified: trunk/jcl/packages/c6/Jcl.dpk
===================================================================
--- trunk/jcl/packages/c6/Jcl.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/c6/Jcl.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:23 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -75,6 +75,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSchedule in '..\..\source\common\JclSchedule.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
Modified: trunk/jcl/packages/cs1/Jcl.dpk
===================================================================
--- trunk/jcl/packages/cs1/Jcl.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/cs1/Jcl.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:23 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -76,6 +76,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSchedule in '..\..\source\common\JclSchedule.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
Modified: trunk/jcl/packages/d10/Jcl.dpk
===================================================================
--- trunk/jcl/packages/d10/Jcl.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/d10/Jcl.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:24 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -76,6 +76,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSchedule in '..\..\source\common\JclSchedule.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
Modified: trunk/jcl/packages/d5/JclD50.dpk
===================================================================
--- trunk/jcl/packages/d5/JclD50.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/d5/JclD50.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:23 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -76,6 +76,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSchedule in '..\..\source\common\JclSchedule.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
Modified: trunk/jcl/packages/d5.dev/JclD50.dpk
===================================================================
--- trunk/jcl/packages/d5.dev/JclD50.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/d5.dev/JclD50.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:23 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -75,6 +75,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSchedule in '..\..\source\common\JclSchedule.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
Modified: trunk/jcl/packages/d6/Jcl.dpk
===================================================================
--- trunk/jcl/packages/d6/Jcl.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/d6/Jcl.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:23 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -76,6 +76,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSchedule in '..\..\source\common\JclSchedule.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
Modified: trunk/jcl/packages/d7/Jcl.dpk
===================================================================
--- trunk/jcl/packages/d7/Jcl.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/d7/Jcl.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:23 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -76,6 +76,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSchedule in '..\..\source\common\JclSchedule.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
Modified: trunk/jcl/packages/d8/Jcl.dpk
===================================================================
--- trunk/jcl/packages/d8/Jcl.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/d8/Jcl.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:23 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -76,6 +76,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSchedule in '..\..\source\common\JclSchedule.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
Modified: trunk/jcl/packages/d9/Jcl.dpk
===================================================================
--- trunk/jcl/packages/d9/Jcl.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/d9/Jcl.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:23 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -76,6 +76,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSchedule in '..\..\source\common\JclSchedule.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
Modified: trunk/jcl/packages/k3/Jcl.bpk
===================================================================
--- trunk/jcl/packages/k3/Jcl.bpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/k3/Jcl.bpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -41,6 +41,7 @@
..\..\lib\k3\obj\JclQueues.obj
..\..\lib\k3\obj\JclResources.obj
..\..\lib\k3\obj\JclRTTI.obj
+ ..\..\lib\k3\obj\JclSimpleXml.obj
..\..\lib\k3\obj\JclSchedule.obj
..\..\lib\k3\obj\JclStacks.obj
..\..\lib\k3\obj\JclStatistics.obj
@@ -138,6 +139,7 @@
<FILE FILENAME="../../source/common/JclQueues.pas" FORMNAME="" UNITNAME="JclQueues" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="../../source/common/JclResources.pas" FORMNAME="" UNITNAME="JclResources" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="../../source/common/JclRTTI.pas" FORMNAME="" UNITNAME="JclRTTI" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
+ <FILE FILENAME="../../source/common/JclSimpleXml.pas" FORMNAME="" UNITNAME="JclSimpleXml" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="../../source/common/JclSchedule.pas" FORMNAME="" UNITNAME="JclSchedule" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="../../source/common/JclStacks.pas" FORMNAME="" UNITNAME="JclStacks" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="../../source/common/JclStatistics.pas" FORMNAME="" UNITNAME="JclStatistics" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
Modified: trunk/jcl/packages/k3/Jcl.dpk
===================================================================
--- trunk/jcl/packages/k3/Jcl.dpk 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/k3/Jcl.dpk 2006-11-27 18:57:33 UTC (rev 1823)
@@ -4,7 +4,7 @@
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
- Last generated: 23-04-2006 06:25:24 UTC
+ Last generated: 27-11-2006 06:24:28 UTC
-----------------------------------------------------------------------------
}
@@ -77,6 +77,7 @@
JclQueues in '../../source/common/JclQueues.pas' ,
JclResources in '../../source/common/JclResources.pas' ,
JclRTTI in '../../source/common/JclRTTI.pas' ,
+ JclSimpleXml in '../../source/common/JclSimpleXml.pas' ,
JclSchedule in '../../source/common/JclSchedule.pas' ,
JclStacks in '../../source/common/JclStacks.pas' ,
JclStatistics in '../../source/common/JclStatistics.pas' ,
Modified: trunk/jcl/packages/xml/Jcl-R.xml
===================================================================
--- trunk/jcl/packages/xml/Jcl-R.xml 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/packages/xml/Jcl-R.xml 2006-11-27 18:57:33 UTC (rev 1823)
@@ -53,6 +53,7 @@
<File Name="..\..\source\common\JclQueues.pas" Targets="JclDev" Formname="" Condition=""/>
<File Name="..\..\source\common\JclResources.pas" Targets="JclDev" Formname="" Condition=""/>
<File Name="..\..\source\common\JclRTTI.pas" Targets="JclDev" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclSimpleXml.pas" Targets="JclDev" Formname="" Condition=""/>
<File Name="..\..\source\common\JclSchedule.pas" Targets="JclDev" Formname="" Condition=""/>
<File Name="..\..\source\common\JclStacks.pas" Targets="JclDev" Formname="" Condition=""/>
<File Name="..\..\source\common\JclStatistics.pas" Targets="JclDev" Formname="" Condition=""/>
Modified: trunk/jcl/source/common/JclResources.pas
===================================================================
--- trunk/jcl/source/common/JclResources.pas 2006-11-27 06:05:58 UTC (rev 1822)
+++ trunk/jcl/source/common/JclResources.pas 2006-11-27 18:57:33 UTC (rev 1823)
@@ -1571,6 +1571,28 @@
RsScheduleDayInRange = 'Day values should fall in the range 1 .. 31';
RsScheduleMonthInRange = 'Month values should fall in the range 1 .. 12';
+//=== JclSimpleXml.pas =======================================================
+resourcestring
+ RsEInvalidXMLElementUnexpectedCharacte =
+ 'Invalid XML Element: Unexpected character in property declaration ("%s" found)';
+ RsEInvalidXMLElementUnexpectedCharacte_ =
+ 'Invalid XML Element: Unexpected character in property declaration. Expecting " or '' but "%s" found';
+ RsEUnexpectedValueForLPos = 'Unexpected value for lPos';
+ RsEInvalidXMLElementExpectedBeginningO = 'Invalid XML Element: Expected beginning of tag but "%s" found';
+ RsEInvalidXMLElementExpectedEndOfTagBu = 'Invalid XML Element: Expected end of tag but "%s" found';
+ RsEInvalidXMLElementMalformedTagFoundn = 'Invalid XML Element: malformed tag found (no valid name)';
+ RsEInvalidXMLElementErroneousEndOfTagE =
+ 'Invalid XML Element: Erroneous end of tag, expecting </%0:s> but </%1:s> found';
+ RsEInvalidCommentExpectedsButFounds = 'Invalid Comment: expected "%0:s" but found "%1:s"';
+ RsEInvalidCommentNotAllowedInsideComme = 'Invalid Comment: "--" not allowed inside comments';
+ RsEInvalidCommentUnexpectedEndOfData = 'Invalid Comment: Unexpected end of data';
+ RsEInvalidCDATAExpectedsButFounds = 'Invalid CDATA: expected "%0:s" but found "%1:s"';
+ RsEInvalidCDATAUnexpectedEndOfData = 'Invalid CDATA: Unexpected end of data';
+ RsEInvalidHeaderExpectedsButFounds = 'Invalid Header: expected "%0:s" but found "%1:s"';
+ RsEInvalidStylesheetExpectedsButFounds = 'Invalid Stylesheet: expected "%0:s" but found "%1:s"';
+ RsEInvalidStylesheetUnexpectedEndOfDat = 'Invalid Stylesheet: Unexpected end of data';
+ RsEInvalidDocumentUnexpectedTextInFile = 'Invalid Document: Unexpected text in file prolog';
+
//=== JclStatistics ==========================================================
resourcestring
RsInvalidSampleSize = 'Invalid sample size (%d)';
Added: trunk/jcl/source/common/JclSimpleXml.pas
===================================================================
--- trunk/jcl/source/common/JclSimpleXml.pas (rev 0)
+++ trunk/jcl/source/common/JclSimpleXml.pas 2006-11-27 18:57:33 UTC (rev 1823)
@@ -0,0 +1,3565 @@
+{-----------------------------------------------------------------------------
+The contents of this file are subject to the Mozilla Public License
+Version 1.1 (the "License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/MPL-1.1.html
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
+the specific language governing rights and limitations under the License.
+
+The Original Code is: JvSimpleXML.PAS, released on 2002-06-03
+
+The Initial Developer of the Original Code is S\xE9bastien Buysse [sbuysse att buypin dott com]
+Portions created by S\xE9bastien Buysse are Copyright (C) 2001 S\xE9bastien Buysse.
+All Rights Reserved.
+
+Contributor(s): Christophe Paris,
+ Florent Ouchet (move from the JVCL to the JCL).
+
+You may retrieve the latest version of this file at the Project JEDI's JCL home page,
+located at http://jcl.sourceforge.net
+
+Known Issues: This component does not parse the !DOCTYPE tags but preserves them
+-----------------------------------------------------------------------------}
+// $Id$
+
+unit JclSimpleXml;
+
+interface
+
+{$I jcl.inc}
+
+uses
+ {$IFDEF UNITVERSIONING}
+ JclUnitVersioning,
+ {$ENDIF UNITVERSIONING}
+ {$IFDEF MSWINDOWS}
+ Windows, // Delphi 2005 inline
+ {$ENDIF MSWINDOWS}
+ {$IFDEF CLR}
+ System.Text,
+ {$ENDIF CLR}
+ SysUtils, Classes,
+ {$IFDEF HAS_UNIT_VARIANTS}
+ Variants,
+ {$ENDIF HAS_UNIT_VARIANTS}
+ IniFiles;
+
+type
+ {$IFDEF COMPILER5}
+ THashedStringList = class(TStringList);
+ THandle = Longword;
+ {$ENDIF COMPILER5}
+ TJclSimpleXML = class;
+ EJclSimpleXMLError = class(Exception);
+ TJclSimpleXMLElem = class;
+ TJclSimpleXMLElems = class;
+ TJclSimpleXMLProps = class;
+ TJclSimpleXMLElemComment = class;
+ TJclSimpleXMLElemClassic = class;
+ TJclSimpleXMLElemCData = class;
+ TJclSimpleXMLElemDocType = class;
+ TJclSimpleXMLElemText = class;
+ TJclSimpleXMLElemHeader = class;
+ TJclSimpleXMLElemSheet = class;
+ TJclOnSimpleXMLParsed = procedure(Sender: TObject; Name: string) of object;
+ TJclOnValueParsed = procedure(Sender: TObject; Name, Value: string) of object;
+ TJclOnSimpleProgress = procedure(Sender: TObject; const Position, Total: Integer) of object;
+
+ //Those hash stuffs are for future use only
+ //Plans are to replace current hash by this mechanism
+ TJclHashKind = (hkList, hkDirect);
+ {$IFDEF CLR}
+ TJclHashElem = class(TObject)
+ Next: TJclHashElem;
+ Obj: TObject;
+ end;
+ PJclHashElem = TJclHashElem;
+ TJclHashRecord = class;
+ TJclHashList = array [0..25] of TJclHashRecord;
+ PJclHashList = TJclHashList;
+ TJclHashRecord = class(TObject)
+ public
+ Count: Byte;
+ Kind: TJclHashKind;
+ List: PJclHashList;
+ FirstElem: PJclHashElem;
+ end;
+ PJclHashRecord = TJclHashRecord;
+ {$ELSE}
+ PJclHashElem = ^TJclHashElem;
+ TJclHashElem = packed record
+ Next: PJclHashElem;
+ Obj: TObject;
+ end;
+ PJclHashRecord = ^TJclHashRecord;
+ TJclHashList = array [0..25] of PJclHashRecord;
+ PJclHashList = ^TJclHashList;
+ TJclHashRecord = packed record
+ Count: Byte;
+ case Kind: TJclHashKind of
+ hkList: (List: PJclHashList);
+ hkDirect: (FirstElem: PJclHashElem);
+ end;
+ {$ENDIF CLR}
+
+ TJclSimpleHashTable = class(TObject)
+ private
+ FList: PJclHashRecord;
+ public
+ constructor Create;
+ destructor Destroy; override;
+
+ procedure AddObject(const AName: string; AObject: TObject);
+ procedure Clear;
+ end;
+
+ TJclSimpleXMLProp = class(TObject)
+ private
+ FName: string;
+ FValue: string;
+ FParent: TJclSimpleXMLProps;
+ FNameSpace: string;
+ FData: {$IFDEF CLR} TObject {$ELSE} Pointer {$ENDIF};
+ function GetBoolValue: Boolean;
+ procedure SetBoolValue(const Value: Boolean);
+ procedure SetName(const Value: string);
+ function GetFloatValue: Extended;
+ procedure SetFloatValue(const Value: Extended);
+ protected
+ function GetIntValue: Int64;
+ procedure SetIntValue(const Value: Int64);
+ public
+ function GetSimpleXML: TJclSimpleXML;
+ function SaveToString: string;
+ function FullName:string;
+ property Parent: TJclSimpleXMLProps read FParent write FParent;
+ property Name: string read FName write SetName;
+ property Value: string read FValue write FValue;
+ property IntValue: Int64 read GetIntValue write SetIntValue;
+ property BoolValue: Boolean read GetBoolValue write SetBoolValue;
+ property FloatValue: Extended read GetFloatValue write SetFloatValue;
+ property NameSpace: string read FNameSpace write FNameSpace;
+
+ property Data: {$IFDEF CLR} TObject {$ELSE} Pointer {$ENDIF} read FData write FData;
+ end;
+
+ TJclSimpleXMLProps = class(TObject)
+ private
+ FProperties: THashedStringList;
+ FParent: TJclSimpleXMLElem;
+ function GetCount: Integer;
+ function GetItemNamedDefault(const Name, Default: string): TJclSimpleXMLProp;
+ function GetItemNamed(const Name: string): TJclSimpleXMLProp;
+ protected
+ function GetSimpleXML: TJclSimpleXML;
+ function GetItem(const Index: Integer): TJclSimpleXMLProp;
+ procedure DoItemRename(var Value: TJclSimpleXMLProp; const Name: string);
+ procedure Error(const S: string);
+ procedure FmtError(const S: string; const Args: array of const);
+ public
+ constructor Create(Parent: TJclSimpleXMLElem);
+ destructor Destroy; override;
+ function Add(const Name, Value: string): TJclSimpleXMLProp; overload;
+ function Add(const Name: string; const Value: Int64): TJclSimpleXMLProp; overload;
+ function Add(const Name: string; const Value: Boolean): TJclSimpleXMLProp; overload;
+ function Insert(const Index: Integer; const Name, Value: string): TJclSimpleXMLProp; overload;
+ function Insert(const Index: Integer; const Name: string; const Value: Int64): TJclSimpleXMLProp; overload;
+ function Insert(const Index: Integer; const Name: string; const Value: Boolean): TJclSimpleXMLProp; overload;
+ procedure Clear; virtual;
+ procedure Delete(const Index: Integer); overload;
+ procedure Delete(const Name: string); overload;
+ function Value(const Name: string; Default: string = ''): string;
+ function IntValue(const Name: string; Default: Int64 = -1): Int64;
+ function BoolValue(const Name: string; Default: Boolean = True): Boolean;
+ procedure LoadFromStream(const Stream: TStream);
+ procedure SaveToStream(const Stream: TStream);
+ property Item[const Index: Integer]: TJclSimpleXMLProp read GetItem; default;
+ property ItemNamed[const Name: string]: TJclSimpleXMLProp read GetItemNamed;
+ property Count: Integer read GetCount;
+ end;
+
+ TJclSimpleXMLElemsProlog = class(TObject)
+ private
+ FElems: THashedStringList;
+ function GetCount: Integer;
+ function GetItem(const Index: Integer): TJclSimpleXMLElem;
+ function GetEncoding: string;
+ function GetStandAlone: Boolean;
+ function GetVersion: string;
+ procedure SetEncoding(const Value: string);
+ procedure SetStandAlone(const Value: Boolean);
+ procedure SetVersion(const Value: string);
+ protected
+ function FindHeader: TJclSimpleXMLElem;
+ procedure Error(const S: string);
+ procedure FmtError(const S: string; const Args: array of const);
+ public
+ constructor Create;
+ destructor Destroy; override;
+ function AddComment(const AValue: string): TJclSimpleXMLElemComment;
+ function AddDocType(const AValue: string): TJclSimpleXMLElemDocType;
+ procedure Clear;
+ function AddStyleSheet(AType, AHRef: string): TJclSimpleXMLElemSheet;
+ function LoadFromStream(const Stream: TStream; AParent: TJclSimpleXML = nil): string;
+ procedure SaveToStream(const Stream: TStream; AParent: TJclSimpleXML = nil);
+ property Item[const Index: Integer]: TJclSimpleXMLElem read GetItem; default;
+ property Count: Integer read GetCount;
+ property Encoding: string read GetEncoding write SetEncoding;
+ property StandAlone: Boolean read GetStandAlone write SetStandAlone;
+ property Version: string read GetVersion write SetVersion;
+ end;
+
+ TJclSimpleXMLElemCompare = function(Elems: TJclSimpleXMLElems; Index1, Index2: Integer): Integer of object;
+ TJclSimpleXMLElems = class(TObject)
+ private
+ FParent: TJclSimpleXMLElem;
+ function GetCount: Integer;
+ function GetItemNamedDefault(const Name, Default: string): TJclSimpleXMLElem;
+ function GetItemNamed(const Name: string): TJclSimpleXMLElem;
+ protected
+ FElems: THashedStringList;
+ FCompare: TJclSimpleXMLElemCompare;
+ function GetItem(const Index: Integer): TJclSimpleXMLElem;
+ procedure AddChild(const Value: TJclSimpleXMLElem);
+ procedure AddChildFirst(const Value: TJclSimpleXMLElem);
+ procedure InsertChild(const Value: TJclSimpleXMLElem; Index: Integer);
+ procedure DoItemRename(var Value: TJclSimpleXMLElem; const Name: string);
+ procedure CreateElems;
+ public
+ constructor Create(const AOwner: TJclSimpleXMLElem);
+ destructor Destroy; override;
+
+ // Use notify to indicate to a list that the given element is removed
+ // from the list so that it doesn't delete it as well as the one
+ // that insert it in itself. This method is automatically called
+ // by AddChild and AddChildFirst if the Container property of the
+ // given element is set.
+ procedure Notify(Value: TJclSimpleXMLElem; Operation: TOperation);
+
+ function Add(const Name: string): TJclSimpleXMLElemClassic; overload;
+ function Add(const Name, Value: string): TJclSimpleXMLElemClassic; overload;
+ function Add(const Name: string; const Value: Int64): TJclSimpleXMLElemClassic; overload;
+ function Add(const Name: string; const Value: Boolean): TJclSimpleXMLElemClassic; overload;
+ function Add(const Name: string; const Value: TStream): TJclSimpleXMLElemClassic; overload;
+ function Add(Value: TJclSimpleXMLElem): TJclSimpleXMLElem; overload;
+ function AddFirst(Value: TJclSimpleXMLElem): TJclSimpleXMLElem; overload;
+ function AddFirst(const Name: string): TJclSimpleXMLElemClassic; overload;
+ function AddComment(const Name: string; const Value: string): TJclSimpleXMLElemComment;
+ function AddCData(const Name: string; const Value: string): TJclSimpleXMLElemCData;
+ function AddText(const Name: string; const Value: string): TJclSimpleXMLElemText;
+ function Insert(Value: TJclSimpleXMLElem; Index: Integer): TJclSimpleXMLElem; overload;
+ function Insert(const Name: string; Index: Integer): TJclSimpleXMLElemClassic; overload;
+ procedure Clear; virtual;
+ procedure Delete(const Index: Integer); overload;
+ procedure Delete(const Name: string); overload;
+ procedure Move(const CurIndex, NewIndex: Integer);
+ function IndexOf(const Value: TJclSimpleXMLElem): Integer; overload;
+ function IndexOf(const Value: string): Integer; overload;
+ function Value(const Name: string; Default: string = ''): string;
+ function IntValue(const Name: string; Default: Int64 = -1): Int64;
+ function BoolValue(const Name: string; Default: Boolean = True): Boolean;
+ procedure BinaryValue(const Name: string; const Stream: TStream);
+ function LoadFromStream(const Stream: TStream; AParent: TJclSimpleXML = nil): string;
+ procedure SaveToStream(const Stream: TStream; const Level: string = ''; AParent: TJclSimpleXML = nil);
+ procedure Sort;
+ procedure CustomSort(AFunction: TJclSimpleXMLElemCompare);
+ property Parent: TJclSimpleXMLElem read FParent write FParent;
+ property Item[const Index: Integer]: TJclSimpleXMLElem read GetItem; default;
+ property ItemNamed[const Name: string]: TJclSimpleXMLElem read GetItemNamed;
+ property Count: Integer read GetCount;
+ end;
+
+ TJclSimpleXMLElem = class(TObject)
+ private
+ FName: string;
+ FParent: TJclSimpleXMLElem;
+ FItems: TJclSimpleXMLElems;
+ FProps: TJclSimpleXMLProps;
+ FValue: string;
+ FNameSpace: string;
+ FData: {$IFDEF CLR} TObject {$ELSE} Pointer {$ENDIF};
+ FSimpleXML: TJclSimpleXML;
+ FContainer: TJclSimpleXMLElems;
+ function GetFloatValue: Extended;
+ procedure SetFloatValue(const Value: Extended);
+ protected
+ function GetSimpleXML: TJclSimpleXML;
+ function GetIntValue: Int64;
+ function GetBoolValue: Boolean;
+ function GetChildsCount: Integer;
+ function GetProps: TJclSimpleXMLProps;
+ procedure SetBoolValue(const Value: Boolean);
+ procedure SetName(const Value: string);
+ procedure SetIntValue(const Value: Int64);
+ function GetItems: TJclSimpleXMLElems;
+ procedure Error(const S: string);
+ procedure FmtError(const S: string; const Args: array of const);
+ public
+ constructor Create(const AOwner: TJclSimpleXMLElem); virtual;
+ destructor Destroy; override;
+ procedure Assign(Value: TJclSimpleXMLElem); virtual;
+ procedure Clear; virtual;
+ function SaveToString(AParent: TJclSimpleXML = nil): string;
+ procedure LoadFromString(const Value: string; AParent: TJclSimpleXML = nil);
+ procedure LoadFromStream(const Stream: TStream; AParent: TJclSimpleXML = nil); virtual; abstract;
+ procedure SaveToStream(const Stream: TStream; const Level: string = ''; AParent: TJclSimpleXML = nil); virtual;
+ abstract;
+ procedure GetBinaryValue(const Stream: TStream);
+ property Data: {$IFDEF CLR} TObject {$ELSE} Pointer {$ENDIF} read FData write FData;
+ function GetChildIndex(const AChild: TJclSimpleXMLElem): Integer;
+
+ property SimpleXML: TJclSimpleXML read GetSimpleXML;
+ property Container: TJclSimpleXMLElems read FContainer write FContainer;
+ published
+ function FullName: string;virtual;
+ property Name: string read FName write SetName;
+ property Parent: TJclSimpleXMLElem read FParent write FParent;
+ property NameSpace: string read FNameSpace write FNameSpace;
+ property ChildsCount: Integer read GetChildsCount;
+ property Items: TJclSimpleXMLElems read GetItems;
+ property Properties: TJclSimpleXMLProps read GetProps;
+ property IntValue: Int64 read GetIntValue write SetIntValue;
+ property BoolValue: Boolean read GetBoolValue write SetBoolValue;
+ property FloatValue: Extended read GetFloatValue write SetFloatValue;
+ property Value: string read FValue write FValue;
+ end;
+ TJclSimpleXMLElemClass = class of TJclSimpleXMLElem;
+
+ TJclSimpleXMLElemComment = class(TJclSimpleXMLElem)
+ public
+ procedure LoadFromStream(const Stream: TStream; AParent: TJclSimpleXML = nil); override;
+ procedure SaveToStream(const Stream: TStream; const Level: string = ''; AParent: TJclSimpleXML = nil); override;
+ end;
+
+ TJclSimpleXMLElemClassic = class(TJclSimpleXMLElem)
+ public
+ procedure LoadFromStream(const Stream: TStream; AParent: TJclSimpleXML = nil); override;
+ procedure SaveToStream(const Stream: TStream; const Level: string = ''; AParent: TJclSimpleXML = nil); override;
+ end;
+
+ TJclSimpleXMLElemCData = class(TJclSimpleXMLElem)
+ public
+ procedure LoadFromStream(const Stream: TStream; AParent: TJclSimpleXML = nil); override;
+ procedure SaveToStream(const Stream: TStream; const Level: string = ''; AParent: TJclSimpleXML = nil); override;
+ end;
+
+ TJclSimpleXMLElemText = class(TJclSimpleXMLElem)
+ public
+ procedure LoadFromStream(const Stream: TStream; AParent: TJclSimpleXML = nil); override;
+ procedure SaveToStream(const Stream: TStream; const Level: string = ''; AParent: TJclSimpleXML = nil); override;
+ end;
+
+ TJclSimpleXMLElemHeader = class(TJclSimpleXMLElem)
+ private
+ FStandalone: Boolean;
+ FEncoding: string;
+ FVersion: string;
+ public
+ procedure Assign(Value: TJclSimpleXMLElem); override;
+
+ procedure LoadFromStream(const Stream: TStream; AParent: TJclSimpleXML = nil); override;
+ procedure SaveToStream(const Stream: TStream; const Level: string = ''; AParent: TJclSimpleXML = nil); override;
+ property Version: string read FVersion write FVersion;
+ property StandAlone: Boolean read FStandalone write FStandalone;
+ property Encoding: string read FEncoding write FEncoding;
+ constructor Create(const AOwner: TJclSimpleXMLElem); override;
+ end;
+
+ TJclSimpleXMLElemDocType = class(TJclSimpleXMLElem)
+ public
+ procedure LoadFromStream(const Stream: TStream; AParent: TJclSimpleXML = nil); override;
+ procedure SaveToStream(const Stream: TStream; const Level: string = ''; AParent: TJclSimpleXML = nil); override;
+ end;
+
+ TJclSimpleXMLElemSheet = class(TJclSimpleXMLElem)
+ public
+ procedure LoadFromStream(const Stream: TStream; AParent: TJclSimpleXML = nil); override;
+ procedure SaveToStream(const Stream: TStream; const Level: string = ''; AParent: TJclSimpleXML = nil); override;
+ end;
+
+ TJclSimpleXMLOptions = set of (sxoAutoCreate, sxoAutoIndent, sxoAutoEncodeValue,
+ sxoAutoEncodeEntity, sxoDoNotSaveProlog, sxoTrimPrecedingTextWhitespace);
+ TJclSimpleXMLEncodeEvent = procedure(Sender: TObject; var Value: string) of object;
+ TJclSimpleXMLEncodeStreamEvent = procedure(Sender: TObject; InStream, OutStream: TStream) of object;
+
+ TJclSimpleXML = class(TObject)
+ protected
+ FFileName: TFileName;
+ FOptions: TJclSimpleXMLOptions;
+ FRoot: TJclSimpleXMLElemClassic;
+ FOnTagParsed: TJclOnSimpleXMLParsed;
+ FOnValue: TJclOnValueParsed;
+ FOnLoadProg: TJclOnSimpleProgress;
+ FOnSaveProg: TJclOnSimpleProgress;
+ FProlog: TJclSimpleXMLElemsProlog;
+ FSaveCount: Integer;
+ FSaveCurrent: Integer;
+ FIndentString: string;
+ FOnEncodeValue: TJclSimpleXMLEncodeEvent;
+ FOnDecodeValue: TJclSimpleXMLEncodeEvent;
+ FOnDecodeStream: TJclSimpleXMLEncodeStreamEvent;
+ FOnEncodeStream: TJclSimpleXMLEncodeStreamEvent;
+ procedure SetIndentString(const Value: string);
+ procedure SetRoot(const Value: TJclSimpleXMLElemClassic);
+ procedure SetFileName(Value: TFileName);
+ procedure DoLoadProgress(const APosition, ATotal: Integer);
+ procedure DoSaveProgress;
+ procedure DoTagParsed(const AName: string);
+ procedure DoValueParsed(const AName, AValue: string);
+ procedure DoEncodeValue(var Value: string); virtual;
+ procedure DoDecodeValue(var Value: string); virtual;
+ public
+ constructor Create;
+ destructor Destroy; override;
+ procedure LoadFromString(const Value: string);
+ procedure LoadFromFile(const FileName: TFileName);
+ procedure LoadFromStream(Stream: TStream);
+ procedure LoadFromResourceName(Instance: THandle; const ResName: string);
+ procedure SaveToFile(FileName: TFileName);
+ procedure SaveToStream(Stream: TStream);
+ function SaveToString: string;
+ property Prolog: TJclSimpleXMLElemsProlog read FProlog write FProlog;
+ property Root: TJclSimpleXMLElemClassic read FRoot write SetRoot;
+ property XMLData: string read SaveToString write LoadFromString;
+ property FileName: TFileName read FFileName write SetFileName;
+ property IndentString: string read FIndentString write SetIndentString;
+ property Options: TJclSimpleXMLOptions read FOptions write FOptions;
+ property OnSaveProgress: TJclOnSimpleProgress read FOnSaveProg write FOnSaveProg;
+ property OnLoadProgress: TJclOnSimpleProgress read FOnLoadProg write FOnLoadProg;
+ property OnTagParsed: TJclOnSimpleXMLParsed read FOnTagParsed write FOnTagParsed;
+ property OnValueParsed: TJclOnValueParsed read FOnValue write FOnValue;
+ property OnEncodeValue: TJclSimpleXMLEncodeEvent read FOnEncodeValue write FOnEncodeValue;
+ property OnDecodeValue: TJclSimpleXMLEncodeEvent read FOnDecodeValue write FOnDecodeValue;
+ property OnEncodeStream: TJclSimpleXMLEncodeStreamEvent read FOnEncodeStream write FOnEncodeStream;
+ property OnDecodeStream: TJclSimpleXMLEncodeStreamEvent read FOnDecodeStream write FOnDecodeStream;
+ end;
+
+{$IFNDEF CLR}
+{$IFDEF COMPILER6_UP}
+
+ TXMLVariant = class(TInvokeableVariantType)
+ public
+ procedure Clear(var V: TVarData); override;
+ function IsClear(const V: TVarData): Boolean; override;
+ procedure Copy(var Dest: TVarData; const Source: TVarData;
+ const Indirect: Boolean); override;
+ procedure CastTo(var Dest: TVarData; const Source: TVarData;
+ const AVarType: TVarType); override;
+
+ function DoFunction(var Dest: TVarData; const V: TVarData;
+ const Name: string; const Arguments: TVarDataArray): Boolean; override;
+ function GetProperty(var Dest: TVarData; const V: TVarData;
+ const Name: string): Boolean; override;
+ function SetProperty(const V: TVarData; const Name: string;
+ const Value: TVarData): Boolean; override;
+ end;
+
+ TXMLVarData = packed record
+ vType: TVarType;
+ Reserved1: Word;
+ Reserved2: Word;
+ Reserved3: Word;
+ XML: TJclSimpleXMLElem;
+ Reserved4: Longint;
+ end;
+
+procedure XMLCreateInto(var ADest: Variant; const AXML: TJclSimpleXMLElem);
+function XMLCreate(const AXML: TJclSimpleXMLElem): Variant; overload;
+function XMLCreate: Variant; overload;
+function VarXML: TVarType;
+
+{$ENDIF COMPILER6_UP}
+{$ENDIF !CLR}
+
+// Encodes a string into an internal format:
+// any character <= #127 is preserved
+// all other characters are converted to hex notation except
+// for some special characters that are converted to XML entities
+function SimpleXMLEncode(const S: string): string;
+// Decodes a string encoded with SimpleXMLEncode:
+// any character <= #127 is preserved
+// all other characters and substrings are converted from
+// the special XML entities to characters or from hex to characters
+// NB! Setting TrimBlanks to true will slow down the process considerably
+procedure SimpleXMLDecode(var S: string; TrimBlanks: Boolean);
+
+function XMLEncode(const S: string): string;
+function XMLDecode(const S: string): string;
+
+// Encodes special characters (', ", <, > and &) into XML entities (@apos;, ", <, > and &)
+function EntityEncode(const S: string): string;
+// Decodes XML entities (@apos;, ", <, > and &) into special characters (', ", <, > and &)
+function EntityDecode(const S: string): string;
+
+{$IFDEF UNITVERSIONING}
+const
+ UnitVersioning: TUnitVersionInfo = (
+ RCSfile: '$URL$';
+ Revision: '$Revision$';
+ Date: '$Date$';
+ LogPath: 'JCL\source\common'
+ );
+{$ENDIF UNITVERSIONING}
+
+implementation
+
+uses
+ JclStrings,
+ JclResources;
+
+const
+ cBufferSize = 8192;
+ DefaultTrueBoolStr = 'True'; // DO NOT LOCALIZE
+ DefaultFalseBoolStr = 'False'; // DO NOT LOCALIZE
+
+var
+ GlobalSorts: TList = nil;
+
+ {$IFNDEF CLR}
+ {$IFDEF COMPILER6_UP}
+ GlobalXMLVariant: TXMLVariant = nil;
+ {$ENDIF COMPILER6_UP}
+ {$ENDIF !CLR}
+
+ {$IFDEF COMPILER5}
+ TrueBoolStrs: array of string;
+ FalseBoolStrs: array of string;
+ {$ENDIF COMPILER5}
+
+function GSorts: TList;
+begin
+ if not Assigned(GlobalSorts) then
+ GlobalSorts := TList.Create;
+ Result := GlobalSorts;
+end;
+
+{$IFNDEF CLR}
+{$IFDEF COMPILER6_UP}
+
+function XMLVariant: TXMLVariant;
+begin
+ if not Assigned(GlobalXMLVariant) then
+ GlobalXMLVariant := TXMLVariant.Create;
+ Result := GlobalXMLVariant;
+end;
+{$ENDIF COMPILER6_UP}
+{$ENDIF !CLR}
+
+function EntityEncode(const S: string): string;
+var
+ I, J, K, L: Integer;
+ tmp: string;
+begin
+ SetLength(Result, Length(S) * 6); // worst case
+ J := 1;
+ I := 1;
+ L := Length(S);
+ while I <= L do
+ begin
+ case S[I] of
+ '"':
+ tmp := '"';
+ '&':
+ tmp := '&';
+ #39:
+ tmp := ''';
+ '<':
+ tmp := '<';
+ '>':
+ tmp := '>';
+ else
+ tmp := S[I];
+ end;
+ for K := 1 to Length(tmp) do
+ begin
+ Result[J] := tmp[K];
+ Inc(J);
+ end;
+ Inc(I);
+ end;
+ if J > 1 then
+ SetLength(Result, J - 1)
+ else
+ SetLength(Result, 0);
+end;
+
+function EntityDecode(const S: string): string;
+var
+ I, J, L: Integer;
+begin
+ Result := S;
+ I := 1;
+ J := 1;
+ L := Length(Result);
+
+ while I <= L do
+ begin
+ if Result[I] = '&' then
+ begin
+ if AnsiSameText(Copy(Result, I, 5), '&') then
+ begin
+ Result[J] := '&';
+ Inc(J);
+ Inc(I, 4);
+ end
+ else
+ if AnsiSameText(Copy(Result, I, 4), '<') then
+ begin
+ Result[J] := '<';
+ Inc(J);
+ Inc(I, 3);
+ end
+ else
+ if AnsiSameText(Copy(Result, I, 4), '>') then
+ begin
+ Result[J] := '>';
+ Inc(J);
+ Inc(I, 3);
+ end
+ else
+ if AnsiSameText(Copy(Result, I, 6), ''') then
+ begin
+ Result[J] := #39;
+ Inc(J);
+ Inc(I, 5);
+ end
+ else
+ if AnsiSameText(Copy(Result, I, 6), '"') then
+ begin
+ Result[J] := '"';
+ Inc(J);
+ Inc(I, 5);
+ end
+ else
+ begin
+ Result[J] := Result[I];
+ Inc(J);
+ end;
+ end
+ else
+ begin
+ Result[J] := Result[I];
+ Inc(J);
+ end;
+ Inc(I);
+ end;
+ if J > 1 then
+ SetLength(Result, J - 1)
+ else
+ SetLength(Result, 0);
+end;
+
+function ReadCharsFromStream(Stream: TStream; var Buf: array of Char; BufSize: Integer): Integer;
+{$IFDEF CLR}
+var
+ Bytes: TBytes;
+{$ENDIF CLR}
+begin
+ {$IFDEF CLR}
+ SetLength(Bytes, BufSize);
+ Result := Stream.Read(Bytes, 0, BufSize);
+ System.Array.Copy(AnsiEncoding.GetChars(Bytes), 0, Buf, 0, BufSize);
+ {$ELSE}
+ Result := Stream.Read(Buf, BufSize);
+ {$ENDIF CLR}
+end;
+
+function WriteStringToStream(Stream: TStream; const Buf: string; BufSize: Integer): Integer;
+begin
+ {$IFDEF CLR}
+ Result := Stream.Write(BytesOf(Buf), BufSize);
+ {$ELSE}
+ Result := Stream.Write(Buf[1], BufSize);
+ {$ENDIF CLR}
+end;
+
+{$IFDEF COMPILER5}
+
+procedure VerifyBoolStrArray;
+begin
+ if Length(TrueBoolStrs) = 0 then
+ begin
+ SetLength(TrueBoolStrs, 1);
+ TrueBoolStrs[0] := DefaultTrueBoolStr;
+ end;
+ if Length(FalseBoolStrs) = 0 then
+ begin
+ SetLength(FalseBoolStrs, 1);
+ FalseBoolStrs[0] := DefaultFalseBoolStr;
+ end;
+end;
+
+function TryStrToFloat(const S: string; out Value: Extended): Boolean;
+begin
+ Result := TextToFloat(PChar(S), Value, fvExtended);
+end;
+
+(* make Delphi 5 compiler happy // andreas
+procedure ConvertErrorFmt(ResString: PResStringRec; const Args: array of const);
+begin
+ raise EConvertError.CreateResFmt(ResString, Args);
+end;
+*)
+
+function TryStrToBool(const S: string; out Value: Boolean): Boolean;
+var
+ lResult: Extended;
+
+ function CompareWith(const AStrings: array of string): Boolean;
+ var
+ I: Integer;
+ begin
+ Result := False;
+ for I := Low(AStrings) to High(AStrings) do
+ if AnsiSameText(S, AStrings[I]) then
+ begin
+ Result := True;
+ Break;
+ end;
+ end;
+
+begin
+ Result := TryStrToFloat(S, lResult);
+ if Result then
+ Value := lResult <> 0
+ else
+ begin
+ VerifyBoolStrArray;
+ Result := CompareWith(TrueBoolStrs);
+ if Result then
+ Value := True
+ else
+ begin
+ Result := CompareWith(FalseBoolStrs);
+ if Result then
+ Value := False;
+ end;
+ end;
+end;
+
+function StrToBoolDef(const S: string; const Default: Boolean): Boolean;
+begin
+ if not TryStrToBool(S, Result) then
+ Result := Default;
+end;
+
+(* make Delphi 5 compiler happy // andreas
+function StrToBool(const S: string): Boolean;
+begin
+ if not TryStrToBool(S, Result) then
+ ConvertErrorFmt(@SInvalidBoolean, [S]);
+end;
+*)
+
+function BoolToStr(B: Boolean; UseBoolStrs: Boolean = False): string;
+const
+ cSimpleBoolStrs: array [Boolean] of string = ('0', '-1');
+begin
+ if UseBoolStrs then
+ begin
+ VerifyBoolStrArray;
+ if B then
+ Result := TrueBoolStrs[0]
+ else
+ Result := FalseBoolStrs[0];
+ end
+ else
+ Result := cSimpleBoolStrs[B];
+end;
+
+{$ENDIF COMPILER5}
+
+function SimpleXMLEncode(const S: string): string;
+const
+ NoConversion = [#0..#127] - ['"', '&', #39, '<', '>'];
+var
+ I, J, K: Integer;
+ tmp: string;
+begin
+ SetLength(Result, Length(S) * 6); // worst case
+ J := 1;
+ for I := 1 to Length(S) do
+ begin
+ if S[I] in NoConversion then
+ Result[J] := S[I]
+ else
+ begin
+ case S[I] of
+ '"':
+ tmp := '"';
+ '&':
+ tmp := '&';
+ #39:
+ tmp := ''';
+ '<':
+ tmp := '<';
+ '>':
+ tmp := '>';
+ else
+ tmp := Format('&#x%.2x;', [Ord(S[I])]);
+ end;
+ for K := 1 to Length(tmp) do
+ begin
+ Result[J] := tmp[K];
+ Inc(J);
+ end;
+ Dec(J);
+ end;
+ Inc(J);
+ end;
+ if J > 0 then
+ SetLength(Result, J - 1)
+ else
+ SetLength(Result, 0);
+end;
+
+procedure SimpleXMLDecode(var S: string; TrimBlanks: Boolean);
+var
+ StringLength, ReadIndex, WriteIndex: Cardinal;
+
+ procedure DecodeEntity(var S: string; StringLength: Cardinal;
+ var ReadIndex, WriteIndex: Cardinal);
+ const
+ cHexPrefix: array [Boolean] of string[1] = ('', '$');
+ var
+ I: Cardinal;
+ Value: Integer;
+ IsHex: Boolean;
+ begin
+ Inc(ReadIndex, 2);
+ IsHex := (ReadIndex <= StringLength) and (S[ReadIndex] in ['x', 'X']);
+ Inc(ReadIndex, Ord(IsHex));
+ I := ReadIndex;
+ while ReadIndex <= StringLength do
+ begin
+ if S[ReadIndex] = ';' then
+ begin
+ Value := StrToIntDef(cHexPrefix[IsHex] + Copy(S, I, ReadIndex - I), -1); // no characters are less than 0
+ if Value > 0 then
+ S[WriteIndex] := Chr(Value)
+ else
+ ReadIndex := I - (2 + Cardinal(IsHex)); // reset to start
+ Exit;
+ end;
+ Inc(ReadIndex);
+ end;
+ ReadIndex := I - (2 + Cardinal(IsHex)); // reset to start
+ end;
+
+ procedure SkipBlanks(var S: string; StringLength: Cardinal; var ReadIndex: Cardinal);
+ begin
+ while ReadIndex < StringLength do
+ begin
+ if S[ReadIndex] = AnsiCarriageReturn then
+ S[ReadIndex] := AnsiLineFeed
+ else
+ if S[ReadIndex + 1] = AnsiCarriageReturn then
+ S[ReadIndex + 1] := AnsiLineFeed;
+ if (S[ReadIndex] < #33) and (S[ReadIndex] = S[ReadIndex + 1]) then
+ Inc(ReadIndex)
+ else
+ Exit;
+ end;
+ end;
+
+begin
+ // NB! This procedure replaces the text inplace to speed up the conversion. This
+ // works because when decoding, the string can only become shorter. This is
+ // accomplished by keeping track of the current read and write points.
+ // In addition, the original string length is read only once and passed to the
+ // inner procedures to speed up conversion as much as possible
+ ReadIndex := 1;
+ WriteIndex := 1;
+ StringLength := Length(S);
+ while ReadIndex <= StringLength do
+ begin
+ // this call lowers conversion speed by ~30%, ie 21MB/sec -> 15MB/sec (repeated tests, various inputs)
+ if TrimBlanks then
+ SkipBlanks(S, StringLength, ReadIndex);
+ if S[ReadIndex] = '&' then
+ begin
+ if S[ReadIndex + 1] = '#' then
+ begin
+ DecodeEntity(S, StringLength, ReadIndex, WriteIndex);
+ Inc(WriteIndex);
+ end
+ else
+ if AnsiSameText(Copy(S, ReadIndex, 5), '&') then
+ begin
+ S[WriteIndex] := '&';
+ Inc(WriteIndex);
+ Inc(ReadIndex, 4);
+ end
+ else
+ if AnsiSameText(Copy(S, ReadIndex, 4), '<') then
+ begin
+ S[WriteIndex] := '<';
+ Inc(WriteIndex);
+ Inc(ReadIndex, 3);
+ end
+ else
+ if AnsiSameText(Copy(S, ReadIndex, 4), '>') then
+ begin
+ S[WriteIndex] := '>';
+ Inc(WriteIndex);
+ Inc(ReadIndex, 3);
+ end
+ else
+ if AnsiSameText(Copy(S, ReadIndex, 6), ''') then
+ begin
+ S[WriteIndex] := #39;
+ Inc(WriteIndex);
+ Inc(ReadIndex, 5);
+ end
+ else
+ if AnsiSameText(Copy(S, ReadIndex, 6), '"') then
+ begin
+ S[WriteIndex] := '"';
+ Inc(WriteIndex);
+ Inc(ReadIndex, 5);
+ end
+ else
+ begin
+ S[WriteIndex] := S[ReadIndex];
+ Inc(WriteIndex);
+ end;
+ end
+ else
+ begin
+ S[WriteIndex] := S[ReadIndex];
+ Inc(WriteIndex);
+ end;
+ Inc(ReadIndex);
+ end;
+ if WriteIndex > 0 then
+ SetLength(S, WriteIndex - 1)
+ else
+ SetLength(S, 0);
+ // this call lowers conversion speed by ~65%, ie 21MB/sec -> 7MB/sec (repeated tests, various inputs)
+// if TrimBlanks then
+// S := AdjustLineBreaks(S);
+end;
+
+function XMLEncode(const S: string): string;
+begin
+ Result := SimpleXMLEncode(S);
+end;
+
+function XMLDecode(const S: string): string;
+begin
+ Result := S;
+ SimpleXMLDecode(Result, False);
+end;
+
+//=== { TJclSimpleXML } ======================================================
+
+constructor TJclSimpleXML.Create;
+begin
+ inherited Create;
+ FRoot := TJclSimpleXMLElemClassic.Create(nil);
+ FRoot.FSimpleXML := Self;
+ FProlog := TJclSimpleXMLElemsProlog.Create;
+ FOptions := [sxoAutoIndent, sxoAutoEncodeValue, sxoAutoEncodeEntity];
+ FIndentString := ' ';
+end;
+
+destructor TJclSimpleXML.Destroy;
+begin
+ FreeAndNil(FRoot);
+ FreeAndNil(FProlog);
+ inherited Destroy;
+end;
+
+procedure TJclSimpleXML.DoDecodeValue(var Value: string);
+begin
+ if sxoAutoEncodeValue in Options then
+ SimpleXMLDecode(Value, False)
+ else
+ if sxoAutoEncodeEntity in Options then
+ Value := EntityDecode(Value);
+ if Assigned(FOnDecodeValue) then
+ FOnDecodeValue(Self, Value);
+end;
+
+procedure TJclSimpleXML.DoEncodeValue(var Value: string);
+begin
+ if Assigned(FOnEncodeValue) then
+ FOnEncodeValue(Self, Value);
+ if sxoAutoEncodeValue in Options then
+ Value := SimpleXMLEncode(Value)
+ else
+ if sxoAutoEncodeEntity in Options then
+ Value := EntityEncode(Value);
+end;
+
+procedure TJclSimpleXML.DoLoadProgress(const APosition, ATotal: Integer);
+begin
+ if Assigned(FOnLoadProg) then
+ FOnLoadProg(Self, APosition, ATotal);
+end;
+
+procedure TJclSimpleXML.DoSaveProgress;
+begin
+ if Assigned(FOnSaveProg) then
+ begin
+ Inc(FSaveCount);
+ FOnSaveProg(Self, FSaveCurrent, FSaveCount);
+ end;
+end;
+
+procedure TJclSimpleXML.DoTagParsed(const AName: string);
+begin
+ if Assigned(FOnTagParsed) then
+ FOnTagParsed(Self, AName);
+end;
+
+procedure TJclSimpleXML.DoValueParsed(const AName, AValue: string);
+begin
+ if Assigned(FOnValue) then
+ FOnValue(Self, AName, AValue);
+end;
+
+procedure TJclSimpleXML.LoadFromFile(const FileName: TFileName);
+var
+ Stream: TMemoryStream;
+begin
+ Stream := TMemoryStream.Create;
+ try
+ Stream.LoadFromFile(FileName);
+ LoadFromStream(Stream);
+ finally
+ Stream.Free;
+ end;
+end;
+
+procedure TJclSimpleXML.LoadFromResourceName(Instance: THandle; const ResName: string);
+{$IFNDEF MSWINDOWS}
+const
+ RT_RCDATA = PChar(10);
+{$ENDIF !MSWINDOWS}
+var
+ Stream: TResourceStream;
+begin
+ Stream := TResourceStream.Create(Instance, ResName, RT_RCDATA);
+ try
+ LoadFromStream(Stream);
+ finally
+ Stream.Free;
+ end;
+end;
+
+procedure TJclSimpleXML.LoadFromStream(Stream: TStream);
+var
+ AOutStream: TStream;
+ DoFree: Boolean;
+begin
+ FRoot.Clear;
+ FProlog.Clear;
+ AOutStream := nil;
+ DoFree := False;
+ try
+ if Assigned(FOnDecodeStream) then
+ begin
+ AOutStream := TMemoryStream.Create;
+ DoFree := True;
+ FOnDecodeStream(Self, Stream, AOutStream);
+ AOutStream.Seek(0, soFromBeginning);
+ end
+ else
+ AOutStream := Stream;
+ if Assigned(FOnLoadProg) then
+ begin
+ FOnLoadProg(Self, AOutStream.Position, AOutStream.Size);
+ // Read doctype and so on
+ FProlog.LoadFromStream(AOutStream, Self);
+ // Read elements
+ FRoot.LoadFromStream(AOutStream, Self);
+ FOnLoadProg(Self, AOutStream.Position, AOutStream.Size);
+ end
+ else
+ begin
+ FProlog.LoadFromStream(AOutStream, Self);
+ FRoot.LoadFromStream(AOutStream, Self);
+ end;
+ finally
+ if DoFree then
+ AOutStream.Free;
+ end;
+end;
+
+procedure TJclSimpleXML.LoadFromString(const Value: string);
+var
+ Stream: TStringStream;
+begin
+ Stream := TStringStream.Create(Value);
+ try
+ LoadFromStream(Stream);
+ finally
+ Stream.Free;
+ end;
+end;
+
+procedure TJclSimpleXML.SaveToFile(FileName: TFileName);
+var
+ Stream: TFileStream;
+begin
+ if FileExists(FileName) then
+ begin
+ Stream := TFileStream.Create(FileName, fmOpenWrite);
+ Stream.Size := 0;
+ end
+ else
+ Stream := TFileStream.Create(FileName, fmCreate);
+ try
+ SaveToStream(Stream);
+ finally
+ Stream.Free;
+ end;
+end;
+
+procedure TJclSimpleXML.SaveToStream(Stream: TStream);
+var
+ lCount: Integer;
+ AOutStream: TStream;
+ DoFree: Boolean;
+begin
+ if Assigned(FOnEncodeStream) then
+ begin
+ AOutStream := TMemoryStream.Create;
+ DoFree := True;
+ end
+ else
+ begin
+ AOutStream := Stream;
+ DoFree := False;
+ end;
+ try
+ if Assigned(FOnSaveProg) then
+ begin
+ lCount := Root.ChildsCount + Prolog.Count;
+ FSaveCount := lCount;
+ FSaveCurrent := 0;
+ FOnSaveProg(Self, 0, lCount);
+ if not (sxoDoNotSaveProlog in FOptions) then
+ Prolog.SaveToStream(AOutStream, Self);
+ Root.SaveToStream(AOutStream, '', Self);
+ FOnSaveProg(Self, lCount, lCount);
+ end
+ else
+ begin
+ if not (sxoDoNotSaveProlog in FOptions) then
+ Prolog.SaveToStream(AOutStream, Self);
+ Root.SaveToStream(AOutStream, '', Self);
+ end;
+ if Assigned(FOnEncodeStream) then
+ begin
+ AOutStream.Seek(0, soFromBeginning);
+ FOnEncodeStream(Self, AOutStream, Stream);
+ end;
+ finally
+ if DoFree then
+ AOutStream.Free;
+ end;
+end;
+
+function TJclSimpleXML.SaveToString: string;
+var
+ Stream: TStringStream;
+begin
+ Stream := TStringStream.Create('');
+ try
+ SaveToStream(Stream);
+ Result := Stream.DataString;
+ finally
+ Stream.Free;
+ end;
+end;
+
+procedure TJclSimpleXML.SetFileName(Value: TFileName);
+begin
+ FFileName := Value;
+ LoadFromFile(Value);
+end;
+
+//=== { TJclSimpleXMLElem } ==================================================
+
+procedure TJclSimpleXMLElem.Assign(Value: TJclSimpleXMLElem);
+var
+ Elems: TJclSimpleXMLElem;
+ Elem: TJclSimpleXMLElem;
+ I: Integer;
+begin
+ Clear;
+ if Value = nil then
+ Exit;
+ Elems := TJclSimpleXMLElem(Value);
+ Name := Elems.Name;
+ Self.Value := Elems.Value;
+ for I := 0 to Elems.Properties.Count - 1 do
+ Properties.Add(Elems.Properties[I].Name, Elems.Properties[I].Value);
+
+ for I := 0 to Elems.Items.Count - 1 do
+ begin
+ // Create from the class type, so that the virtual constructor is called
+ // creating an element of the correct class type.
+ Elem := TJclSimpleXMLElemClass(Elems.Items[I].ClassType).Create(Elems.Items[I].Parent);
+ Elem.Assign(Elems.Items[I]);
+ Items.Add(Elem);
+ end;
+end;
+
+procedure TJclSimpleXMLElem.Clear;
+begin
+ if FItems <> nil then
+ FItems.Clear;
+ if FProps <> nil then
+ FProps.Clear;
+end;
+
+constructor TJclSimpleXMLElem.Create(const AOwner: TJclSimpleXMLElem);
+begin
+ inherited Create;
+ FName := '';
+ FParent := TJclSimpleXMLElem(AOwner);
+ if Assigned(FParent) then
+ FSimpleXML := FParent.FSimpleXML;
+ FContainer := nil;
+end;
+
+destructor TJclSimpleXMLElem.Destroy;
+begin
+ FParent := nil;
+ Clear;
+ FreeAndNil(FItems);
+ FreeAndNil(FProps);
+ inherited Destroy;
+end;
+
+p...
[truncated message content] |
|
From: <ou...@us...> - 2006-11-27 06:06:00
|
Revision: 1822
http://svn.sourceforge.net/jcl/?rev=1822&view=rev
Author: outchy
Date: 2006-11-26 22:05:58 -0800 (Sun, 26 Nov 2006)
Log Message:
-----------
Removed working directory
Modified Paths:
--------------
trunk/jcl/install/build/build.bdsproj
Modified: trunk/jcl/install/build/build.bdsproj
===================================================================
--- trunk/jcl/install/build/build.bdsproj 2006-11-26 19:02:11 UTC (rev 1821)
+++ trunk/jcl/install/build/build.bdsproj 2006-11-27 06:05:58 UTC (rev 1822)
@@ -134,7 +134,7 @@
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
- <Parameters Name="DebugCWD">D:\Quellen\jedi\DeXter\jcl\install\build</Parameters>
+ <Parameters Name="DebugCWD"></Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-26 19:02:21
|
Revision: 1821
http://svn.sourceforge.net/jcl/?rev=1821&view=rev
Author: outchy
Date: 2006-11-26 11:02:11 -0800 (Sun, 26 Nov 2006)
Log Message:
-----------
Small change to make error insight happy
Fix for -LU in FixDcc32Cfg: this fix only applies to BCB5.
Modified Paths:
--------------
trunk/jcl/install/build/build.dpr
trunk/jcl/install/build/build.exe
Modified: trunk/jcl/install/build/build.dpr
===================================================================
--- trunk/jcl/install/build/build.dpr 2006-11-21 11:09:48 UTC (rev 1820)
+++ trunk/jcl/install/build/build.dpr 2006-11-26 19:02:11 UTC (rev 1821)
@@ -91,6 +91,8 @@
);
type
+ TEditionTyp = (Delphi, BCB, BDS);
+
TEdition = class(TObject)
private
FMainName: string; // d7
@@ -106,7 +108,7 @@
function GetBDSProjectsDir: string;
procedure ReadRegistryData;
public
- Typ: (Delphi, BCB, BDS);
+ Typ: TEditionTyp;
VersionStr: string; // '9' for BDS 3.0
Version: Integer; // 9 for BDS 3.0
IDEVersionStr: string; // '3' for BDS 3.0
@@ -1046,7 +1048,7 @@
else
begin
FoundU := False;
- FoundLU := (Edition.Typ <> BCB) and (Edition.Version = 5);
+ FoundLU := (Edition.Typ <> BCB) or (Edition.Version <> 5);
Reset(f);
while not EOF(f) and not (FoundU and FoundLU) do
begin
Modified: trunk/jcl/install/build/build.exe
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ob...@us...> - 2006-11-21 11:09:50
|
Revision: 1820
http://svn.sourceforge.net/jcl/?rev=1820&view=rev
Author: obones
Date: 2006-11-21 03:09:48 -0800 (Tue, 21 Nov 2006)
Log Message:
-----------
Strings start at index 1, not zero
Modified Paths:
--------------
trunk/jcl/source/common/JclCompression.pas
Modified: trunk/jcl/source/common/JclCompression.pas
===================================================================
--- trunk/jcl/source/common/JclCompression.pas 2006-11-11 15:00:52 UTC (rev 1819)
+++ trunk/jcl/source/common/JclCompression.pas 2006-11-21 11:09:48 UTC (rev 1820)
@@ -848,7 +848,7 @@
Index: Integer;
begin
Result := False;
- for Index := 0 to Length(Buffer) do
+ for Index := 1 to Length(Buffer) do
if Buffer[Index] = #0 then
Exit;
Result := True;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-11 15:01:10
|
Revision: 1819
http://svn.sourceforge.net/jcl/?rev=1819&view=rev
Author: outchy
Date: 2006-11-11 07:00:52 -0800 (Sat, 11 Nov 2006)
Log Message:
-----------
Mantis 1207 Bad index in JclMatches could cause access violations.
Modified Paths:
--------------
trunk/jcl/source/common/JclAnsiStrings.pas
trunk/jcl/source/common/JclStrings.pas
Modified: trunk/jcl/source/common/JclAnsiStrings.pas
===================================================================
--- trunk/jcl/source/common/JclAnsiStrings.pas 2006-11-07 15:10:53 UTC (rev 1818)
+++ trunk/jcl/source/common/JclAnsiStrings.pas 2006-11-11 15:00:52 UTC (rev 1819)
@@ -2717,6 +2717,9 @@
if Result or (S = '') then
Exit;
+ if (Index <= 0) or (Index > Length(S)) then
+ raise EJclStringError.CreateRes(@RsArgumentOutOfRange);
+
StringPtr := PAnsiChar(@S[Index]);
PatternPtr := PAnsiChar(SubStr);
StringRes := nil;
Modified: trunk/jcl/source/common/JclStrings.pas
===================================================================
--- trunk/jcl/source/common/JclStrings.pas 2006-11-07 15:10:53 UTC (rev 1818)
+++ trunk/jcl/source/common/JclStrings.pas 2006-11-11 15:00:52 UTC (rev 1819)
@@ -2849,6 +2849,9 @@
if Result or (S = '') then
Exit;
+ if (Index <= 0) or (Index > Length(S)) then
+ raise EJclStringError.CreateRes(@RsArgumentOutOfRange);
+
StringPtr := PChar(@S[Index]);
PatternPtr := PChar(SubStr);
StringRes := nil;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mo...@us...> - 2006-11-07 15:11:05
|
Revision: 1818
http://svn.sourceforge.net/jcl/?rev=1818&view=rev
Author: morrac
Date: 2006-11-07 07:10:53 -0800 (Tue, 07 Nov 2006)
Log Message:
-----------
- Owner is gone, it wasn't really needed.
- Initial dfa-matching implementation.
- Use the JclPCRECalloutCallback fc instead of accessing the global
var in the dll as suggested in pcre.pas.
Modified Paths:
--------------
branches/test_pcre/jcl/source/common/JclPCRE.pas
Modified: branches/test_pcre/jcl/source/common/JclPCRE.pas
===================================================================
--- branches/test_pcre/jcl/source/common/JclPCRE.pas 2006-11-05 14:47:50 UTC (rev 1817)
+++ branches/test_pcre/jcl/source/common/JclPCRE.pas 2006-11-07 15:10:53 UTC (rev 1818)
@@ -87,11 +87,11 @@
TJclAnsiRegEx = class(TObject)
private
- FOwner: TObject;
FCode: Pointer;
FExtra: Pointer;
FOptions: TJclAnsiRegExOptions;
FPattern: AnsiString;
+ FDfaMode: Boolean;
FSubject: AnsiString;
FErrorCode: Integer;
@@ -104,7 +104,6 @@
FOnCallout: TJclAnsiRegExCallout;
- function GetCaptureCount: Integer;
function GetCapture(Index: Integer): AnsiString;
function GetCaptureRange(Index: Integer): TJclAnsiCaptureRange;
function GetNamedCapture(const Name: AnsiString): AnsiString;
@@ -114,18 +113,17 @@
function CalloutHandler(var CalloutBlock: pcre_callout_block): Integer;
public
- constructor Create(Owner: TObject = nil);
destructor Destroy; override;
- property Owner: TObject read FOwner write FOwner;
property Options: TJclAnsiRegExOptions read FOptions write FOptions;
function Compile(const Pattern: AnsiString; Study: Boolean;
UserLocale: Boolean = False): Boolean;
property Pattern: AnsiString read FPattern;
+ property DfaMode: Boolean read FDfaMode write FDfaMode;
function Match(const Subject: AnsiString; StartOffset: Cardinal = 1): Boolean;
property Subject: AnsiString read FSubject;
- property CaptureCount: Integer read GetCaptureCount;
+ property CaptureCount: Integer read FCaptureCount write FCaptureCount;
property Captures[Index: Integer]: AnsiString read GetCapture;
property CaptureRanges[Index: Integer]: TJclAnsiCaptureRange read GetCaptureRange;
@@ -242,12 +240,6 @@
//=== { TJclAnsiRegEx } ======================================================
-constructor TJclAnsiRegEx.Create(Owner: TObject = nil);
-begin
- inherited Create;
- FOwner := Owner;
-end;
-
destructor TJclAnsiRegEx.Destroy;
begin
if Assigned(FCode) then
@@ -298,11 +290,16 @@
end;
end;
- PCRECheck(pcre_fullinfo(FCode, FExtra, PCRE_INFO_CAPTURECOUNT, @FCaptureCount));
- if FCaptureCount > 0 then
- FVectorSize := (FCaptureCount + 1) * 3
+ if FDfaMode then
+ FVectorSize := FCaptureCount
else
- FVectorSize := 0;
+ begin
+ PCRECheck(pcre_fullinfo(FCode, FExtra, PCRE_INFO_CAPTURECOUNT, @FCaptureCount));
+ if FCaptureCount > 0 then
+ FVectorSize := (FCaptureCount + 1) * 3
+ else
+ FVectorSize := 0;
+ end;
ReAllocMem(FVector, FVectorSize * SizeOf(Integer));
end;
end;
@@ -341,11 +338,6 @@
end;
end;
-function TJclAnsiRegEx.GetCaptureCount: Integer;
-begin
- Result := FCaptureCount;
-end;
-
function TJclAnsiRegEx.GetCapture(Index: Integer): AnsiString;
var
From, Len: Integer;
@@ -426,6 +418,7 @@
var
LocalExtra: real_pcre_extra;
Extra: Pointer;
+ WorkSpace: array [0 .. 19] of Integer;
ExecRslt: Integer;
begin
if Assigned(FOnCallout) then
@@ -439,17 +432,25 @@
LocalExtra.flags := PCRE_EXTRA_CALLOUT_DATA;
LocalExtra.callout_data := Self;
Extra := @LocalExtra;
- pcre_callout^ := JclPCRECallout;
+ SetPCRECalloutCallback(JclPCRECallout);
end
else
begin
Extra := FExtra;
- pcre_callout^ := nil;
+ SetPCRECalloutCallback(nil);
end;
FSubject := Subject;
- ExecRslt := pcre_exec(FCode, Extra, PChar(FSubject), Length(FSubject),
- StartOffset - 1, GetAPIOptions(True), PInteger(FVector), FVectorSize);
+ if FDfaMode then
+ begin
+ ExecRslt := pcre_dfa_exec(FCode, Extra, PChar(FSubject), Length(FSubject),
+ StartOffset - 1, GetAPIOptions(True), PInteger(FVector), FVectorSize, @Workspace, 20);
+ end
+ else
+ begin
+ ExecRslt := pcre_exec(FCode, Extra, PChar(FSubject), Length(FSubject),
+ StartOffset - 1, GetAPIOptions(True), PInteger(FVector), FVectorSize);
+ end;
Result := ExecRslt >= 0;
if Result then
begin
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-05 14:47:58
|
Revision: 1817
http://svn.sourceforge.net/jcl/?rev=1817&view=rev
Author: outchy
Date: 2006-11-05 06:47:50 -0800 (Sun, 05 Nov 2006)
Log Message:
-----------
Changed ancestor of TJclCompressionStream from TStream to TJclStream: the 64 bit version of seek is available for all compilers (including Delphi 5 and C++Builder 5)
Modified Paths:
--------------
trunk/jcl/source/common/JclCompression.pas
Modified: trunk/jcl/source/common/JclCompression.pas
===================================================================
--- trunk/jcl/source/common/JclCompression.pas 2006-11-04 21:23:53 UTC (rev 1816)
+++ trunk/jcl/source/common/JclCompression.pas 2006-11-05 14:47:50 UTC (rev 1817)
@@ -83,7 +83,7 @@
{**************************************************************************************************}
type
- TJclCompressionStream = class(TStream)
+ TJclCompressionStream = class(TJclStream)
private
FOnProgress: TNotifyEvent;
FBuffer: Pointer;
@@ -98,7 +98,7 @@
destructor Destroy; override;
function Read(var Buffer; Count: Longint): Longint; override;
function Write(const Buffer; Count: Longint): Longint; override;
- function Seek(Offset: Longint; Origin: Word): Longint; override;
+ function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
procedure Reset; virtual;
end;
@@ -136,7 +136,7 @@
destructor Destroy; override;
function Flush: Integer; override;
procedure Reset; override;
- function Seek(Offset: Longint; Origin: Word): Longint; override;
+ function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
function Write(const Buffer; Count: Longint): Longint; override;
property WindowBits: Integer read FWindowBits write SetWindowBits;
property MemLevel: Integer read FMemLevel write SetMemLevel;
@@ -156,7 +156,7 @@
constructor Create(Source: TStream; WindowBits: Integer = DEF_WBITS);
destructor Destroy; override;
function Read(var Buffer; Count: Longint): Longint; override;
- function Seek(Offset: Longint; Origin: Word): Longint; override;
+ function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
property WindowBits: Integer read FWindowBits write SetWindowBits;
end;
@@ -364,7 +364,7 @@
BZLibRecord: TBZStream;
public
function Flush: Integer; override;
- function Seek(Offset: Longint; Origin: Word): Longint; override;
+ function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
function Write(const Buffer; Count: Longint): Longint; override;
constructor Create(Destination: TStream; CompressionLevel: TJclCompressionLevel = -1);
@@ -380,7 +380,7 @@
public
function Read(var Buffer; Count: Longint): Longint; override;
- function Seek(Offset: Longint; Origin: Word): Longint; override;
+ function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
constructor Create(Source: TStream); overload;
destructor Destroy; override;
@@ -432,7 +432,7 @@
raise EJclCompressionError.CreateRes(@RsCompressionWriteNotSupported);
end;
-function TJclCompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
+function TJclCompressionStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
begin
raise EJclCompressionError.CreateRes(@RsCompressionSeekNotSupported);
end;
@@ -606,12 +606,12 @@
end;
end;
-function TJclZLibCompressStream.Seek(Offset: Longint; Origin: Word): Longint;
+function TJclZLibCompressStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
begin
- if (Offset = 0) and (Origin = soFromCurrent) then
+ if (Offset = 0) and (Origin = soCurrent) then
Result := ZLibRecord.total_in
else
- if (Offset = 0) and (Origin = soFromBeginning) and (ZLibRecord.total_in = 0) then
+ if (Offset = 0) and (Origin = soBeginning) and (ZLibRecord.total_in = 0) then
Result := 0
else
Result := inherited Seek(Offset, Origin);
@@ -727,9 +727,9 @@
Result := Count;
end;
-function TJclZLibDecompressStream.Seek(Offset: Longint; Origin: Word): Longint;
+function TJclZLibDecompressStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
begin
- if (Offset = 0) and (Origin = soFromCurrent) then
+ if (Offset = 0) and (Origin = soCurrent) then
Result := ZLibRecord.total_out
else
Result := inherited Seek(Offset, Origin);
@@ -1290,7 +1290,7 @@
end;
end;
-function TJclBZIP2CompressStream.Seek(Offset: Longint; Origin: Word): Longint;
+function TJclBZIP2CompressStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
begin
if (Offset = 0) and (Origin = soFromCurrent) then
Result := BZLibRecord.total_in_lo32
@@ -1374,7 +1374,7 @@
Result := Count;
end;
-function TJclBZIP2DecompressStream.Seek(Offset: Longint; Origin: Word): Longint;
+function TJclBZIP2DecompressStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
begin
if (Offset = 0) and (Origin = soFromCurrent) then
Result := BZLibRecord.total_out_lo32
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-04 21:24:01
|
Revision: 1816
http://svn.sourceforge.net/jcl/?rev=1816&view=rev
Author: outchy
Date: 2006-11-04 13:23:53 -0800 (Sat, 04 Nov 2006)
Log Message:
-----------
Fixed header CRC size (16 bits) for the gzip compressor
Default flags are now set for the gzip compressor
Modified Paths:
--------------
trunk/jcl/source/common/JclCompression.pas
Modified: trunk/jcl/source/common/JclCompression.pas
===================================================================
--- trunk/jcl/source/common/JclCompression.pas 2006-11-04 21:10:27 UTC (rev 1815)
+++ trunk/jcl/source/common/JclCompression.pas 2006-11-04 21:23:53 UTC (rev 1816)
@@ -747,6 +747,7 @@
begin
inherited Create(Destination);
+ FFlags := [gfHeaderCRC16, gfExtraField, gfOriginalFileName, gfComment];
FAutoSetTime := True;
FFatSystem := gfsUnknown;
FCompressionLevel := CompressionLevel;
@@ -860,7 +861,7 @@
JCL_GZIP_OS_QDOS, JCL_GZIP_OS_ACORN, JCL_GZIP_OS_UNKNOWN, JCL_GZIP_OS_UNKNOWN );
var
AHeader: TJclGZIPHeader;
- ExtraFieldLength: Word;
+ ExtraFieldLength, HeaderCRC16: Word;
begin
if gfHeaderCRC16 in Flags then
HeaderCRC := crc32(0, nil, 0);
@@ -922,7 +923,10 @@
end;
if (gfHeaderCRC16 in Flags) then
- FStream.WriteBuffer(HeaderCRC, SizeOf(HeaderCRC));
+ begin
+ HeaderCRC16 := HeaderCRC and $FFFF;
+ FStream.WriteBuffer(HeaderCRC16, SizeOf(HeaderCRC16));
+ end;
end;
procedure TJclGZIPCompressionStream.ZLibStreamProgress(Sender: TObject);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-04 21:10:37
|
Revision: 1815
http://svn.sourceforge.net/jcl/?rev=1815&view=rev
Author: outchy
Date: 2006-11-04 13:10:27 -0800 (Sat, 04 Nov 2006)
Log Message:
-----------
Reworked gzip streams:
- additional properties stored in the file header (fat system, compression level)
- formalization of the file format (header and footer)
- header and data CRC can be checked
- automatic date/time on compress
- extrafield can be read and written
- additional checks before storing file name and comment as C strings (null terminated)
- TODO: read/write of additional headers containing access rights (etc...)
Modified Paths:
--------------
trunk/jcl/source/common/JclCompression.pas
trunk/jcl/source/common/JclResources.pas
Modified: trunk/jcl/source/common/JclCompression.pas
===================================================================
--- trunk/jcl/source/common/JclCompression.pas 2006-11-04 21:04:16 UTC (rev 1814)
+++ trunk/jcl/source/common/JclCompression.pas 2006-11-04 21:10:27 UTC (rev 1815)
@@ -41,6 +41,8 @@
unit JclCompression;
+{$I jcl.inc}
+
interface
uses
@@ -58,7 +60,8 @@
{$ENDIF HAS_UNIT_LIBC}
SysUtils, Classes,
JclBase,
- zlibh;
+ zlibh,
+ JclStreams;
{**************************************************************************************************}
{
@@ -158,21 +161,113 @@
end;
// GZIP Support
+
+//=== { GZIP helpers } =======================================================
+
+type
+ TJclGZIPHeader = packed record
+ ID1: Byte;
+ ID2: Byte;
+ CompressionMethod: Byte;
+ Flags: Byte;
+ ModifiedTime: Cardinal;
+ ExtraFlags: Byte;
+ OS: Byte;
+ end;
+
+ TJclGZIPFooter = packed record
+ DataCRC32: Cardinal;
+ DataSize: Cardinal;
+ end;
+
+const
+ // ID1 and ID2 fields
+ JCL_GZIP_ID1 = $1F; // value for the ID1 field
+ JCL_GZIP_ID2 = $8B; // value for the ID2 field
+
+ // Compression Model field
+ JCL_GZIP_CM_DEFLATE = 8; // Zlib classic
+
+ // Flags field : extra fields for the header
+ JCL_GZIP_FLAG_TEXT = $01; // file is probably ASCII text
+ JCL_GZIP_FLAG_CRC = $02; // a CRC16 for the header is present
+ JCL_GZIP_FLAG_EXTRA = $04; // extra fields present
+ JCL_GZIP_FLAG_NAME = $08; // original file name is present
+ JCL_GZIP_FLAG_COMMENT = $10; // comment is present
+
+ // ExtraFlags field : compression level
+ JCL_GZIP_EFLAG_MAX = 2; // compressor used maximum compression
+ JCL_GZIP_EFLAG_FAST = 4; // compressor used fastest compression
+
+ // OS field : file system
+ JCL_GZIP_OS_FAT = 0; // FAT filesystem (MS-DOS, OS/2, NT/Win32)
+ JCL_GZIP_OS_AMIGA = 1; // Amiga
+ JCL_GZIP_OS_VMS = 2; // VMS (or OpenVMS)
+ JCL_GZIP_OS_UNIX = 3; // Unix
+ JCL_GZIP_OS_VM = 4; // VM/CMS
+ JCL_GZIP_OS_ATARI = 5; // Atari TOS
+ JCL_GZIP_OS_HPFS = 6; // HPFS filesystem (OS/2, NT)
+ JCL_GZIP_OS_MAC = 7; // Macintosh
+ JCL_GZIP_OS_Z = 8; // Z-System
+ JCL_GZIP_OS_CPM = 9; // CP/M
+ JCL_GZIP_OS_TOPS = 10; // TOPS-20
+ JCL_GZIP_OS_NTFS = 11; // NTFS filesystem (NT)
+ JCL_GZIP_OS_QDOS = 12; // QDOS
+ JCL_GZIP_OS_ACORN = 13; // Acorn RISCOS
+ JCL_GZIP_OS_UNKNOWN = 255; // unknown
+
+type
+ TJclGZIPSubFieldHeader = packed record
+ SI1: Byte;
+ SI2: Byte;
+ Len: Word;
+ end;
+// constants to identify sub fields in the extra field
+// source: http://www.gzip.org/format.txt
+const
+ JCL_GZIP_X_AC1 = $41; // AC Acorn RISC OS/BBC MOS file type information
+ JCL_GZIP_X_AC2 = $43;
+ JCL_GZIP_X_Ap1 = $41; // Ap Apollo file type information
+ JCL_GZIP_X_Ap2 = $70;
+ JCL_GZIP_X_cp1 = $63; // cp file compressed by cpio
+ JCL_GZIP_X_cp2 = $70;
+ JCL_GZIP_X_GS1 = $1D; // GS gzsig
+ JCL_GZIP_X_GS2 = $53;
+ JCL_GZIP_X_KN1 = $4B; // KN KeyNote assertion (RFC 2704)
+ JCL_GZIP_X_KN2 = $4E;
+ JCL_GZIP_X_Mc1 = $4D; // Mc Macintosh info (Type and Creator values)
+ JCL_GZIP_X_Mc2 = $63;
+ JCL_GZIP_X_RO1 = $52; // RO Acorn Risc OS file type information
+ JCL_GZIP_X_RO2 = $4F;
+
+type
+ TJclGZIPFlag = (gfDataIsText, gfHeaderCRC16, gfExtraField, gfOriginalFileName,
+ gfComment);
+ TJclGZIPFlags = set of TJclGZIPFlag;
+ TJclGZIPFatSystem = (gfsFat, gfsAmiga, gfsVMS, gfsUnix, gfsVM, gfsAtari, gfsHPFS,
+ gfsMac, gfsZ, gfsCPM, gfsTOPS, gfsNTFS, gfsQDOS, gfsAcorn, gfsOther, gfsUnknown);
+
// Format is described in RFC 1952, http://www.faqs.org/rfcs/rfc1952.html
TJclGZIPCompressionStream = class(TJclCompressStream)
private
+ FFlags: TJclGZIPFlags;
+ FUnixTime: Cardinal;
+ FAutoSetTime: Boolean;
+ FCompressionLevel: TJclCompressionLevel;
+ FFatSystem: TJclGZIPFatSystem;
+ FExtraField: string;
+ FOriginalFileName: string;
FComment: string;
- FOriginalDateTime: TDateTime;
- FOriginalFileName: string;
+ FZLibStream: TJclZlibCompressStream;
+ FOriginalSize: Cardinal;
+ FDataCRC32: Cardinal;
FHeaderWritten: Boolean;
- FZlStream: TJclZlibCompressStream;
-
- FOriginalSize: Cardinal;
- FCRC32: Cardinal;
- FCompressionLevel: TJclCompressionLevel;
-
procedure WriteHeader;
- procedure ZlStreamProgress(Sender: TObject);
+ function GetDosTime: TDateTime;
+ function GetUnixTime: Cardinal;
+ procedure SetDosTime(const Value: TDateTime);
+ procedure SetUnixTime(Value: Cardinal);
+ procedure ZLibStreamProgress(Sender: TObject);
public
constructor Create(Destination: TStream; CompressionLevel: TJclCompressionLevel = -1);
destructor Destroy; override;
@@ -183,42 +278,66 @@
// the last call to Write.
function Flush: Integer; override;
+ property Flags: TJclGZIPFlags read FFlags write FFlags;
+ property DosTime: TDateTime read GetDosTime write SetDosTime;
+ property UnixTime: Cardinal read GetUnixTime write SetUnixTime;
+ property AutoSetTime: Boolean read FAutoSetTime write FAutoSetTime;
+ property FatSystem: TJclGZIPFatSystem read FFatSystem write FFatSystem;
+ property ExtraField: string read FExtraField write FExtraField;
// Note: In order for most decompressors to work, the original file name
// must be given or they would display an empty file name in their list.
// This does not affect the decompression stream below as it simply reads
// the value and does not work with it
property OriginalFileName: string read FOriginalFileName write FOriginalFileName;
- property OriginalDateTime: TDateTime read FOriginalDateTime write FOriginalDateTime;
property Comment: string read FComment write FComment;
end;
TJclGZIPDecompressionStream = class(TJclDecompressStream)
private
- FZlStream: TJclZLibDecompressStream;
- FMemStream: TMemoryStream;
-
- FHeaderRead: Boolean;
+ FHeader: TJclGZIPHeader;
+ FFooter: TJclGZIPFooter;
+ FCompressedDataStream: TJclDelegatedStream;
+ FZLibStream: TJclZLibDecompressStream;
FOriginalFileName: string;
FComment: string;
- FOriginalDateTime: TDateTime;
- FCRC16: Word;
+ FExtraField: string;
+ FComputedHeaderCRC16: Word;
+ FStoredHeaderCRC16: Word;
+ FComputedDataCRC32: Cardinal;
FCompressedDataSize: Int64;
- FCRC32: Cardinal;
- FOriginalSize: Cardinal;
-
- function ReadHeader: Boolean;
- procedure ZlStreamProgress(Sender: TObject);
+ FDataSize: Int64;
+ FDataStarted: Boolean;
+ FDataEnded: Boolean;
+ FAutoCheckDataCRC32: Boolean;
+ function GetCompressedDataSize: Int64;
+ function GetComputedDataCRC32: Cardinal;
+ function GetDosTime: TDateTime;
+ function GetFatSystem: TJclGZIPFatSystem;
+ function GetFlags: TJclGZIPFlags;
+ function GetOriginalDataSize: Cardinal;
+ function GetStoredDataCRC32: Cardinal;
+ function ReadCompressedData(Sender: TObject; var Buffer; Count: Longint): Longint;
+ procedure ZLibStreamProgress(Sender: TObject);
public
+ constructor Create(Source: TStream; CheckHeaderCRC: Boolean = True);
destructor Destroy; override;
-
function Read(var Buffer; Count: Longint): Longint; override;
+ property ComputedHeaderCRC16: Word read FComputedHeaderCRC16;
+ property StoredHeaderCRC16: Word read FStoredHeaderCRC16;
+ property ExtraField: string read FExtraField;
property OriginalFileName: string read FOriginalFileName;
- property OriginalSize: Cardinal read FOriginalSize;
- property OriginalDateTime: TDateTime read FOriginalDateTime;
property Comment: string read FComment;
- property CRC16: Word read FCRC16;
- property CRC32: Cardinal read FCRC32;
+ property Flags: TJclGZIPFlags read GetFlags;
+ property CompressionLevel: Byte read FHeader.ExtraFlags;
+ property FatSystem: TJclGZIPFatSystem read GetFatSystem;
+ property UnixTime: Cardinal read FHeader.ModifiedTime;
+ property DosTime: TDateTime read GetDosTime;
+ property ComputedDataCRC32: Cardinal read GetComputedDataCRC32;
+ property StoredDataCRC32: Cardinal read GetStoredDataCRC32;
+ property AutoCheckDataCRC32: Boolean read FAutoCheckDataCRC32 write FAutoCheckDataCRC32;
+ property CompressedDataSize: Int64 read GetCompressedDataSize;
+ property OriginalDataSize: Cardinal read GetOriginalDataSize;
end;
// RAR Support
@@ -627,41 +746,73 @@
CompressionLevel: TJclCompressionLevel);
begin
inherited Create(Destination);
-
+
+ FAutoSetTime := True;
+ FFatSystem := gfsUnknown;
FCompressionLevel := CompressionLevel;
- FCRC32 := crc32(0, nil, 0);
+ FDataCRC32 := crc32(0, nil, 0);
end;
destructor TJclGZIPCompressionStream.Destroy;
begin
- FZlStream.Free;
+ FZLibStream.Free;
inherited Destroy;
end;
function TJclGZIPCompressionStream.Flush: Integer;
+var
+ AFooter: TJclGZIPFooter;
begin
- if Assigned(FZlStream) then
- Result := FZlStream.Flush
+ if Assigned(FZLibStream) then
+ Result := FZLibStream.Flush
else
Result := 0;
- // Write trailer, CRC32 followed by ISIZE
- FStream.Write(FCRC32, SizeOf(FCRC32));
- FStream.Write(FOriginalSize, SizeOf(FOriginalSize));
+ // Write footer, CRC32 followed by ISIZE
+ AFooter.DataCRC32 := FDataCRC32;
+ AFooter.DataSize := FOriginalSize;
- Inc(Result, SizeOf(FCRC32) + SizeOf(FOriginalSize));
+ Inc(Result, FStream.Write(AFooter, SizeOf(AFooter)));
end;
+function TJclGZIPCompressionStream.GetDosTime: TDateTime;
+begin
+ if AutoSetTime then
+ Result := Now
+ else
+ Result := UnixTimeToDateTime(FUnixTime);
+end;
+
+function TJclGZIPCompressionStream.GetUnixTime: Cardinal;
+begin
+ if AutoSetTime then
+ Result := DateTimeToUnixTime(Now)
+ else
+ Result := FUnixTime;
+end;
+
procedure TJclGZIPCompressionStream.Reset;
begin
- if Assigned(FZlStream) then
- FZlStream.Reset;
+ if Assigned(FZLibStream) then
+ FZLibStream.Reset;
- FCRC32 := crc32(0, nil, 0);
+ FDataCRC32 := crc32(0, nil, 0);
FOriginalSize := 0;
end;
+procedure TJclGZIPCompressionStream.SetDosTime(const Value: TDateTime);
+begin
+ AutoSetTime := False;
+ FUnixTime := DateTimeToUnixTime(Value);
+end;
+
+procedure TJclGZIPCompressionStream.SetUnixTime(Value: Cardinal);
+begin
+ AutoSetTime := False;
+ FUnixTime := Value;
+end;
+
function TJclGZIPCompressionStream.Write(const Buffer; Count: Integer): Longint;
begin
if not FHeaderWritten then
@@ -670,215 +821,356 @@
FHeaderWritten := True;
end;
- if not Assigned(FZlStream) then
+ if not Assigned(FZLibStream) then
begin
- FZlStream := TJclZlibCompressStream.Create(FStream, FCompressionLevel);
- FZlStream.WindowBits := -DEF_WBITS; // negative value for raw mode
- FZlStream.OnProgress := ZlStreamProgress;
+ FZLibStream := TJclZlibCompressStream.Create(FStream, FCompressionLevel);
+ FZLibStream.WindowBits := -DEF_WBITS; // negative value for raw mode
+ FZLibStream.OnProgress := ZLibStreamProgress;
end;
- Result := FZlStream.Write(Buffer, Count);
- FCRC32 := crc32(FCRC32, PBytef(@Buffer), Result);
+ Result := FZLibStream.Write(Buffer, Count);
+ FDataCRC32 := crc32(FDataCRC32, PBytef(@Buffer), Result);
Inc(FOriginalSize, Result);
end;
procedure TJclGZIPCompressionStream.WriteHeader;
var
- Dummy: Byte;
- UnixTimeStamp: Cardinal;
- Flags: Byte;
+ HeaderCRC: Cardinal;
+ procedure StreamWriteBuffer(const Buffer; Count: Longint);
+ begin
+ FStream.WriteBuffer(Buffer, Count);
+ if gfHeaderCRC16 in Flags then
+ HeaderCRC := crc32(HeaderCRC, @Byte(Buffer), Count);
+ end;
+ function CheckCString(const Buffer: string): Boolean;
+ var
+ Index: Integer;
+ begin
+ Result := False;
+ for Index := 0 to Length(Buffer) do
+ if Buffer[Index] = #0 then
+ Exit;
+ Result := True;
+ end;
+const
+ FatSystemToByte: array [TJclGZIPFatSystem] of Byte =
+ ( JCL_GZIP_OS_FAT, JCL_GZIP_OS_AMIGA, JCL_GZIP_OS_VMS, JCL_GZIP_OS_UNIX,
+ JCL_GZIP_OS_VM, JCL_GZIP_OS_ATARI, JCL_GZIP_OS_HPFS, JCL_GZIP_OS_MAC,
+ JCL_GZIP_OS_Z, JCL_GZIP_OS_CPM, JCL_GZIP_OS_TOPS, JCL_GZIP_OS_NTFS,
+ JCL_GZIP_OS_QDOS, JCL_GZIP_OS_ACORN, JCL_GZIP_OS_UNKNOWN, JCL_GZIP_OS_UNKNOWN );
+var
+ AHeader: TJclGZIPHeader;
+ ExtraFieldLength: Word;
begin
- // ID1
- Dummy := $1F;
- FStream.Write(Dummy, 1);
- // ID2
- Dummy := $8B;
- FStream.Write(Dummy, 1);
+ if gfHeaderCRC16 in Flags then
+ HeaderCRC := crc32(0, nil, 0);
- // Compression Method, always deflate
- Dummy := 8;
- FStream.Write(Dummy, 1);
+ AHeader.ID1 := JCL_GZIP_ID1;
+ AHeader.ID2 := JCL_GZIP_ID2;
+ AHeader.CompressionMethod := JCL_GZIP_CM_DEFLATE;
+ AHeader.Flags := 0;
+ if gfDataIsText in Flags then
+ AHeader.Flags := AHeader.Flags or JCL_GZIP_FLAG_TEXT;
+ if gfHeaderCRC16 in Flags then
+ AHeader.Flags := AHeader.Flags or JCL_GZIP_FLAG_CRC;
+ if (gfExtraField in Flags) and (ExtraField <> '') then
+ AHeader.Flags := AHeader.Flags or JCL_GZIP_FLAG_EXTRA;
+ if (gfOriginalFileName in Flags) and (OriginalFileName <> '') then
+ AHeader.Flags := AHeader.Flags or JCL_GZIP_FLAG_NAME;
+ if (gfComment in Flags) and (Comment <> '') then
+ AHeader.Flags := AHeader.Flags or JCL_GZIP_FLAG_COMMENT;
- // Flags
- Flags := $00;
- if Length(FOriginalFileName) > 0 then
- Flags := Flags or $08;
- if Length(FComment) > 0 then
- Flags := Flags or $10;
- FStream.Write(Flags, 1);
+ if AutoSetTime then
+ AHeader.ModifiedTime := DateTimeToUnixTime(Now)
+ else
+ AHeader.ModifiedTime := FUnixTime;
- // MTIME
- UnixTimeStamp := DateTimeToUnixTime(OriginalDateTime);
- FStream.Write(UnixTimeStamp, SizeOf(UnixTimeStamp));
+ case FCompressionLevel of
+ Z_BEST_COMPRESSION :
+ AHeader.ExtraFlags := JCL_GZIP_EFLAG_MAX;
+ Z_BEST_SPEED :
+ AHeader.ExtraFlags := JCL_GZIP_EFLAG_FAST;
+ else
+ AHeader.ExtraFlags := 0;
+ end;
- // No extras
- Dummy := $0;
- FStream.Write(Dummy, 1);
+ AHeader.OS := FatSystemToByte[FatSystem];
- // Unknown OS
- Dummy := $FF;
- FStream.Write(Dummy, 1);
+ StreamWriteBuffer(AHeader, SizeOf(AHeader));
- // FileName, if any
- if Length(FOriginalFileName) > 0 then
+ if (gfExtraField in Flags) and (ExtraField <> '') then
begin
- FStream.Write(FOriginalFileName[1], Length(FOriginalFileName));
- Dummy := $0;
- FStream.Write(Dummy, 1);
+ if Length(ExtraField) > High(Word) then
+ raise EJclCompressionError.CreateRes(@RsCompilationGZIPExtraFieldTooLong);
+ ExtraFieldLength := Length(ExtraField);
+ StreamWriteBuffer(ExtraFieldLength, SizeOf(ExtraFieldLength));
+ StreamWriteBuffer(ExtraField[1], Length(ExtraField));
end;
- // Comment, if any
- if Length(FComment) > 0 then
+ if (gfOriginalFileName in Flags) and (OriginalFileName <> '') then
begin
- FStream.Write(FComment[1], Length(FComment));
- Dummy := $0;
- FStream.Write(Dummy, 1);
+ if not CheckCString(OriginalFileName) then
+ raise EJclCompressionError.CreateRes(@RsCompilationGZIPBadString);
+ StreamWriteBuffer(OriginalFileName[1], Length(OriginalFileName) + 1);
end;
+
+ if (gfComment in Flags) and (Comment <> '') then
+ begin
+ if not CheckCString(Comment) then
+ raise EJclCompressionError.CreateRes(@RsCompilationGZIPBadString);
+ StreamWriteBuffer(Comment[1], Length(Comment) + 1);
+ end;
+
+ if (gfHeaderCRC16 in Flags) then
+ FStream.WriteBuffer(HeaderCRC, SizeOf(HeaderCRC));
end;
-procedure TJclGZIPCompressionStream.ZlStreamProgress(Sender: TObject);
+procedure TJclGZIPCompressionStream.ZLibStreamProgress(Sender: TObject);
begin
Progress(Self);
end;
//=== { TJclGZIPDecompressionStream } ========================================
-destructor TJclGZIPDecompressionStream.Destroy;
-begin
- FZlStream.Free;
- FMemStream.Free;
-
- inherited Destroy;
-end;
-
-function TJclGZIPDecompressionStream.Read(var Buffer; Count: Integer): Longint;
-begin
- if not FHeaderRead then
+constructor TJclGZIPDecompressionStream.Create(Source: TStream; CheckHeaderCRC: Boolean);
+var
+ HeaderCRC: Cardinal;
+ ComputeHeaderCRC: Boolean;
+ procedure ReadBuffer(var Buffer; SizeOfBuffer: Longint);
begin
- if not ReadHeader then
- begin
- Result := 0;
- Exit;
- end;
- FHeaderRead := True;
+ Source.ReadBuffer(Buffer, SizeOfBuffer);
+ if ComputeHeaderCRC then
+ HeaderCRC := crc32(HeaderCRC, @Byte(Buffer), SizeOfBuffer);
end;
- if not Assigned(FZlStream) then
+ function ReadCString: string;
+ var
+ Dummy: Char;
begin
- FMemStream := TMemoryStream.Create;
- FMemStream.CopyFrom(FStream, FCompressedDataSize);
- FMemStream.Position := 0;
- FZlStream := TJclZLibDecompressStream.Create(FMemStream, -DEF_WBITS); // negative value for raw mode
- FZlStream.OnProgress := ZlStreamProgress;
-
- // we are now positionned right in front of CRC32 and ISIZE and we can
- // thus read them
- FStream.Read(FCRC32, SizeOf(FCRC32));
- FStream.Read(FOriginalSize, SizeOf(FOriginalSize));
+ repeat
+ Source.ReadBuffer(Dummy, SizeOf(Dummy));
+ FOriginalFileName := FOriginalFileName + Dummy;
+ until Dummy = #0;
+ SetLength(FOriginalFileName, Length(FOriginalFileName) - 1);
end;
-
- Result := FZlStream.Read(Buffer, Count);
-end;
-
-function TJclGZIPDecompressionStream.ReadHeader: Boolean;
var
- ID1: Byte;
- ID2: Byte;
- CM: Byte;
- Flags: Byte;
- HasHeaderCRC16: Boolean;
- HasExtra: Boolean;
- HasName: Boolean;
- HasComment: Boolean;
- Dummy: Byte;
- OriginalTimeStamp: Cardinal;
- ExtraLength: Word;
- I: Integer;
+ ExtraFieldLength: Word;
begin
- Result := False;
+ inherited Create(Source);
- // ID
- FStream.Read(ID1, 1);
- FStream.Read(ID2, 1);
- if (ID1 <> $1F) or (ID2 <> $8B) then
+ FAutoCheckDataCRC32 := True;
+ FComputedDataCRC32 := crc32(0, nil, 0);
+ HeaderCRC := crc32(0, nil, 0);
+
+ ComputeHeaderCRC := CheckHeaderCRC;
+ ReadBuffer(FHeader, SizeOf(FHeader));
+ if (FHeader.ID1 <> JCL_GZIP_ID1) or (FHeader.ID2 <> JCL_GZIP_ID2) then
+ raise EJclCompressionError.CreateResFmt(@RsCompressionGZipInvalidID, [FHeader.ID1, FHeader.ID2]);
+ if (FHeader.CompressionMethod <> JCL_GZIP_CM_DEFLATE) then
+ raise EJclCompressionError.CreateResFmt(@RsCompressionGZipUnsupportedCM, [FHeader.CompressionMethod]);
+
+ if (FHeader.Flags and JCL_GZIP_FLAG_EXTRA) <> 0 then
begin
- // Invalid ID
- Exit;
+ ReadBuffer(ExtraFieldLength, SizeOf(ExtraFieldLength));
+ SetLength(FExtraField, ExtraFieldLength);
+ ReadBuffer(FExtraField[1], ExtraFieldLength);
end;
- // Compression method
- FStream.Read(CM, 1);
- if CM <> 8 then
+ if (FHeader.Flags and JCL_GZIP_FLAG_NAME) <> 0 then
+ FOriginalFileName := ReadCString;
+ if (FHeader.Flags and JCL_GZIP_FLAG_COMMENT) <> 0 then
+ FComment := ReadCString;
+
+ if CheckHeaderCRC then
begin
- // Invalid compression method, only deflate is known
- Exit;
+ ComputeHeaderCRC := False;
+ FComputedHeaderCRC16 := HeaderCRC and $FFFF;
end;
- // Flags
- FStream.Read(Flags, 1);
- if Flags and $E0 <> $00 then
+ if (FHeader.Flags and JCL_GZIP_FLAG_CRC) <> 0 then
begin
- // Extra flags, don't know what to do with them
- Exit;
+ Source.ReadBuffer(FStoredHeaderCRC16, SizeOf(FStoredHeaderCRC16));
+ if CheckHeaderCRC and (FComputedHeaderCRC16 <> FStoredHeaderCRC16) then
+ raise EJclCompressionError.CreateRes(@RsCompressionGZipHeaderCRC);
end;
+end;
- HasHeaderCRC16 := Flags and $02 = $02;
- HasExtra := Flags and $04 = $04;
- HasName := Flags and $08 = $08;
- HasComment := Flags and $10 = $10;
+destructor TJclGZIPDecompressionStream.Destroy;
+begin
+ FZLibStream.Free;
+ FCompressedDataStream.Free;
+ inherited Destroy;
+end;
- // Original modification time
- FStream.Read(OriginalTimeStamp, SizeOf(OriginalTimeStamp));
- FOriginalDateTime := UnixTimeToDateTime(OriginalTimeStamp);
+function TJclGZIPDecompressionStream.GetCompressedDataSize: Int64;
+begin
+ if not FDataStarted then
+ Result := FStream.Size - FStream.Position - SizeOf(FFooter)
+ else
+ if FDataEnded then
+ Result := FCompressedDataSize
+ else
+ raise EJclCompressionError.CreateRes(@RsCompressionGZipDecompressing);
+end;
- // Extra flags and OS are ignored
- FStream.Read(Dummy, 1);
- FStream.Read(Dummy, 1);
+function TJclGZIPDecompressionStream.GetComputedDataCRC32: Cardinal;
+begin
+ if FDataEnded then
+ Result := FComputedDataCRC32
+ else
+ raise EJclCompressionError.CreateRes(@RsCompressionGZipNotDecompressed);
+end;
- // If file has extra, ignore it
- if HasExtra then
- begin
- FStream.Read(ExtraLength, SizeOf(ExtraLength));
+function TJclGZIPDecompressionStream.GetDosTime: TDateTime;
+begin
+ Result := UnixTimeToDateTime(FHeader.ModifiedTime);
+end;
- for I := 0 to ExtraLength - 1 do
- FStream.Read(Dummy, 1);
+function TJclGZIPDecompressionStream.GetFatSystem: TJclGZIPFatSystem;
+const
+ ByteToFatSystem: array [JCL_GZIP_OS_FAT..JCL_GZIP_OS_ACORN] of TJclGZIPFatSystem =
+ ( gfsFat, gfsAmiga, gfsVMS, gfsUnix, gfsVM, gfsAtari, gfsHPFS, gfsMac, gfsZ,
+ gfsCPM, gfsTOPS, gfsNTFS, gfsQDOS, gfsAcorn );
+begin
+ case FHeader.OS of
+ JCL_GZIP_OS_FAT..JCL_GZIP_OS_ACORN :
+ Result := ByteToFatSystem[FHeader.OS];
+ JCL_GZIP_OS_UNKNOWN :
+ Result := gfsUnknown;
+ else
+ Result := gfsOther;
end;
+end;
- // Read name, if present
- FOriginalFileName := '';
- if HasName then
+function TJclGZIPDecompressionStream.GetFlags: TJclGZIPFlags;
+begin
+ Result := [];
+ if (FHeader.Flags and JCL_GZIP_FLAG_TEXT) <> 0 then
+ Result := Result + [gfDataIsText];
+ if (FHeader.Flags and JCL_GZIP_FLAG_CRC) <> 0 then
+ Result := Result + [gfHeaderCRC16];
+ if (FHeader.Flags and JCL_GZIP_FLAG_EXTRA) <> 0 then
+ Result := Result + [gfExtraField];
+ if (FHeader.Flags and JCL_GZIP_FLAG_NAME) <> 0 then
+ Result := Result + [gfOriginalFileName];
+ if (FHeader.Flags and JCL_GZIP_FLAG_COMMENT) <> 0 then
+ Result := Result + [gfComment];
+end;
+
+function TJclGZIPDecompressionStream.GetOriginalDataSize: Cardinal;
+var
+ StartPos: {$IFDEF COMPILER5}Longint;{$ELSE ~COMPILER5}Int64;{$ENDIF ~COMPILER5}
+ AFooter: TJclGZIPFooter;
+begin
+ if not FDataStarted then
begin
- FStream.Read(Dummy, 1);
- while Dummy <> 0 do
- begin
- FOriginalFileName := FOriginalFileName + Chr(Dummy);
- FStream.Read(Dummy, 1);
+ StartPos := FStream.Position;
+ try
+ FStream.Seek(-SizeOf(AFooter), soFromEnd);
+ FStream.ReadBuffer(AFooter, SizeOf(AFooter));
+ Result := AFooter.DataSize;
+ finally
+ FStream.Seek(StartPos, {$IFDEF COMPILER5}soFromBeginning{$ELSE ~COMPILER5}soBeginning{$ENDIF ~COMPILER5});
end;
- end;
+ end
+ else
+ if FDataEnded then
+ Result := FFooter.DataSize
+ else
+ raise EJclCompressionError.CreateRes(@RsCompressionGZipDecompressing);
+end;
- // Read comment, if present
- FComment := '';
- if HasComment then
+function TJclGZIPDecompressionStream.GetStoredDataCRC32: Cardinal;
+var
+ StartPos: {$IFDEF COMPILER5}Longint;{$ELSE ~COMPILER5}Int64;{$ENDIF ~COMPILER5}
+ AFooter: TJclGZIPFooter;
+begin
+ if not FDataStarted then
begin
- FStream.Read(Dummy, 1);
- while Dummy <> 0 do
- begin
- FComment := FComment + Chr(Dummy);
- FStream.Read(Dummy, 1);
+ StartPos := FStream.Position;
+ try
+ FStream.Seek(-SizeOf(AFooter), soFromEnd);
+ FStream.ReadBuffer(AFooter, SizeOf(AFooter));
+ Result := AFooter.DataCRC32;
+ finally
+ FStream.Seek(StartPos, {$IFDEF COMPILER5}soFromBeginning{$ELSE ~COMPILER5}soBeginning{$ENDIF ~COMPILER5});
end;
+ end
+ else
+ if FDataEnded then
+ Result := FFooter.DataCRC32
+ else
+ raise EJclCompressionError.CreateRes(@RsCompressionGZipDecompressing);
+end;
+
+function TJclGZIPDecompressionStream.Read(var Buffer; Count: Longint): Longint;
+begin
+ if not Assigned(FZLibStream) then
+ begin
+ FCompressedDataStream := TJclDelegatedStream.Create;
+ FCompressedDataStream.OnRead := ReadCompressedData;
+ FZLibStream := TJclZLibDecompressStream.Create(FCompressedDataStream, -DEF_WBITS);
+ FZLibStream.OnProgress := ZLibStreamProgress;
end;
+ Result := FZLibStream.Read(Buffer, Count);
+ Inc(FDataSize, Result);
+ FComputedDataCRC32 := crc32(FComputedDataCRC32, @Byte(Buffer), Result);
+ if Result < Count then
+ begin
+ if not FDataEnded then
+ // the decompressed stream is stopping before the compressed stream
+ raise EJclCompressionError(RsCompressionGZipInternalError);
+ if AutoCheckDataCRC32 and (FComputedDataCRC32 <> FFooter.DataCRC32) then
+ raise EJclCompressionError(RsCompressionGZipDataCRCFailed);
+ end;
+end;
- // Read CRC16, if present
- FCRC16 := 0;
- if HasHeaderCRC16 then
- FStream.Read(FCRC16, SizeOf(FCRC16));
+function TJclGZIPDecompressionStream.ReadCompressedData(Sender: TObject; var Buffer;
+ Count: Longint): Longint;
+var
+ BufferAddr: PChar;
+ FooterAddr: PChar;
+begin
+ if (Count = 0) or FDataEnded then
+ begin
+ Result := 0;
+ Exit;
+ end
+ else
+ if not FDataStarted then
+ begin
+ FDataStarted := True;
+ // prolog
+ if FStream.Read(FFooter, SizeOf(FFooter)) < SizeOf(FFooter) then
+ raise EJclCompressionError.CreateRes(@RsCompressionGZipDataTruncated);
+ end;
- FCompressedDataSize := FStream.Size - FStream.Position - 2 * SizeOf(Cardinal);
+ BufferAddr := @Char(Buffer);
+ Move(FFooter, Buffer, SizeOf(FFooter));
+ Result := FStream.Read(BufferAddr[SizeOf(FFooter)], Count - SizeOf(FFooter))
+ + FStream.Read(FFooter, SizeOf(FFooter));
- Result := True;
+ if Result < Count then
+ begin
+ FDataEnded := True;
+ // epilog
+ FooterAddr := @FFooter;
+ if (Count - Result) < SizeOf(FFooter) then
+ begin
+ // the "real" footer is splitted in the data and the footer
+ // shift the valid bytes of the footer to their place
+ Move(FFooter, FooterAddr[Count - Result], SizeOf(FFooter) - Count + Result);
+ // the missing bytes of the footer are located after the data
+ Move(BufferAddr[Result], FFooter, Count - Result);
+ end
+ else
+ // the "real" footer is located in the data
+ Move(BufferAddr[Result], FFooter, SizeOf(FFooter));
+ end;
+ Inc(FCompressedDataSize, Result);
end;
-procedure TJclGZIPDecompressionStream.ZlStreamProgress(Sender: TObject);
+procedure TJclGZIPDecompressionStream.ZLibStreamProgress(Sender: TObject);
begin
Progress(Self);
end;
Modified: trunk/jcl/source/common/JclResources.pas
===================================================================
--- trunk/jcl/source/common/JclResources.pas 2006-11-04 21:04:16 UTC (rev 1814)
+++ trunk/jcl/source/common/JclResources.pas 2006-11-04 21:10:27 UTC (rev 1815)
@@ -777,6 +777,16 @@
RsCompressionZLibZBufError = 'zlib returned: buffer error';
RsCompressionZLibZVersionError = 'zlib returned: Version error';
RsCompressionZLibError = 'ZLib error';
+ RsCompressionGZIPInvalidID = 'GZip: Invalid ID (ID1=%.2x; ID2=%.2x)';
+ RsCompressionGZIPUnsupportedCM = 'GZip: unsupported compression method (%d)';
+ RsCompressionGZIPHeaderCRC = 'GZip: CRC failed, header is damaged';
+ RsCompressionGZIPDecompressing = 'GZip: this property is not readable when the data are being decompressed';
+ RsCompressionGZIPNotDecompressed = 'GZip: this property is not readable until the data are fully decompressed';
+ RsCompressionGZIPDataTruncated = 'GZip: data are truncated';
+ RsCompressionGZIPInternalError = 'GZip: internal error';
+ RsCompressionGZIPDataCRCFailed = 'GZip: CRC failed, data are damaged';
+ RsCompilationGZIPExtraFieldTooLong = 'GZip: extra field is too long';
+ RsCompilationGZIPBadString = 'GZip: the string contains null chars';
//=== JclConsole =============================================================
resourcestring
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-04 21:04:29
|
Revision: 1814
http://svn.sourceforge.net/jcl/?rev=1814&view=rev
Author: outchy
Date: 2006-11-04 13:04:16 -0800 (Sat, 04 Nov 2006)
Log Message:
-----------
New streams:
- TJclScopedStream: create a scope on an existing Stream
- TJclDelegatedStream: all basic operations (seek, size, read and write) are exposed by events
Modified Paths:
--------------
trunk/jcl/source/common/JclStreams.pas
Modified: trunk/jcl/source/common/JclStreams.pas
===================================================================
--- trunk/jcl/source/common/JclStreams.pas 2006-11-03 17:55:09 UTC (rev 1813)
+++ trunk/jcl/source/common/JclStreams.pas 2006-11-04 21:04:16 UTC (rev 1814)
@@ -267,6 +267,55 @@
procedure WriteSizedString(const Value: string);
end;
+ TJclScopedStream = class(TJclStream)
+ private
+ FParentStream: TStream;
+ FStartPos: Int64;
+ FCurrentPos: Int64;
+ FMaxSize: Int64;
+ public
+ // scopedstream starting at the current position of the ParentStream
+ // if MaxSize is positive or null, read and write operations cannot overrun this size or the ParentStream limitation
+ // if MaxSize is negative, read and write operations are unlimited (up to the ParentStream limitation)
+ constructor Create(AParentStream: TStream; AMaxSize: Int64 = -1); reintroduce;
+ function Read(var Buffer; Count: Longint): Longint; override;
+ function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
+ function Write(const Buffer; Count: Longint): Longint; override;
+
+ property ParentStream: TStream read FParentStream;
+ property StartPos: Int64 read FStartPos;
+ property MaxSize: Int64 read FMaxSize write FMaxSize;
+ end;
+
+ TJclStreamSeekEvent = function(Sender: TObject; const Offset: Int64;
+ Origin: TSeekOrigin): Int64 of object;
+ TJclStreamReadEvent = function(Sender: TObject; var Buffer; Count: Longint): Longint of object;
+ TJclStreamWriteEvent = function(Sender: TObject; const Buffer; Count: Longint): Longint of object;
+ TJclStreamSizeEvent = procedure(Sender: TObject; const NewSize: Int64) of object;
+
+ TJclDelegatedStream = class(TJclStream)
+ private
+ FOnSeek: TJclStreamSeekEvent;
+ FOnRead: TJclStreamReadEvent;
+ FOnWrite: TJclStreamWriteEvent;
+ FOnSize: TJclStreamSizeEvent;
+ protected
+ procedure SetSize(const NewSize: Int64); override;
+ public
+ function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
+ function Read(var Buffer; Count: Longint): Longint; override;
+ function Write(const Buffer; Count: Longint): Longint; override;
+ property OnSeek: TJclStreamSeekEvent read FOnSeek write FOnSeek;
+ property OnRead: TJclStreamReadEvent read FOnRead write FOnRead;
+ property OnWrite: TJclStreamWriteEvent read FOnWrite write FOnWrite;
+ property OnSize: TJclStreamSizeEvent read FOnSize write FOnSize;
+ end;
+
+// call TStream.Seek(Int64,TSeekOrigin) if present (TJclStream or COMPILER6_UP)
+// otherwize call TStream.Seek(LongInt,Word) with range checking
+function StreamSeek(Stream: TStream; const Offset: Int64;
+ const Origin: TSeekOrigin): Int64;
+
{$IFDEF UNITVERSIONING}
const
UnitVersioning: TUnitVersionInfo = (
@@ -282,6 +331,27 @@
uses
JclBase, JclResources;
+function StreamSeek(Stream: TStream; const Offset: Int64;
+ const Origin: TSeekOrigin): Int64; {$IFDEF SUPPORTS_INLINE}inline;{$ENDIF SUPPORTS_INLINE}
+begin
+ if Assigned(Stream) then
+ begin
+ {$IFDEF COMPILER5}
+ if Stream is TJclStream then
+ Result := TJclStream(Stream).Seek(Offset, Origin)
+ else
+ if (Offset <= MaxLongint) or (Offset > -MaxLongint) then
+ Result := Stream.Seek(Longint(Offset), Ord(Origin))
+ else
+ Result := -1;
+ {$ELSE}
+ Result := Stream.Seek(Offset, Origin);
+ {$ENDIF COMPILER5}
+ end
+ else
+ Result := -1;
+end;
+
//=== { TJclStream } =========================================================
function TJclStream.Seek(Offset: Longint; Origin: Word): Longint;
@@ -739,22 +809,7 @@
function TJclStreamDecorator.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
begin
- if Assigned(FStream) then
- begin
- {$IFDEF COMPILER5}
- if Stream is TJclStream then
- Result := TJclStream(Stream).Seek(Offset, Origin)
- else
- if (Offset <= MaxLongint) or (Offset > -MaxLongint) then
- Result := Stream.Seek(Longint(Offset), Ord(Origin))
- else
- Result := -1;
- {$ELSE}
- Result := Stream.Seek(Offset, Origin);
- {$ENDIF COMPILER5}
- end
- else
- Result := -1;
+ Result := StreamSeek(Stream, Offset, Origin);
end;
function TJclStreamDecorator.Seek(Offset: Longint; Origin: Word): Longint;
@@ -1202,6 +1257,124 @@
WriteBuffer(Pointer(Value)^, StrSize);
end;
+//=== { TJclScopedStream } ===================================================
+
+constructor TJclScopedStream.Create(AParentStream: TStream; AMaxSize: Int64);
+begin
+ inherited Create;
+
+ FParentStream := AParentStream;
+ FStartPos := ParentStream.Position;
+ FCurrentPos := 0;
+ FMaxSize := AMaxSize;
+end;
+
+function TJclScopedStream.Read(var Buffer; Count: Longint): Longint;
+begin
+ if (MaxSize >= 0) and ((FCurrentPos + Count) > MaxSize) then
+ Count := MaxSize - FCurrentPos;
+
+ if (Count > 0) and Assigned(ParentStream) then
+ begin
+ Result := ParentStream.Read(Buffer, Count);
+ Inc(FCurrentPos, Result);
+ end
+ else
+ Result := 0;
+end;
+
+function TJclScopedStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
+begin
+ case Origin of
+ soBeginning:
+ begin
+ if (Offset < 0) or ((MaxSize >= 0) and (Offset > MaxSize)) then
+ Result := -1 // low and high bound check
+ else
+ Result := StreamSeek(ParentStream, StartPos + Offset, soBeginning) - StartPos;
+ end;
+ soCurrent:
+ begin
+ if Offset = 0 then
+ Result := FCurrentPos // speeding the Position property up
+ else if ((FCurrentPos + Offset) < 0) or ((MaxSize >= 0)
+ and ((FCurrentPos + Offset) > MaxSize)) then
+ Result := -1 // low and high bound check
+ else
+ Result := StreamSeek(ParentStream, Offset, soCurrent) - StartPos;
+ end;
+ soEnd:
+ begin
+ if (MaxSize >= 0) then
+ begin
+ if (Offset > 0) or (MaxSize < -Offset) then // low and high bound check
+ Result := -1
+ else
+ Result := StreamSeek(ParentStream, StartPos + MaxSize + Offset, soBeginning) - StartPos;
+ end
+ else
+ begin
+ Result := StreamSeek(ParentStream, Offset, soEnd);
+ if (Result <> -1) and (Result < StartPos) then // low bound check
+ begin
+ Result := -1;
+ StreamSeek(ParentStream, StartPos + FCurrentPos, soBeginning);
+ end;
+ end;
+ end;
+ else
+ Result := -1;
+ end;
+ if Result <> -1 then
+ FCurrentPos := Result;
+end;
+
+function TJclScopedStream.Write(const Buffer; Count: Longint): Longint;
+begin
+ if (MaxSize >= 0) and ((FCurrentPos + Count) > MaxSize) then
+ Count := MaxSize - FCurrentPos;
+
+ if (Count > 0) and Assigned(ParentStream) then
+ begin
+ Result := ParentStream.Write(Buffer, Count);
+ Inc(FCurrentPos, Result);
+ end
+ else
+ Result := 0;
+end;
+
+//=== { TJclDelegateStream } =================================================
+
+procedure TJclDelegatedStream.SetSize(const NewSize: Int64);
+begin
+ if Assigned(FOnSize) then
+ FOnSize(Self, NewSize);
+end;
+
+function TJclDelegatedStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
+begin
+ if Assigned(FOnSeek) then
+ Result := FOnSeek(Self, Offset, Origin)
+ else
+ Result := -1;
+end;
+
+function TJclDelegatedStream.Read(var Buffer; Count: Longint): Longint;
+begin
+ if Assigned(FOnRead) then
+ Result := FOnRead(Self, Buffer, Count)
+ else
+ Result := -1;
+end;
+
+function TJclDelegatedStream.Write(const Buffer; Count: Longint): Longint;
+begin
+ if Assigned(FOnWrite) then
+ Result := FOnWrite(Self, Buffer, Count)
+ else
+ Result := -1;
+end;
+
{$IFDEF UNITVERSIONING}
initialization
RegisterUnitVersion(HInstance, UnitVersioning);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-03 17:57:19
|
Revision: 1813
http://svn.sourceforge.net/jcl/?rev=1813&view=rev
Author: outchy
Date: 2006-11-03 09:55:09 -0800 (Fri, 03 Nov 2006)
Log Message:
-----------
Regenerated identifier files from XML output of doc-o-matic.
IdentifierList.dpr is a simple project which converts DOM xml output to raw lists of identifiers removing duplicates and mangles on names.
Modified Paths:
--------------
trunk/jcl/experts/useswizard/Jcl8087.txt
trunk/jcl/experts/useswizard/JclAppInst.txt
trunk/jcl/experts/useswizard/JclBase.txt
trunk/jcl/experts/useswizard/JclCIL.txt
trunk/jcl/experts/useswizard/JclCLR.txt
trunk/jcl/experts/useswizard/JclCOM.txt
trunk/jcl/experts/useswizard/JclComplex.txt
trunk/jcl/experts/useswizard/JclCompression.txt
trunk/jcl/experts/useswizard/JclConsole.txt
trunk/jcl/experts/useswizard/JclCounter.txt
trunk/jcl/experts/useswizard/JclDateTime.txt
trunk/jcl/experts/useswizard/JclDebug.txt
trunk/jcl/experts/useswizard/JclExprEval.txt
trunk/jcl/experts/useswizard/JclFileUtils.txt
trunk/jcl/experts/useswizard/JclGraphUtils.txt
trunk/jcl/experts/useswizard/JclGraphics.txt
trunk/jcl/experts/useswizard/JclHookExcept.txt
trunk/jcl/experts/useswizard/JclIniFiles.txt
trunk/jcl/experts/useswizard/JclLANMan.txt
trunk/jcl/experts/useswizard/JclLocales.txt
trunk/jcl/experts/useswizard/JclLogic.txt
trunk/jcl/experts/useswizard/JclMIDI.txt
trunk/jcl/experts/useswizard/JclMapi.txt
trunk/jcl/experts/useswizard/JclMath.txt
trunk/jcl/experts/useswizard/JclMetadata.txt
trunk/jcl/experts/useswizard/JclMime.txt
trunk/jcl/experts/useswizard/JclMiscel.txt
trunk/jcl/experts/useswizard/JclMultimedia.txt
trunk/jcl/experts/useswizard/JclNTFS.txt
trunk/jcl/experts/useswizard/JclPeImage.txt
trunk/jcl/experts/useswizard/JclPrint.txt
trunk/jcl/experts/useswizard/JclRTTI.txt
trunk/jcl/experts/useswizard/JclRegistry.txt
trunk/jcl/experts/useswizard/JclResources.txt
trunk/jcl/experts/useswizard/JclSchedule.txt
trunk/jcl/experts/useswizard/JclSecurity.txt
trunk/jcl/experts/useswizard/JclShell.txt
trunk/jcl/experts/useswizard/JclStatistics.txt
trunk/jcl/experts/useswizard/JclStrHashMap.txt
trunk/jcl/experts/useswizard/JclStrings.txt
trunk/jcl/experts/useswizard/JclSvcCtrl.txt
trunk/jcl/experts/useswizard/JclSynch.txt
trunk/jcl/experts/useswizard/JclSysInfo.txt
trunk/jcl/experts/useswizard/JclSysUtils.txt
trunk/jcl/experts/useswizard/JclTD32.txt
trunk/jcl/experts/useswizard/JclUnicode.txt
trunk/jcl/experts/useswizard/JclUnitConv.txt
trunk/jcl/experts/useswizard/JclUnitVersioning.txt
trunk/jcl/experts/useswizard/JclWideStrings.txt
trunk/jcl/experts/useswizard/JclWin32.txt
trunk/jcl/experts/useswizard/JclWinMIDI.txt
trunk/jcl/experts/useswizard/JediUsesWizard.ini
Added Paths:
-----------
trunk/jcl/experts/useswizard/Hardlinks.txt
trunk/jcl/experts/useswizard/IdentifierList.dpr
trunk/jcl/experts/useswizard/JclAbstractContainers.txt
trunk/jcl/experts/useswizard/JclAlgorithms.txt
trunk/jcl/experts/useswizard/JclAnsiStrings.txt
trunk/jcl/experts/useswizard/JclArrayLists.txt
trunk/jcl/experts/useswizard/JclArraySets.txt
trunk/jcl/experts/useswizard/JclBinaryTrees.txt
trunk/jcl/experts/useswizard/JclBorlandTools.txt
trunk/jcl/experts/useswizard/JclContainerIntf.txt
trunk/jcl/experts/useswizard/JclDotNet.txt
trunk/jcl/experts/useswizard/JclEDI.txt
trunk/jcl/experts/useswizard/JclEDISEF.txt
trunk/jcl/experts/useswizard/JclEDITranslators.txt
trunk/jcl/experts/useswizard/JclEDIXML.txt
trunk/jcl/experts/useswizard/JclEDI_ANSIX12.txt
trunk/jcl/experts/useswizard/JclEDI_ANSIX12_Ext.txt
trunk/jcl/experts/useswizard/JclEDI_UNEDIFACT.txt
trunk/jcl/experts/useswizard/JclEDI_UNEDIFACT_Ext.txt
trunk/jcl/experts/useswizard/JclHashMaps.txt
trunk/jcl/experts/useswizard/JclHashSets.txt
trunk/jcl/experts/useswizard/JclLinkedLists.txt
trunk/jcl/experts/useswizard/JclMsdosSys.txt
trunk/jcl/experts/useswizard/JclPCRE.txt
trunk/jcl/experts/useswizard/JclQGraphUtils.txt
trunk/jcl/experts/useswizard/JclQGraphics.txt
trunk/jcl/experts/useswizard/JclQueues.txt
trunk/jcl/experts/useswizard/JclStacks.txt
trunk/jcl/experts/useswizard/JclStreams.txt
trunk/jcl/experts/useswizard/JclStructStorage.txt
trunk/jcl/experts/useswizard/JclTask.txt
trunk/jcl/experts/useswizard/JclUnitVersioningProviders.txt
trunk/jcl/experts/useswizard/JclValidation.txt
trunk/jcl/experts/useswizard/JclVectors.txt
trunk/jcl/experts/useswizard/JclWideFormat.txt
trunk/jcl/experts/useswizard/JclWin32Ex.txt
trunk/jcl/experts/useswizard/pcre.txt
Property Changed:
----------------
trunk/jcl/experts/useswizard/JediUsesWizard.ini
Added: trunk/jcl/experts/useswizard/Hardlinks.txt
===================================================================
--- trunk/jcl/experts/useswizard/Hardlinks.txt (rev 0)
+++ trunk/jcl/experts/useswizard/Hardlinks.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,6 @@
+TFNCreateHardLinkA
+TFNCreateHardLinkW
+bRtdlFunctionsLoaded
+CreateHardLinkA
+CreateHardLinkW
+hNtDll
Property changes on: trunk/jcl/experts/useswizard/Hardlinks.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/IdentifierList.dpr
===================================================================
--- trunk/jcl/experts/useswizard/IdentifierList.dpr (rev 0)
+++ trunk/jcl/experts/useswizard/IdentifierList.dpr 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,153 @@
+{**************************************************************************************************}
+{ }
+{ Project JEDI Code Library (JCL) }
+{ }
+{ The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); }
+{ you may not use this file except in compliance with the License. You may obtain a copy of the }
+{ License at http://www.mozilla.org/MPL/ }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF }
+{ ANY KIND, either express or implied. See the License for the specific language governing rights }
+{ and limitations under the License. }
+{ }
+{ The Original Code is IdentifierList.dpr. }
+{ }
+{ The Initial Developer of the Original Code is Florent Ouchet <outchy att users dott sf dott net> }
+{ Portions created by Florent Ouchet are Copyright (C) of Florent Ouchet. }
+{ }
+{ Contributors: }
+{ }
+{**************************************************************************************************}
+{ }
+{ Last modified: $Date$ }
+{ }
+{**************************************************************************************************}
+
+// note: this program converts the xml output of Doc-o-matic <http://www.doc-o-matic.com/>
+// running on the JCL help files http://jcl.svn.sourceforge.net/viewvc/jcl/trunk/help/
+// to text files for the JCL uses expert
+
+// this program requires TJvSimpleXml from the JVCL <http://jvcl.sf.net/>
+
+program IdentifierList;
+
+{$APPTYPE CONSOLE}
+
+uses
+ SysUtils,
+ Classes,
+ JvSimpleXml;
+
+var
+ UnitList: TStringList;
+
+procedure InitIdentifierList;
+begin
+ UnitList := TStringList.Create;
+ UnitList.CaseSensitive := False;
+end;
+
+procedure FinalizeIdentifierList;
+var
+ Index: Integer;
+ IdentifierList: TStringList;
+begin
+ for Index := 0 to UnitList.Count - 1 do
+ begin
+ IdentifierList := TStringList(UnitList.Objects[Index]);
+ IdentifierList.SaveToFile(Format('%s.txt', [UnitList.Strings[Index]]));
+ IdentifierList.Free;
+ end;
+ UnitList.Free;
+end;
+
+procedure AddIdentifier(const IdentifierName, UnitName: string);
+var
+ IdentifierList: TStringList;
+ UnitIndex: Integer;
+ Identifier: string;
+begin
+ if Pos('.', IdentifierName) > 0 then
+ Exit;
+ if Pos('@', IdentifierName) > 0 then
+ Identifier := Copy(IdentifierName, 1, Pos('@', IdentifierName) - 1)
+ else
+ Identifier := IdentifierName;
+
+ UnitIndex := UnitList.IndexOf(UnitName);
+ if UnitIndex = -1 then
+ begin
+ IdentifierList := TStringList.Create;
+ IdentifierList.CaseSensitive := False;
+ UnitList.AddObject(UnitName, IdentifierList);
+ end
+ else
+ IdentifierList := TStringList(UnitList.Objects[UnitIndex]);
+
+ IdentifierList.Add(Identifier);
+end;
+
+procedure ProcessXML(const FileName: string);
+var
+ SimpleXML: TJvSimpleXML;
+ procedure ProcessNode(const Node: TJvSimpleXMLElem);
+ var
+ IndexSection, IndexChild: Integer;
+ SectionNode, ChildNode, LinkNode: TJvSimpleXMLElem;
+ NameProp, IdProp: TJvSimpleXMLProp;
+ begin
+ if SameText(Node.Name, 'topic') then
+ begin
+ for IndexSection := 0 to Node.Items.Count - 1 do
+ begin
+ SectionNode := Node.Items.Item[IndexSection];
+ NameProp := SectionNode.Properties.ItemNamed['name'];
+ LinkNode := SectionNode.Items.ItemNamed['link'];
+ if Assigned(NameProp) and SameText(SectionNode.Name, 'section')
+ and SameText(NameProp.Value, 'Unit') then
+ begin
+ IdProp := Node.Properties.ItemNamed['id'];
+ if Assigned(IdProp) then
+ begin
+ if Assigned(LinkNode) then
+ AddIdentifier(IdProp.Value, LinkNode.Value)
+ else
+ AddIdentifier(IdProp.Value, SectionNode.Value);
+ end;
+ end;
+ end;
+
+ end;
+ for IndexChild := 0 to Node.Items.Count - 1 do
+ begin
+ ChildNode := Node.Items.Item[IndexChild];
+ ProcessNode(ChildNode);
+ end;
+ end;
+begin
+ SimpleXML := TJvSimpleXML.Create(nil);
+ try
+ Write('Loading XML...');
+ SimpleXML.LoadFromFile(FileName);
+ WriteLn('done.');
+ SimpleXML.Options := SimpleXML.Options - [sxoAutoCreate];
+ Write('Processing XML...');
+ ProcessNode(SimpleXML.Root);
+ WriteLn('done.');
+ finally
+ SimpleXML.Free;
+ end;
+end;
+
+begin
+ Write('initializing lists...');
+ InitIdentifierList;
+ WriteLn('done.');
+ try
+ ProcessXML(place here the name of the xml generated by Doc-o-matic);
+ finally
+ Write('Saving lists...');
+ FinalizeIdentifierList;
+ WriteLn('done.');
+ end;
+end.
Property changes on: trunk/jcl/experts/useswizard/IdentifierList.dpr
___________________________________________________________________
Name: svn:keywords
+ URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id
Name: svn:eol-style
+ native
Modified: trunk/jcl/experts/useswizard/Jcl8087.txt
===================================================================
--- trunk/jcl/experts/useswizard/Jcl8087.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/Jcl8087.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,10 +1,7 @@
-ClearPending8087Exceptions
Get8087ControlWord
Get8087Infinity
Get8087Precision
Get8087Rounding
-Get8087StatusWord
-GetMasked8087Exceptions
GetPending8087Exceptions
Mask8087Exceptions
Set8087ControlWord
@@ -12,9 +9,12 @@
Set8087Precision
Set8087Rounding
SetMasked8087Exceptions
+Unmask8087Exceptions
T8087Exception
-T8087Exceptions
-T8087Infinity
+All8087Exceptions
+ClearPending8087Exceptions
+GetMasked8087Exceptions
T8087Precision
T8087Rounding
-Unmask8087Exceptions
+T8087Infinity
+Get8087StatusWord
Added: trunk/jcl/experts/useswizard/JclAbstractContainers.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclAbstractContainers.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclAbstractContainers.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,2 @@
+TJclStrCollection
+TJclAbstractContainer
Property changes on: trunk/jcl/experts/useswizard/JclAbstractContainers.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclAlgorithms.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclAlgorithms.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclAlgorithms.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,43 @@
+Apply
+Apply
+Apply
+Copy
+Copy
+Copy
+CountObject
+CountObject
+CountObject
+Fill
+Fill
+Fill
+Find
+Find
+Find
+Generate
+Generate
+Generate
+IntegerCompare
+IntfSimpleCompare
+QuickSort
+QuickSort
+QuickSort
+Reverse
+Reverse
+Reverse
+SimpleCompare
+Sort
+Sort
+Sort
+StrSimpleCompare
+TApplyFunction
+TCompare
+TIntfApplyFunction
+TIntfCompare
+TIntfSortProc
+TSortProc
+TStrApplyFunction
+TStrCompare
+TStrSortProc
+IntfSortProc
+SortProc
+StrSortProc
Property changes on: trunk/jcl/experts/useswizard/JclAlgorithms.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclAnsiStrings.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclAnsiStrings.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclAnsiStrings.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,167 @@
+AddStringToStrings
+AllocateMultiSz
+AllocateWideMultiSz
+ArrayOf
+CharLastPos
+FreeWideMultiSz
+MultiSzDup
+MultiSzLength
+StrFillChar
+StrIToStrings
+StrResetLength
+StrToFloatSafe
+StrToIntSafe
+StrWord
+WideMultiSzDup
+WideMultiSzLength
+WideMultiSzToWideStrings
+WideStringsToWideMultiSz
+EJclStringError
+PCharVector
+PMultiSz
+PWideMultiSz
+AnsiDecDigits
+AnsiHexDigits
+AnsiLetters
+AnsiLowercaseLetters
+AnsiNull
+AnsiOctDigits
+AnsiSigns
+AnsiUppercaseLetters
+AnsiValidIdentifierLetters
+AnsiWhiteSpace
+C1_ALPHA
+C1_BLANK
+C1_CNTRL
+C1_DIGIT
+C1_LOWER
+C1_PUNCT
+C1_SPACE
+C1_UPPER
+C1_XDIGIT
+CharIPos
+CharPos
+CharReplace
+CharEqualNoCase
+CharIsAlpha
+CharIsAlphaNum
+CharIsBlank
+CharIsControl
+CharIsDelete
+CharIsDigit
+CharIsLower
+CharIsNumberChar
+CharIsPrintable
+CharIsPunctuation
+CharIsReturn
+CharIsSpace
+CharIsUpper
+CharIsWhiteSpace
+CharType
+CharHex
+CharLower
+CharToggleCase
+CharUpper
+FileToString
+StringToFile
+StrToken
+StrTokens
+StrTokenToStrings
+BooleanToStr
+StrNormIndex
+StringsToMultiSz
+MultiSzToStrings
+FreeMultiSz
+StringsToPCharVector
+PCharVectorCount
+PCharVectorToStrings
+FreePCharVector
+StrAfter
+StrBefore
+StrBetween
+StrChopRight
+StrLeft
+StrMid
+StrRestOf
+StrRight
+StrAddRef
+StrAllocSize
+StrDecRef
+StrLen
+StrLength
+StrRefCount
+StrCharCount
+StrCompareRange
+StrFillChar
+StrFind
+StrHasPrefix
+StrILastPos
+StrIndex
+StrIPos
+StrIsOneOf
+StrKeepChars
+StrLastPos
+StrMatch
+StrNIPos
+StrNPos
+StrPrefixIndex
+StrReplace
+StrReplaceButChars
+StrReplaceChar
+StrReplaceChars
+StrSearch
+StrStrCount
+StrCompare
+StrConsistsOfNumberChars
+StrContainsChars
+StrIsAlpha
+StrIsAlphaNum
+StrIsAlphaNumUnderscore
+StrIsDigit
+StrIsSubset
+StrMatches
+StrSame
+StrAnsiToOem
+StrCenter
+StrCharsCount
+StrDoubleQuote
+StrEnsureNoPrefix
+StrEnsureNoSuffix
+StrEnsurePrefix
+StrEnsureSuffix
+StrEscapedToString
+StrLower
+StrLowerBuff
+StrLowerInPlace
+StrMove
+StrOemToAnsi
+StrPadLeft
+StrPadRight
+StrProper
+StrProperBuff
+StrQuote
+StrRemoveChars
+StrRepeat
+StrReverse
+StrReverseInPlace
+StrSingleQuote
+StrSmartCase
+StrStringToEscaped
+StrStripNonNumberChars
+StrToHex
+StrTrimCharLeft
+StrTrimCharRight
+StrTrimCharsLeft
+StrTrimCharsRight
+StrTrimQuotes
+StrUpper
+StrUpperBuff
+StrUpperInPlace
+StrRepeatLength
+StrCharPosLower
+StrCharPosUpper
+StringsToStr
+StrToStrings
+TrimStrings
+TrimStringsRight
+TrimStringsLeft
Property changes on: trunk/jcl/experts/useswizard/JclAnsiStrings.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jcl/experts/useswizard/JclAppInst.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclAppInst.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclAppInst.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,5 +1,12 @@
+TJclAppInstances
+JclAppInstances
ReadMessageCheck
ReadMessageData
+ReadMessageStrings
+TJclAppInstDataKind
+AI_INSTANCECREATED
+AI_INSTANCEDESTROYED
+AI_USERMSG
+AppInstCmdLineDataKind
+AppInstDataKindNoData
ReadMessageString
-ReadMessageStrings
-TJclAppInstances
Added: trunk/jcl/experts/useswizard/JclArrayLists.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclArrayLists.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclArrayLists.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,3 @@
+TJclIntfArrayList
+TJclStrArrayList
+TJclArrayList
Property changes on: trunk/jcl/experts/useswizard/JclArrayLists.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclArraySets.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclArraySets.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclArraySets.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,3 @@
+TJclArraySet
+TJclIntfArraySet
+TJclStrArraySet
Property changes on: trunk/jcl/experts/useswizard/JclArraySets.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jcl/experts/useswizard/JclBase.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclBase.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclBase.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,7 +1,23 @@
-EJclError
-EJclInternalError
-EJclWin32Error
-I64ToCardinals
+ByteArrayStringLen
+ByteArrayToString
+GetBytesEx
+MoveArray
+MoveArray
+MoveArray
+MoveArray
+MoveChar
+SetBytesEx
+SetIntegerSet
+StringToByteArray
+TULargeInteger
+Int16
+Int32
+Int8
+Largeint
+PCardinal
+PJclByteArray
+PLargeInteger
+PULargeInteger
TDynByteArray
TDynCardinalArray
TDynDoubleArray
@@ -18,3 +34,20 @@
TDynSmallIntArray
TDynStringArray
TDynWordArray
+TIntegerSet
+TJclByteArray
+TJclBytes
+TLargeInteger
+UInt16
+UInt32
+UInt64
+UInt8
+JclVersion
+Float
+RaiseLastOSError
+IInterface
+EJclError
+EJclInternalError
+EJclWin32Error
+CardinalsToI64
+I64ToCardinals
Added: trunk/jcl/experts/useswizard/JclBinaryTrees.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclBinaryTrees.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclBinaryTrees.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,10 @@
+TJclBinaryNode
+TJclBinaryTree
+TJclIntfBinaryNode
+TJclIntfBinaryTree
+TJclStrBinaryNode
+TJclStrBinaryTree
+TJclTreeColor
+PJclBinaryNode
+PJclIntfBinaryNode
+PJclStrBinaryNode
Property changes on: trunk/jcl/experts/useswizard/JclBinaryTrees.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclBorlandTools.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclBorlandTools.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclBorlandTools.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,118 @@
+EJclBorRADException
+EJclCommandLineToolError
+TJclBCBInstallation
+TJclBCC32
+TJclBDSInstallation
+TJclBorlandCommandLineTool
+TJclBorlandMake
+TJclBorlandOpenHelp
+TJclBorRADToolIdePackages
+TJclBorRADToolIdeTool
+TJclBorRADToolInstallation
+TJclBorRADToolInstallationObject
+TJclBorRADToolInstallations
+TJclBorRADToolPalette
+TJclBorRADToolRepository
+TJclBpr2Mak
+TJclCommandLineTool
+TJclDCC32
+TJclDCCIL
+TJclDelphiInstallation
+TJclHelp2Manager
+IJclCommandLineTool
+BinaryFileName
+BPLFileName
+GetBPKFileInfo
+GetBPRFileInfo
+GetDPKFileInfo
+GetDPRFileInfo
+IsBCBPackage
+IsBCBProject
+IsDelphiPackage
+IsDelphiProject
+TCommandLineTool
+TJclBorDesigner
+TJclBorPersonality
+TJclBorPlatform
+TJclBorRADToolEdition
+TJclBorRADToolKind
+TJclHelp2Object
+TCommandLineTools
+TJclBorDesigners
+TJclBorPersonalities
+TJclBorRADToolInstallationClass
+TJclBorRADToolPath
+TJclDCC
+TJclHelp2Objects
+TTraverseMethod
+BinaryExtensionExecutable
+BinaryExtensionLibrary
+BinaryExtensionPackage
+BorRADToolEditionIDs
+BorRADToolRepositoryDataModulesPage
+BorRADToolRepositoryDesignerDfm
+BorRADToolRepositoryDesignerXfm
+BorRADToolRepositoryDialogsPage
+BorRADToolRepositoryFormsPage
+BorRADToolRepositoryFormTemplate
+BorRADToolRepositoryObjectAncestor
+BorRADToolRepositoryObjectAuthor
+BorRADToolRepositoryObjectDescr
+BorRADToolRepositoryObjectDesigner
+BorRADToolRepositoryObjectIcon
+BorRADToolRepositoryObjectMainForm
+BorRADToolRepositoryObjectName
+BorRADToolRepositoryObjectNewForm
+BorRADToolRepositoryObjectPage
+BorRADToolRepositoryObjectType
+BorRADToolRepositoryPagesSection
+BorRADToolRepositoryProjectsPage
+BorRADToolRepositoryProjectTemplate
+CompilerExtensionBPI
+CompilerExtensionDCP
+CompilerExtensionDEF
+CompilerExtensionDRC
+CompilerExtensionLIB
+CompilerExtensionMAP
+CompilerExtensionTDS
+DesignerCLX
+DesignerVCL
+DOFCompilerSection
+DOFConditionals
+DOFDirectoriesSection
+DOFLinkerSection
+DOFPackageNoLinkKey
+DOFPackagesKey
+DOFSearchPathName
+DOFUnitOutputDirKey
+JclBorDesignerDescription
+JclBorDesignerFormExtension
+JclBorPersonalityDescription
+Personality32Bit
+Personality64Bit
+PersonalityBCB
+PersonalityBDS
+PersonalityCSB
+PersonalityDelphi
+PersonalityDelphiDotNet
+PersonalityDesign
+PersonalityUnknown
+PersonalityVB
+ProjectTypeLibrary
+ProjectTypePackage
+ProjectTypeProgram
+SourceDescriptionCPP
+SourceDescriptionPAS
+SourceExtensionBCBPackage
+SourceExtensionBCBProject
+SourceExtensionBDSProject
+SourceExtensionCPP
+SourceExtensionDelphiPackage
+SourceExtensionDelphiProject
+SourceExtensionDFM
+SourceExtensionH
+SourceExtensionPAS
+SourceExtensionXFM
+SupportedBCBVersions
+SupportedBDSVersions
+SupportedDelphiVersions
Property changes on: trunk/jcl/experts/useswizard/JclBorlandTools.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jcl/experts/useswizard/JclCIL.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclCIL.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclCIL.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -3,8 +3,9 @@
TJclBinaryInstruction
TJclClrILGenerator
TJclInstruction
+TJclUnaryInstruction
TJclInstructionDumpILOption
-TJclInstructionDumpILOptions
TJclInstructionParamType
TJclOpCode
-TJclUnaryInstruction
+TJclInstructionDumpILOptions
+InstructionDumpILAllOption
Modified: trunk/jcl/experts/useswizard/JclCLR.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclCLR.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclCLR.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,20 +1,38 @@
TJclClrBlobRecord
TJclClrBlobStream
-TJclClrComboIndex
TJclClrGuidStream
TJclClrHeaderEx
-TJclClrHeapKind
-TJclClrImageFlag
-TJclClrImageFlags
TJclClrResourceRecord
TJclClrStream
TJclClrStringsStream
TJclClrTable
-TJclClrTableKind
TJclClrTableRow
TJclClrTableStream
TJclClrUserStringStream
TJclClrVTableFixupRecord
+TJclPeMetadata
+ITableCanDumpIL
+_IMAGE_COR_VTABLEFIXUP
+TClrMetadataHeader
+TClrStreamHeader
+TClrTableStreamHeader
+TJclClrComboIndex
+TJclClrHeapKind
+TJclClrImageFlag
+TJclClrTableKind
TJclClrVTableKind
+IMAGE_COR_VTABLEFIXUP
+PClrMetadataHeader
+PClrStreamHeader
+PClrTableStreamHeader
+PImageCorVTableFixup
+PImageCorVTableFixupArray
+PJclClrToken
+TImageCorVTableFixup
+TImageCorVTableFixupArray
+TJclClrImageFlags
+TJclClrStreamClass
+TJclClrTableClass
+TJclClrTableRowClass
+TJclClrToken
TJclClrVTableKinds
-TJclPeMetadata
Modified: trunk/jcl/experts/useswizard/JclCOM.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclCOM.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclCOM.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,11 +1,5 @@
-CATID_SafeForScripting
-CLSID_StdComponentCategoriesMgr
+EInvalidParam
CreateComponentCategory
-EInvalidParam
-GetDCOMVersion
-GetMDACVersion
-IsDCOMEnabled
-IsDCOMInstalled
MarshalInterMachineInterfaceInStream
MarshalInterMachineInterfaceInVarArray
MarshalInterProcessInterfaceInStream
@@ -15,5 +9,16 @@
ResetIStreamToStart
SizeOfIStreamContents
StreamToVariantArray
+StreamToVariantArray
UnRegisterCLSIDInCategory
VariantArrayToStream
+VariantArrayToStream
+TArrayCatID
+CATID_SafeForInitializing
+CATID_SafeForScripting
+CLSID_StdComponentCategoriesMgr
+icMAX_CATEGORY_DESC_LEN
+IsDCOMInstalled
+IsDCOMEnabled
+GetDCOMVersion
+GetMDACVersion
Modified: trunk/jcl/experts/useswizard/JclComplex.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclComplex.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclComplex.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,4 +1,8 @@
+TCoords
+TRectCoord
+ComplexPrecision
EpsilonSqr
MaxTerm
+TComplex_VERSION
TComplexKind
TJclComplex
Modified: trunk/jcl/experts/useswizard/JclCompression.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclCompression.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclCompression.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -10,3 +10,4 @@
TJclTARDecompressionStream
TJclZLibCompressStream
TJclZLibDecompressStream
+TJclCompressionLevel
Modified: trunk/jcl/experts/useswizard/JclConsole.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclConsole.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclConsole.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,24 +1,25 @@
TJclConsole
+TJclInputBuffer
+TJclScreenBuffer
+TJclScreenCharacter
+TJclScreenCursor
+TJclScreenCustomTextAttribute
+TJclScreenFont
+TJclScreenTextAttribute
+TJclScreenWindow
+IJclScreenTextAttribute
TJclConsoleInputMode
-TJclConsoleInputModes
TJclConsoleOutputMode
-TJclConsoleOutputModes
-TJclInputBuffer
TJclInputCtrlEvent
-TJclInputRecordArray
TJclScreenBackColor
-TJclScreenBuffer
-TJclScreenBufferAfterResizeEvent
-TJclScreenBufferBeforeResizeEvent
TJclScreenBufferTextHorizontalAlign
TJclScreenBufferTextVerticalAlign
-TJclScreenCharacter
-TJclScreenCursor
-TJclScreenCursorSize
-TJclScreenCustomTextAttribute
-TJclScreenFont
TJclScreenFontColor
TJclScreenFontStyle
+TJclConsoleInputModes
+TJclConsoleOutputModes
+TJclInputRecordArray
+TJclScreenBufferAfterResizeEvent
+TJclScreenBufferBeforeResizeEvent
+TJclScreenCursorSize
TJclScreenFontStyles
-TJclScreenTextAttribute
-TJclScreenWindow
Added: trunk/jcl/experts/useswizard/JclContainerIntf.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclContainerIntf.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclContainerIntf.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,44 @@
+EJclConcurrentModificationError
+EJclIllegalArgumentError
+EJclIllegalStateError
+EJclNoSuchElementError
+EJclOperationNotSupportedError
+EJclOutOfBoundsError
+DefaultContainerCapacity
+IJclCloneable
+IJclIntfCloneable
+IJclIntfIterator
+IJclStrIterator
+IJclIterator
+IJclIntfCollection
+IJclStrCollection
+IJclCollection
+IJclIntfList
+IJclStrList
+IJclList
+IJclIntfArray
+IJclStrArray
+IJclArray
+IJclIntfSet
+IJclStrSet
+IJclSet
+IJclIntfTree
+IJclStrTree
+IJclTree
+IJclIntfIntfMap
+IJclMultiIntfIntfMap
+IJclStrIntfMap
+IJclStrStrMap
+IJclStrMap
+IJclMap
+IJclIntfQueue
+IJclStrQueue
+IJclQueue
+IJclStrStrSortedMap
+IJclSortedMap
+IJclIntfSortedSet
+IJclSortedSet
+IJclIntfStack
+IJclStrStack
+IJclStack
+TJclTraverseOrder
Property changes on: trunk/jcl/experts/useswizard/JclContainerIntf.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jcl/experts/useswizard/JclCounter.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclCounter.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclCounter.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,4 +1,5 @@
EJclCounterError
+ContinueCount
StartCount
StopCount
TJclCounter
Modified: trunk/jcl/experts/useswizard/JclDateTime.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclDateTime.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclDateTime.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,54 +1,71 @@
-CenturyOfDate
-CreationDateTimeOfFile
-DateTimeToDosDateTime
-DateTimeToFileTime
-DateTimeToLocalDateTime
+EJclDateTimeError
DateTimeToSystemTime
-DateTimeToUnixTime
-DayOfDate
DayOfTheYear
-DayOfTheYearToDateTime
-DaysInMonth
DecodeDate
-DosDateTimeToDateTime
+DecodeDate
DosDateTimeToFileTime
-DosDateTimeToStr
-DosDateTimeToSystemTime
-EasterSunday
-EJclDateTimeError
-EncodeDate
FATDatesEqual
-FileTimeToDateTime
FileTimeToDosDateTime
FileTimeToLocalDateTime
-FileTimeToStr
FileTimeToSystemTime
-FileTimeToUnixTime
-FormatDateTime
GetISOYearNumberOfDays
-HourOfTime
-HoursToMSecs
IsISOLongYear
+IsISOLongYear
IsLeapYear
ISODayOfWeek
ISOWeekNumber
+ISOWeekNumber
+SystemTimeToFileTime
+TDosDateTime
+UnixTimeStart
+DayOfTheYear
+DecodeDate
+FATDatesEqual
+IsLeapYear
+ISOWeekNumber
ISOWeekToDateTime
+DayOfTheYearToDateTime
+EasterSunday
+CenturyOfDate
+CenturyBaseYear
+YearOfDate
+MonthOfDate
+DayOfDate
+HourOfTime
+MinuteOfTime
+SecondOfTime
+DaysInMonth
+Make4DigitYear
+MakeYear4Digit
+EncodeDate
+CreationDateTimeOfFile
LastAccessDateTimeOfFile
LastWriteDateTimeOfFile
+FormatDateTime
+DateTimeToSystemTime
+DosDateTimeToFileTime
+FileTimeToDosDateTime
+FileTimeToSystemTime
+SystemTimeToFileTime
+FileTimeToDateTime
+DosDateTimeToSystemTime
+SystemTimeToDosDateTime
+SystemTimeToStr
+DosDateTimeToDateTime
+DateTimeToDosDateTime
+DateTimeToFileTime
LocalDateTimeToDateTime
LocalDateTimeToFileTime
-Make4DigitYear
-MakeYear4Digit
-MinuteOfTime
+DateTimeToLocalDateTime
+FileTimeToStr
+DosDateTimeToStr
+TimeOfDateTimeToSeconds
+TimeOfDateTimeToMSecs
+HoursToMSecs
MinutesToMSecs
-MonthOfDate
-SecondOfTime
SecondsToMSecs
-SystemTimeToDosDateTime
-SystemTimeToFileTime
-SystemTimeToStr
-TimeOfDateTimeToMSecs
-TimeOfDateTimeToSeconds
+DateTimeToUnixTime
UnixTimeToDateTime
UnixTimeToFileTime
-YearOfDate
+FileTimeToUnixTime
+TJclUnixTime32
Modified: trunk/jcl/experts/useswizard/JclDebug.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclDebug.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclDebug.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,78 +1,123 @@
+TJclDebugInfoSymbols
+TJclDebugInfoTD32
+TJclDebugThread
+TJclDebugThreadList
+TJclModuleInfoList
+__FILE__
__FILE_OF_ADDR__
-__LINE__
-__LINE_OF_ADDR__
-__MAP__
-__MAP_OF_ADDR__
-__MODULE__
-__MODULE_OF_ADDR__
-__PROC__
-__PROC_OF_ADDR__
AssertKindOf
-Caller
-ClearLocationData
ConvertMapFileToJdbgFile
-DebugInfoAvailable
-EnableCrashOnCtrlScroll
-ExtractClassName
-ExtractMethodName
-FileByLevel
-FileOfAddr
+ConvertMapFileToJdbgFile
GetLocationInfo
-GetLocationInfoStr
InsertDebugDataIntoExecutableFile
-IsDebuggerAttached
-IsHandleValid
-JclCreateExceptFrameList
-JclCreateStackList
+InsertDebugDataIntoExecutableFile
+InsertDebugDataIntoExecutableFile
+InsertDebugDataIntoExecutableFile
+JclDebugThreadList
JclExceptionTrackingActive
-JclLastExceptFrameList
-JclLastExceptStackList
JclLastExceptStackListToStrings
-JclStackTrackingOptions
JclStartExceptionTracking
JclStopExceptionTracking
JclTrackExceptionsFromLibraries
JclValidateModuleAddress
-LineByLevel
-LineOfAddr
-MapByLevel
-MapOfAddr
-ModuleByLevel
-ModuleOfAddr
-ProcByLevel
-ProcOfAddr
-TExceptFrameKind
-TJclAbstractMapParser
-TJclBinDebugGenerator
-TJclBinDebugScanner
-TJclDebugInfoBinary
-TJclDebugInfoExports
-TJclDebugInfoList
-TJclDebugInfoMap
-TJclDebugInfoSource
-TJclDebugInfoTD32
-TJclDebugThread
-TJclDebugThreadList
+TraceMsg
+TJclBinDbgNameCache
+TJclDbgHeader
+TJclMapLineNumber
+TJclMapProcName
+TJclMapSegment
+TJclStackTrackingOption
+TJmpTable
+PDWORDArray
+PJclDbgHeader
+PJclLocationInfo
+PJclMapAddress
+PJclMapLineNumber
+PJclMapProcName
+PJclMapSegment
+PJmpTable
+PStackInfo
+TDWORDArray
+TJclDebugInfoSourceClass
TJclDebugThreadNotifyEvent
-TJclExceptFrame
-TJclExceptFrameList
-TJclLocationInfo
TJclMapClassTableEvent
TJclMapLineNumbersEvent
TJclMapLineNumberUnitEvent
-TJclMapParser
TJclMapPublicsEvent
-TJclMapScanner
TJclMapSegmentEvent
-TJclModuleInfo
-TJclModuleInfoList
-TJclStackBaseList
-TJclStackInfoItem
-TJclStackInfoList
-TJclStackTrackingOption
TJclStackTrackingOptions
TJclThreadIDNotifyEvent
+JclStackTrackingOptions
+DrcFileExtension
+EnvironmentVarAlternateNtSymbolPath
+EnvironmentVarNtSymbolPath
+JclDbgHeaderVersion
+MapFileExtension
+MaxStackTraceItems
+AssertKindOf
Trace
TraceFmt
TraceLoc
TraceLocFmt
+TJmpInstruction
+TExcDescEntry
+TExcDesc
+TExcFrame
+TExceptFrameKind
+TJclExceptFrame
+TJclExceptFrameList
+JclCreateExceptFrameList
+JclLastExceptFrameList
+InsertDebugDataIntoExecutableFile
+IsHandleValid
+IsDebuggerAttached
+EnableCrashOnCtrlScroll
+GetLocationInfo
+TJclLocationInfo
+TJclDebugInfoSource
+TJclDebugInfoList
+DebugInfoAvailable
+TJclDebugInfoMap
+TJclDebugInfoBinary
+TJclDebugInfoExports
+Caller
+GetLocationInfoStr
+ClearLocationData
+__MODULE__
+__PROC__
+__LINE__
+__MAP__
+__MODULE_OF_ADDR__
+__PROC_OF_ADDR__
+__LINE_OF_ADDR__
+__MAP_OF_ADDR__
+FileByLevel
+ModuleByLevel
+ProcByLevel
+LineByLevel
+MapByLevel
+FileOfAddr
+ModuleOfAddr
+ProcOfAddr
+LineOfAddr
+MapOfAddr
+ExtractClassName
+ExtractMethodName
+ConvertMapFileToJdbgFile
+JclDbgDataSignature
+JclDbgDataResName
+JclDbgFileExtension
+TJclBinDebugGenerator
+TJclBinDebugScanner
+TJclMapAddress
+PJclMapString
+TJclAbstractMapParser
+TJclMapParser
+TJclMapScanner
+TStackFrame
+TStackInfo
+TJclStackInfoItem
+TJclStackInfoList
+JclCreateStackList
+JclLastExceptStackList
+TJclStackBaseList
Added: trunk/jcl/experts/useswizard/JclDotNet.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclDotNet.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclDotNet.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,57 @@
+EJclClrException
+TJclClrAppDomain
+TJclClrAppDomainSetup
+TJclClrAssembly
+TJclClrField
+TJclClrHost
+TJclClrMethod
+TJclClrObject
+TJclClrProperty
+CallFunctionShim
+ClrCreateManagedInstance
+CompareCLRVersions
+CorBindToCurrentRuntime
+CorBindToRuntime
+CorBindToRuntimeByCfg
+CorBindToRuntimeEx
+CorBindToRuntimeHost
+CorExitProcess
+CorMarkThreadInThreadPool
+GetCORRequiredVersion
+GetCORSystemDirectory
+GetCORVersion
+GetFileVersion
+GetRealProcAddress
+GetRequestedRuntimeInfo
+GetRequestedRuntimeVersion
+GetRequestedRuntimeVersionForCLSID
+LoadLibraryShim
+RunDll32ShimW
+TJclClrHostFlavor
+TJclClrHostLoaderFlag
+CLSID_RESOLUTION_FLAGS
+HDOMAINENUM
+IJclClrAppDomain
+IJclClrAssembly
+IJclClrEvidence
+IJclClrMethod
+TJclClrAssemblyArguments
+TJclClrBase
+TJclClrHostLoaderFlags
+CLSID_RESOLUTION_DEFAULT
+CLSID_RESOLUTION_REGISTERED
+mscoree_dll
+RUNTIME_INFO_DONT_RETURN_DIRECTORY
+RUNTIME_INFO_DONT_RETURN_VERSION
+RUNTIME_INFO_DONT_SHOW_ERROR_DIALOG
+RUNTIME_INFO_REQUEST_AMD64
+RUNTIME_INFO_REQUEST_IA64
+RUNTIME_INFO_REQUEST_X86
+RUNTIME_INFO_UPGRADE_VERSION
+STARTUP_CONCURRENT_GC
+STARTUP_LOADER_OPTIMIZATION_MASK
+STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN
+STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN_HOST
+STARTUP_LOADER_OPTIMIZATION_SINGLE_DOMAIN
+STARTUP_LOADER_SAFEMODE
+STARTUP_LOADER_SETPREFERENCE
Property changes on: trunk/jcl/experts/useswizard/JclDotNet.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclEDI.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclEDI.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclEDI.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,39 @@
+TEDIDataObject
+TEDIDataObjectGroup
+TEDIDataObjectList
+TEDIDataObjectListItem
+TEDIDelimiters
+TEDILoopStack
+TEDIObject
+TEDIObjectList
+TEDIObjectListItem
+StringRemove
+StringReplace
+TEDIDataObjectDataState
+TEDIDataObjectType
+TEDILoopStackFlags
+TEDILoopStackRecord
+EJclEDIError
+TCustomData
+TEDIDataObjectArray
+TEDIDataObjectGroupArray
+TEDIDataObjectListOptions
+TEDILoopStackArray
+TEDILoopStackFlagSet
+TEDILoopStackOnAddLoopEvent
+TEDIObjectArray
+Debug_EDIDataObjectListCreated
+Debug_EDIDataObjectListDestroyed
+Debug_EDIDataObjectListItemsCreated
+Debug_EDIDataObjectListItemsDestroyed
+Debug_EDIDataObjectsCreated
+Debug_EDIDataObjectsDestroyed
+EDIDataType_Binary
+EDIDataType_Date
+EDIDataType_Decimal
+EDIDataType_Identifier
+EDIDataType_Numeric
+EDIDataType_String
+EDIDataType_Time
+ElementSpecId_Reserved
+NA_LoopId
Property changes on: trunk/jcl/experts/useswizard/JclEDI.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclEDISEF.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclEDISEF.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclEDISEF.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,136 @@
+TEDISEFCompositeElement
+TEDISEFDataObject
+TEDISEFDataObjectGroup
+TEDISEFDataObjectList
+TEDISEFDataObjectListItem
+TEDISEFElement
+TEDISEFFile
+TEDISEFLoop
+TEDISEFObject
+TEDISEFRepeatingPattern
+TEDISEFSegment
+TEDISEFSet
+TEDISEFSubElement
+TEDISEFTable
+TEDISEFText
+TEDISEFTextSet
+TEDISEFTextSets
+AddCompositeElementTo
+AddElementTo
+AddLoopTo
+AddRepeatingPatternTo
+AddSegmentTo
+AddSubElementTo
+AddTableTo
+AppendCompositeElementTo
+AppendElementTo
+AppendLoopTo
+AppendRepeatingPatternTo
+AppendSegmentTo
+AppendSubElementTo
+AppendTableTo
+CombineCOMSDataOfCOMSDefinition
+CombineCOMSDataOfSEGSDefinition
+CombineELMSDataOfCOMSorSEGSDefinition
+CombineELMSDataOfELMSDefinition
+CombineSEGSDataOfSEGSDefinition
+CombineSEGSDataOfSETSDefinition
+DeleteCompositeElementFrom
+DeleteElementFrom
+DeleteLoopFrom
+DeleteRepeatingPatternFrom
+DeleteSegmentFrom
+DeleteSubElementFrom
+DeleteTableFrom
+ExtractCompositeElementFrom
+ExtractElementFrom
+ExtractFromDataObjectGroup
+ExtractFromDataObjectGroup
+ExtractLoopFrom
+ExtractRepeatingPatternFrom
+ExtractSegmentFrom
+ExtractSubElementFrom
+ExtractTableFrom
+GetEDISEFUserAttributeDescription
+GetEDISEFUserAttributeDescription
+InsertCompositeElementInto
+InsertCompositeElementInto
+InsertElementInto
+InsertElementInto
+InsertLoopInto
+InsertLoopInto
+InsertRepeatingPatternInto
+InsertRepeatingPatternInto
+InsertSegmentInto
+InsertSegmentInto
+InsertSubElementInto
+InsertSubElementInto
+InsertTableInto
+InsertTableInto
+ParseCOMSDataOfCOMSDefinition
+ParseCOMSDataOfSEGSDefinition
+ParseELMSDataOfCOMSDefinition
+ParseELMSDataOfELMSDefinition
+ParseELMSDataOfSEGSDefinition
+ParseLoopDataOfSETSDefinition
+ParseSEGSDataOfSEGSDefinition
+ParseSEGSDataOfSETSDefinition
+ParseSetsDataOfSETSDefinition
+ParseTableDataOfSETSDefinition
+TEDISEFComsUserAttributes
+TEDISEFObjectParentType
+TEDISEFWhereType
+TEDISEFDataObjectClass
+EDISEFUserAttributeAmpersand
+EDISEFUserAttributeAmpersandDesc
+EDISEFUserAttributeDollarSign
+EDISEFUserAttributeDollarSignDesc
+EDISEFUserAttributeExclamationPoint
+EDISEFUserAttributeExclamationPointDesc
+EDISEFUserAttributeHyphen
+EDISEFUserAttributeHyphenDesc
+EDISEFUserAttributePeriod
+EDISEFUserAttributePeriodDesc
+EDISEFUserAttributeSet
+SectionTag_
+SectionTag_CODES
+SectionTag_COMS
+SectionTag_ELMS
+SectionTag_INI
+SectionTag_JCL_COMSEXT
+SectionTag_JCL_ELMSEXT
+SectionTag_JCL_SEGSEXT
+SectionTag_JCL_SETSEXT
+SectionTag_OBJVARS
+SectionTag_PRIVATE
+SectionTag_PUBLIC
+SectionTag_SEGS
+SectionTag_SEMREFS
+SectionTag_SETS
+SectionTag_STD
+SectionTag_TEXT
+SectionTag_TEXTSETS
+SectionTag_VALLISTS
+SectionTag_VER
+SEFTextCR
+SEFTextCRLF
+SEFTextLF
+SEFTextSetsCode_Elm0
+SEFTextSetsCode_Elm1
+SEFTextSetsCode_Elm2
+SEFTextSetsCode_Elm4
+SEFTextSetsCode_Seg0
+SEFTextSetsCode_Seg1
+SEFTextSetsCode_Seg2
+SEFTextSetsCode_Seg3
+SEFTextSetsCode_Seg4
+SEFTextSetsCode_Seg5
+SEFTextSetsCode_Seg6
+SEFTextSetsCode_Seg7
+SEFTextSetsCode_Set0
+SEFTextSetsCode_Set1
+SEFTextSetsCode_Set2
+SEFTextSetsCode_Set3
+SEFTextSetsCode_Set4
+SEFTextSetsCode_Set5
+Value_UndefinedMaximum
Property changes on: trunk/jcl/experts/useswizard/JclEDISEF.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclEDITranslators.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclEDITranslators.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclEDITranslators.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,2 @@
+TEDISEFToSpecTranslator
+TEDISpecToSEFTranslator
Property changes on: trunk/jcl/experts/useswizard/JclEDITranslators.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclEDIXML.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclEDIXML.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclEDIXML.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,46 @@
+TEDIXMLANSIX12FormatTranslator
+TEDIXMLAttributes
+TEDIXMLDataObject
+TEDIXMLDataObjectGroup
+TEDIXMLDelimiters
+TEDIXMLElement
+TEDIXMLFile
+TEDIXMLFileHeader
+TEDIXMLFunctionalGroup
+TEDIXMLFunctionalGroupSegment
+TEDIXMLInterchangeControl
+TEDIXMLInterchangeControlSegment
+TEDIXMLObject
+TEDIXMLSegment
+TEDIXMLTransactionSet
+TEDIXMLTransactionSetLoop
+TEDIXMLTransactionSetSegment
+TEDIXMLNameSpaceOption
+TEDIXMLDataObjectArray
+TEDIXMLElementArray
+TEDIXMLObjectArray
+TEDIXMLSegmentArray
+XMLAttribute_Description
+XMLAttribute_Id
+XMLAttribute_MaximumLength
+XMLAttribute_MaximumUsage
+XMLAttribute_MinimumLength
+XMLAttribute_OwnerLoopId
+XMLAttribute_ParentLoopId
+XMLAttribute_Position
+XMLAttribute_RequirementDesignator
+XMLAttribute_Section
+XMLAttribute_Type
+XMLTag_EDIFile
+XMLTag_Element
+XMLTag_FGHSegmentId
+XMLTag_FGTSegmentId
+XMLTag_FunctionalGroup
+XMLTag_ICHSegmentId
+XMLTag_ICTSegmentId
+XMLTag_InterchangeControl
+XMLTag_Segment
+XMLTag_TransactionSet
+XMLTag_TransactionSetLoop
+XMLTag_TSHSegmentId
+XMLTag_TSTSegmentId
Property changes on: trunk/jcl/experts/useswizard/JclEDIXML.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclEDI_ANSIX12.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclEDI_ANSIX12.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclEDI_ANSIX12.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,48 @@
+TEDIElementSpec
+TEDIFileSpec
+TEDIFunctionalGroupSegmentGSSpec
+TEDIFunctionalGroupSegmentSpec
+TEDIFunctionalGroupSpec
+TEDIInterchangeControlSegmentISASpec
+TEDIInterchangeControlSegmentSpec
+TEDIInterchangeControlSpec
+TEDISegmentSpec
+TEDITransactionSet
+TEDITransactionSetDocument
+TEDITransactionSetLoop
+TEDITransactionSetSegment
+TEDITransactionSetSegmentSpec
+TEDITransactionSetSegmentSTSpec
+TEDITransactionSetSpec
+TEDITransactionSetArray
+TEDITransactionSetDocumentArray
+TEDITransactionSetDocumentOptions
+FGHSegmentId
+FGTSegmentId
+ICHSegmentId
+ICTSegmentId
+RDFN_AgencyCodeId
+RDFN_Description
+RDFN_FGDescription
+RDFN_FunctionalGroupId
+RDFN_ICDescription
+RDFN_Id
+RDFN_MaximumLength
+RDFN_MaximumLoopRepeat
+RDFN_MaximumUsage
+RDFN_MinimumLength
+RDFN_Notes
+RDFN_OwnerLoopId
+RDFN_ParentLoopId
+RDFN_Position
+RDFN_RequirementDesignator
+RDFN_Section
+RDFN_StandardId
+RDFN_TransSetDesc
+RDFN_TransSetId
+RDFN_Type
+RDFN_VersionId
+RDFN_VersionReleaseId
+TA1SegmentId
+TSHSegmentId
+TSTSegmentId
Property changes on: trunk/jcl/experts/useswizard/JclEDI_ANSIX12.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclEDI_ANSIX12_Ext.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclEDI_ANSIX12_Ext.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclEDI_ANSIX12_Ext.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1 @@
+TEDI_ANSIX12_Document
Property changes on: trunk/jcl/experts/useswizard/JclEDI_ANSIX12_Ext.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclEDI_UNEDIFACT.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclEDI_UNEDIFACT.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclEDI_UNEDIFACT.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,26 @@
+TEDICompositeElement
+TEDIElement
+TEDIFile
+TEDIFunctionalGroup
+TEDIFunctionalGroupSegment
+TEDIInterchangeControl
+TEDIInterchangeControlSegment
+TEDIMessage
+TEDIMessageLoop
+TEDIMessageSegment
+TEDISegment
+TEDICompositeElementArray
+TEDIElementArray
+TEDIFileArray
+TEDIFileOptions
+TEDIFunctionalGroupArray
+TEDIInterchangeControlArray
+TEDIMessageArray
+TEDISegmentArray
+UNASegmentId
+UNBSegmentId
+UNESegmentId
+UNGSegmentId
+UNHSegmentId
+UNTSegmentId
+UNZSegmentId
Property changes on: trunk/jcl/experts/useswizard/JclEDI_UNEDIFACT.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclEDI_UNEDIFACT_Ext.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclEDI_UNEDIFACT_Ext.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclEDI_UNEDIFACT_Ext.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,2 @@
+TEDI_UNEDIFACT_Document
+TEDIMessageDocumentOptions
Property changes on: trunk/jcl/experts/useswizard/JclEDI_UNEDIFACT_Ext.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jcl/experts/useswizard/JclExprEval.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclExprEval.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclExprEval.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,44 +1,54 @@
+cExprEvalHashSize
EJclExprEvalError
-TCompiledEvaluator
-TCompiledExpression
-TEasyEvaluator
-TEvaluator
-TExprAbstractFuncSym
-TExprBinary32FuncSym
-TExprBinary64FuncSym
-TExprBinary80FuncSym
-TExprBinaryFuncSym
+ExprWhiteSpace
+TFloat
+TFloat32
+TFloat64
+TFloat80
+TFloatFunc
+TUnaryFunc
+TBinaryFunc
+TTernaryFunc
+TExprContext
+TExprHashContext
+TExprSetContext
+TExprSym
+TExprToken
+TExprLexer
+TExprNode
+TExprNodeFactory
TExprCompileParser
+TExprEvalParser
+TExprSimpleLexer
+TExprVirtMachOp
+TExprVirtMach
+TExprVirtMachNodeFactory
+TExprConstSym
TExprConst32Sym
TExprConst64Sym
TExprConst80Sym
-TExprConstSym
-TExprContext
-TExpressionCompiler
-TExprEvalParser
+TExprVar32Sym
+TExprVar64Sym
+TExprVar80Sym
+TExprAbstractFuncSym
+TExprFuncSym
TExprFloat32FuncSym
TExprFloat64FuncSym
TExprFloat80FuncSym
-TExprFuncSym
-TExprHashContext
-TExprLexer
-TExprNode
-TExprNodeFactory
-TExprSetContext
-TExprSimpleLexer
-TExprSym
+TExprUnaryFuncSym
+TExprUnary32FuncSym
+TExprUnary64FuncSym
+TExprUnary80FuncSym
+TExprBinaryFuncSym
+TExprBinary32FuncSym
+TExprBinary64FuncSym
+TExprBinary80FuncSym
+TExprTernaryFuncSym
TExprTernary32FuncSym
TExprTernary64FuncSym
TExprTernary80FuncSym
-TExprTernaryFuncSym
-TExprToken
-TExprUnary32FuncSym
-TExprUnary64FuncSym
-TExprUnary80FuncSym
-TExprUnaryFuncSym
-TExprVar32Sym
-TExprVar64Sym
-TExprVar80Sym
-TExprVirtMach
-TExprVirtMachNodeFactory
-TExprVirtMachOp
+TEasyEvaluator
+TEvaluator
+TCompiledEvaluator
+TCompiledExpression
+TExpressionCompiler
Modified: trunk/jcl/experts/useswizard/JclFileUtils.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclFileUtils.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclFileUtils.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,125 +1,181 @@
-BuildFileList
-CloseVolume
-CreateEmptyFile
-DeleteDirectory
-DelTree
-DelTreeEx
-DirectoryExists
-DiskInDrive
EJclFileMappingError
EJclFileMappingViewError
EJclFileUtilsError
EJclFileVersionInfoError
EJclPathError
EJclTempFileStreamError
-EnumDirectories
-EnumFiles
-FileAttributesStr
+TJclFileMappingStream
+TJclFileMaskComparator
+TJclMappedTextReader
+FormatVersionString
+FormatVersionString
+FormatVersionString
+fstat64
+GetBackupFileName
+GetFileCreation
+GetFileInformation
+GetFileLastAccess
+GetFileLastAccess
+GetFileLastAccess
+GetFileLastAccess
+GetFileLastAttrChange
+GetFileLastAttrChange
+GetFileLastAttrChange
+GetFileLastWrite
+GetFileLastWrite
+GetFileLastWrite
+GetFileLastWrite
+GetFileStatus
+GetSizeOfFile
+GetSizeOfFile
+IsRootDirectory
+lstat64
+PathCanonicalize
+PathExtractPathDepth
+PathGetDepth
+PathListAddItems
+PathListDelItem
+PathListDelItems
+PathListGetItem
+PathListIncludeItems
+PathListItemCount
+PathListItemIndex
+PathListSetItem
+SamePath
+stat64
+VersionExtractFileInfo
+VersionExtractProductInfo
+VersionFixedFileInfoString
+TCompactPath
+TFileEnumeratorSyncMode
+TFileFlag
+TFileListOption
+TFileSearchOption
+TFileVersionFormat
+TJclAttributeMatch
+TJclFileMappingRoundOffset
+TJclMappedTextReaderIndex
+TLangIdRec
+PLangIdRec
+PPCharArray
+TFileHandler
+TFileHandlerEx
+TFileMatchFunc
+TFileSearchTaskID
+TFileSearchTerminationEvent
+TFileTime
+TPCharArray
+DirDelimiter
+DirSeparator
+ERROR_NO_MORE_FILES
+faCompressed
+faEncrypted
+faNormalFile
+faNotContentIndexed
+faOffline
+faRejectedByDefault
+faReparsePoint
+faSparseFile
+faSymLink
+faTemporary
+faUnixSpecific
+faWindowsSpecific
+GetFileCreation
+GetFileInformation
+GetFileLastAccess
+GetFileLastWrite
+GetSizeOfFile
+FileGetTypeName
+FindUnusedFileName
+ForceDirectories
+FileGetDisplayName
+FileGetOwnerName
+FileGetGroupName
+GetModulePath
+FileGetTempName
+FileCreateTemp
FileBackup
FileCopy
-FileCreateTemp
FileDelete
FileExists
-FileGetDisplayName
-FileGetGroupName
-FileGetOwnerName
-FileGetSize
-FileGetTempName
-FileGetTypeName
FileMove
FileRestore
-FileSearch
-FindUnusedFileName
-ForceDirectories
-FormatVersionString
-GetBackupFileName
+ShredFile
+FileGetSize
+GetFileAttributeListEx
+GetFileAttributeList
GetDirectorySize
GetDriveTypeStr
+SetFileLastWrite
+SetFileLastAccess
+SetFileCreation
+SetDirLastWrite
+SetDirLastAccess
+SetDirCreation
+IsDirectory
+LockVolume
+OpenVolume
+CloseVolume
+CreateEmptyFile
+GetStandardFileInfo
GetFileAgeCoherence
-GetFileAttributeList
-GetFileAttributeListEx
-GetFileCreation
-GetFileInformation
-GetFileLastAccess
-GetFileLastWrite
-GetModulePath
-GetSizeOfFile
-GetStandardFileInfo
-IJclFileEnumerator
-IsDirectory
+BuildFileList
+AdvBuildFileList
+TFileListOptions
+TDelTreeProgress
+DelTree
+DelTreeEx
+DirectoryExists
+DiskInDrive
+DeleteDirectory
+UnlockVolume
+CreateSymbolicLink
+SymbolicLinkTarget
+FileAttributesStr
+TFileSearchOptions
+TAttributeInterest
+VerifyFileAttributeMask
IsFileAttributeMatch
IsFileNameMatch
-IsRootDirectory
-LockVolume
-OpenVolume
+EnumFiles
+EnumDirectories
+TJclCustomFileAttrMask
+TJclFileAttributeMask
+TJclFileEnumerator
+IJclFileEnumerator
+FileSearch
+TFileFlags
+VersionResourceAvailable
+OSIdentToString
+TJclFileVersionInfo
+VersionFixedFileInfo
OSFileTypeToString
-OSIdentToString
+DriveLetters
+PathDevicePrefix
+PathSeparator
+PathUncPrefix
+PathGetLongName
+PathGetLongName2
+PathGetShortName
+PathGetRelativePath
+PathGetTempPath
+PathIsChild
+PathIsAbsolute
+PathIsDiskDevice
+PathIsUNC
+PathExtractElements
+PathAddSeparator
PathAddExtension
-PathAddSeparator
PathAppend
PathBuildRoot
-PathCanonicalize
PathCommonPrefix
PathCompactPath
-PathExtractElements
PathExtractFileDirFixed
PathExtractFileNameNoExt
-PathExtractPathDepth
-PathGetDepth
-PathGetLongName
-PathGetLongName2
-PathGetRelativePath
-PathGetShortName
-PathGetTempPath
-PathIsAbsolute
-PathIsChild
-PathIsDiskDevice
-PathIsUNC
PathRemoveExtension
PathRemoveSeparator
-SetDirCreation
-SetDirLastAccess
-SetDirLastWrite
-SetFileCreation
-SetFileLastAccess
-SetFileLastWrite
-ShredFile
-TAttributeInterest
-TCompactPath
-TFileEnumeratorSyncMode
-TFileFlag
-TFileFlags
-TFileHandler
-TFileHandlerEx
-TFileListOption
-TFileListOptions
-TFileSearchOption
-TFileSearchOptions
-TFileSearchTerminationEvent
-TFileVersionFormat
-TJclAttributeMatch
-TJclCustomFileAttrMask
+TJclTempFileStream
+TJclFileMappingView
TJclCustomFileMapping
-TJclFileAttributeMask
-TJclFileEnumerator
TJclFileMapping
-TJclFileMappingRoundOffset
-TJclFileMappingStream
-TJclFileMappingView
-TJclFileMaskComparator
-TJclFileVersionInfo
-TJclMappedTextReader
-TJclMappedTextReaderIndex
TJclSwapFileMapping
-TJclTempFileStream
-UnlockVolume
-VerifyFileAttributeMask
-VersionExtractFileInfo
-VersionExtractProductInfo
-VersionFixedFileInfo
-VersionFixedFileInfoString
-VersionResourceAvailable
-Win32BackupFile
-Win32DeleteFile
-Win32MoveFileReplaceExisting
-Win32RestoreFile
Modified: trunk/jcl/experts/useswizard/JclGraphUtils.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclGraphUtils.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclGraphUtils.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,92 +1,4 @@
-BlendLine
-BlendLineEx
-BlendMem
-BlendMemEx
-BlendReg
-BlendRegEx
-BlueComponent
-BrightColor
-BrightColorChannel
-CIED65ToCIED50
-CIELABToBGR
-ClipCodes
-ClipLine
-CMYKToBGR
-Color32
-ColorToHTML
-CombineMem
-CombineReg
-DarkColor
-DarkColorChannel
-DialogUnitsToPixelsX
-DialogUnitsToPixelsY
DottedLineTo
-DrawPolyLine
-EColorConversionError
-EMMS
-GetColorBlue
-GetColorFlag
-GetColorGreen
-GetColorRed
-GetRGBValue
-Gray32
-GreenComponent
-HLSToRGB
-HSLToRGB
-Intensity
-NullPoint
-NullRect
-OpenGLColorToWinColor
-PixelsToDialogUnitsX
-PixelsToDialogUnitsY
-PointAssign
-PointCopy
-PointEqual
-PointIsNull
-PointMove
-RectAssign
-RectAssignPoints
-RectBounds
-RectCenter
-RectCopy
-RectEqual
-RectFitToScreen
-RectGrow
-RectGrowX
-RectGrowY
-RectHeight
-RectIncludesPoint
-RectIncludesRect
-RectIntersection
-RectIntersectRect
-RectIsEmpty
-RectIsNull
-RectIsSquare
-RectIsValid
-RectMove
-RectMoveTo
-RectNormalize
-RectsAreValid
-RectUnion
-RectWidth
-RedComponent
-RGBAToBGRA
-RGBToBGR
-RGBToHLS
-RGBToHSL
-SetAlpha
SetBitmapColors
-SetColorBlue
-SetColorFlag
-SetColorGreen
-SetColorRed
-SetRGBValue
-ShortenString
-TArrayOfColor32
-TClipCode
-TClipCodes
-TColor32
-THLSValue
+PPointArray
TPointArray
-WinColor
-WinColorToOpenGLColor
Modified: trunk/jcl/experts/useswizard/JclGraphics.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclGraphics.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclGraphics.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,61 +1,29 @@
-ApplyLUT
-BitmapToIcon
-BitmapToJPeg
-BlockTransfer
-ColorToGrayscale
+TJclByteMap
CreateRegionFromBitmap
-DrawBitmap
-EJclGraphicsError
-ExtractIconCount
-FillGradient
GetAntialiasedBitmap
GetIconFromBitmap
-IconToBitmap
-IdentityMatrix
+MapWindowRect
+ScreenShot
+ScreenShot
+WriteIcon
+TJclThreadPersistent
+TJclCustomMap
+TJclBitmap32
+AlphaToGrayscale
+ApplyLUT
+BlockTransfer
+ColorToGrayscale
IntensityToAlpha
Invert
InvertRGB
-JPegToBitmap
-PolygonAS
-PolygonFS
-PolygonTS
-PolyLineAS
-PolyLineFS
-PolyLineTS
-PolyPolygonAS
-PolyPolygonFS
-PolyPolygonTS
-SaveIconToFile
-ScreenShot
SetBorderTransparent
SetGamma
-Stretch
StretchTransfer
-TColorChannel
-TConversionKind
-TDrawMode
-TDynDynIntegerArrayArray
-TDynDynPointArrayArray
-TDynDynPointArrayArrayF
-TDynPointArray
-TDynPointArrayF
-TGradientDirection
-TJclBitmap32
-TJclByteMap
-TJclCustomMap
+Transform
+BitmapToJPeg
+JPegToBitmap
TJclDesktopCanvas
-TJclLinearTransformation
+WriteIcon
+SaveIconToFile
TJclRegion
-TJclRegionBitmapMode
-TJclRegionCombineOperator
TJclRegionInfo
-TJclRegionKind
-TJclThreadPersistent
-TJclTransformation
-TPolyFillMode
-Transform
-TResamplingFilter
-TScanLine
-TScanLines
-TStretchFilter
-WriteIcon
Added: trunk/jcl/experts/useswizard/JclHashMaps.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclHashMaps.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclHashMaps.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,31 @@
+TJclBucket
+TJclIntfIntfBucket
+TJclStrBucket
+TJclStrIntfBucket
+TJclStrStrBucket
+TJclEntry
+TJclIntfIntfEntry
+TJclStrEntry
+TJclStrIntfEntry
+TJclStrStrEntry
+PJclBucket
+PJclIntfIntfBucket
+PJclStrBucket
+PJclStrIntfBucket
+PJclStrStrBucket
+TJclBucketArray
+TJclEntryArray
+TJclHashFunction
+TJclIntfIntfBucketArray
+TJclIntfIntfEntryArray
+TJclStrBucketArray
+TJclStrEntryArray
+TJclStrIntfBucketArray
+TJclStrIntfEntryArray
+TJclStrStrBucketArray
+TJclStrStrEntryArray
+TJclHashMap
+TJclIntfIntfHashMap
+TJclStrIntfHashMap
+TJclStrHashMap
+TJclStrStrHashMap
Property changes on: trunk/jcl/experts/useswizard/JclHashMaps.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jcl/experts/useswizard/JclHashSets.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclHashSets.txt (rev 0)
+++ trunk/jcl/experts/useswizard/JclHashSets.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -0,0 +1,3 @@
+TJclIntfHashSet
+TJclHashSet
+TJclStrHashSet
Property changes on: trunk/jcl/experts/useswizard/JclHashSets.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jcl/experts/useswizard/JclHookExcept.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclHookExcept.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclHookExcept.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,12 +1,17 @@
JclAddExceptNotifier
+JclAddExceptNotifier
JclBelongsHookedCode
-JclExceptionsHooked
JclHookedExceptModulesList
+JclHookExceptionsInModule
JclInitializeLibrariesHookExcept
JclRemoveExceptNotifier
+JclRemoveExceptNotifier
JclReplaceExceptObj
-JclUnhookExceptions
JclUnkookExceptionsInModule
-TJclExceptNotifyMethod
TJclExceptNotifyPriority
TJclModuleArray
+TJclExceptNotifyProc
+TJclExceptNotifyMethod
+JclHookExceptions
+JclUnhookExceptions
+JclExceptionsHooked
Modified: trunk/jcl/experts/useswizard/JclIniFiles.txt
===================================================================
--- trunk/jcl/experts/useswizard/JclIniFiles.txt 2006-11-03 17:45:17 UTC (rev 1812)
+++ trunk/jcl/experts/useswizard/JclIniFiles.txt 2006-11-03 17:55:09 UTC (rev 1813)
@@ -1,7 +1,8 @@
-IniReadInteger
-IniReadString
IniReadStrings
+IniWriteStrings
IniWriteBool
IniWriteIn...
[truncated message content] |
|
From: <ou...@us...> - 2006-11-03 17:45:25
|
Revision: 1812
http://svn.sourceforge.net/jcl/?rev=1812&view=rev
Author: outchy
Date: 2006-11-03 09:45:17 -0800 (Fri, 03 Nov 2006)
Log Message:
-----------
Added missing source files.
Modified Paths:
--------------
trunk/help/JCLHelp.dox
Modified: trunk/help/JCLHelp.dox
===================================================================
--- trunk/help/JCLHelp.dox 2006-11-03 16:38:30 UTC (rev 1811)
+++ trunk/help/JCLHelp.dox 2006-11-03 17:45:17 UTC (rev 1812)
@@ -42827,38 +42827,42 @@
SavedValues=1
[Source Files]
-Count=126
+Count=130
File0=8087.dtx
File1=AppInst.dtx
File10=ExprEval.dtx
-File100=..\jcl\source\windows\JclCOM.pas
-File101=..\jcl\source\windows\JclConsole.pas
-File102=..\jcl\source\windows\JclDebug.pas
-File103=..\jcl\source\windows\JclDotNet.pas
-File104=..\jcl\source\windows\JclHookExcept.pas
-File105=..\jcl\source\windows\JclLANMan.pas
-File106=..\jcl\source\windows\JclLocales.pas
-File107=..\jcl\source\windows\JclMapi.pas
-File108=..\jcl\source\windows\JclMetadata.pas
-File109=..\jcl\source\windows\JclMiscel.pas
+File100=..\jcl\source\windows\JclAppInst.pas
+File101=..\jcl\source\windows\JclCIL.pas
+File102=..\jcl\source\windows\JclCLR.pas
+File103=..\jcl\source\windows\JclCOM.pas
+File104=..\jcl\source\windows\JclConsole.pas
+File105=..\jcl\source\windows\JclDebug.pas
+File106=..\jcl\source\windows\JclDotNet.pas
+File107=..\jcl\source\windows\JclHookExcept.pas
+File108=..\jcl\source\windows\JclLANMan.pas
+File109=..\jcl\source\windows\JclLocales.pas
File11=FileUtils.dtx
-File110=..\jcl\source\windows\JclMsdosSys.pas
-File111=..\jcl\source\windows\JclMultimedia.pas
-File112=..\jcl\source\windows\JclNTFS.pas
-File113=..\jcl\source\windows\JclPeImage.pas
-File114=..\jcl\source\windows\JclRegistry.pas
-File115=..\jcl\source\windows\JclSecurity.pas
-File116=..\jcl\source\windows\JclShell.pas
-File117=..\jcl\source\windows\JclStructStorage.pas
-File118=..\jcl\source\windows\JclSvcCtrl.pas
-File119=..\jcl\source\windows\JclSynch.pas
+File110=..\jcl\source\windows\JclMapi.pas
+File111=..\jcl\source\windows\JclMetadata.pas
+File112=..\jcl\source\windows\JclMiscel.pas
+File113=..\jcl\source\windows\JclMsdosSys.pas
+File114=..\jcl\source\windows\JclMultimedia.pas
+File115=..\jcl\source\windows\JclNTFS.pas
+File116=..\jcl\source\windows\JclPeImage.pas
+File117=..\jcl\source\windows\JclRegistry.pas
+File118=..\jcl\source\windows\JclSecurity.pas
+File119=..\jcl\source\windows\JclShell.pas
File12=Graphics.dtx
-File120=..\jcl\source\windows\JclTask.pas
-File121=..\jcl\source\windows\JclTD32.pas
-File122=..\jcl\source\windows\JclUnicode.pas
-File123=..\jcl\source\windows\JclWideFormat.pas
-File124=..\jcl\source\windows\JclWin32.pas
-File125=..\jcl\source\windows\JclWinMIDI.pas
+File120=..\jcl\source\windows\JclStructStorage.pas
+File121=..\jcl\source\windows\JclSvcCtrl.pas
+File122=..\jcl\source\windows\JclSynch.pas
+File123=..\jcl\source\windows\JclTask.pas
+File124=..\jcl\source\windows\JclTD32.pas
+File125=..\jcl\source\windows\JclUnicode.pas
+File126=..\jcl\source\windows\JclWideFormat.pas
+File127=..\jcl\source\windows\JclWin32.pas
+File128=..\jcl\source\windows\JclWin32Ex.pas
+File129=..\jcl\source\windows\JclWinMIDI.pas
File13=hlpgrps.dtx
File14=IniFiles.dtx
File15=LANMan.dtx
@@ -42895,65 +42899,65 @@
File43=..\jcl\source\common\Jcl8087.pas
File44=..\jcl\source\common\JclAbstractContainers.pas
File45=..\jcl\source\common\JclAlgorithms.pas
-File46=..\jcl\source\common\JclArrayLists.pas
-File47=..\jcl\source\common\JclArraySets.pas
-File48=..\jcl\source\common\JclBase.pas
-File49=..\jcl\source\common\JclBinaryTrees.pas
+File46=..\jcl\source\common\JclAnsiStrings.pas
+File47=..\jcl\source\common\JclArrayLists.pas
+File48=..\jcl\source\common\JclArraySets.pas
+File49=..\jcl\source\common\JclBase.pas
File5=Complex.dtx
-File50=..\jcl\source\common\JclBorlandTools.pas
-File51=..\jcl\source\common\JclComplex.pas
-File52=..\jcl\source\common\JclCompression.pas
-File53=..\jcl\source\common\JclContainerIntf.pas
-File54=..\jcl\source\common\JclCounter.pas
-File55=..\jcl\source\common\JclDateTime.pas
-File56=..\jcl\source\common\JclEDI.pas
-File57=..\jcl\source\common\JclEDI_ANSIX12.pas
-File58=..\jcl\source\common\JclEDI_ANSIX12_Ext.pas
-File59=..\jcl\source\common\JclEDI_UNEDIFACT.pas
+File50=..\jcl\source\common\JclBinaryTrees.pas
+File51=..\jcl\source\common\JclBorlandTools.pas
+File52=..\jcl\source\common\JclComplex.pas
+File53=..\jcl\source\common\JclCompression.pas
+File54=..\jcl\source\common\JclContainerIntf.pas
+File55=..\jcl\source\common\JclCounter.pas
+File56=..\jcl\source\common\JclDateTime.pas
+File57=..\jcl\source\common\JclEDI.pas
+File58=..\jcl\source\common\JclEDI_ANSIX12.pas
+File59=..\jcl\source\common\JclEDI_ANSIX12_Ext.pas
File6=Containers.dtx
-File60=..\jcl\source\common\JclEDI_UNEDIFACT_Ext.pas
-File61=..\jcl\source\common\JclEDISEF.pas
-File62=..\jcl\source\common\JclEDITranslators.pas
-File63=..\jcl\source\common\JclEDIXML.pas
-File64=..\jcl\source\common\JclExprEval.pas
-File65=..\jcl\source\common\JclFileUtils.pas
-File66=..\jcl\source\common\JclHashMaps.pas
-File67=..\jcl\source\common\JclHashSets.pas
-File68=..\jcl\source\common\JclIniFiles.pas
-File69=..\jcl\source\common\JclLinkedLists.pas
+File60=..\jcl\source\common\JclEDI_UNEDIFACT.pas
+File61=..\jcl\source\common\JclEDI_UNEDIFACT_Ext.pas
+File62=..\jcl\source\common\JclEDISEF.pas
+File63=..\jcl\source\common\JclEDITranslators.pas
+File64=..\jcl\source\common\JclEDIXML.pas
+File65=..\jcl\source\common\JclExprEval.pas
+File66=..\jcl\source\common\JclFileUtils.pas
+File67=..\jcl\source\common\JclHashMaps.pas
+File68=..\jcl\source\common\JclHashSets.pas
+File69=..\jcl\source\common\JclIniFiles.pas
File7=Counter.dtx
-File70=..\jcl\source\common\JclLogic.pas
-File71=..\jcl\source\common\JclMath.pas
-File72=..\jcl\source\common\JclMIDI.pas
-File73=..\jcl\source\common\JclMime.pas
-File74=..\jcl\source\common\JclPCRE.pas
-File75=..\jcl\source\common\JclQueues.pas
-File76=..\jcl\source\common\JclResources.pas
-File77=..\jcl\source\common\JclRTTI.pas
-File78=..\jcl\source\common\JclSchedule.pas
-File79=..\jcl\source\common\JclStacks.pas
+File70=..\jcl\source\common\JclLinkedLists.pas
+File71=..\jcl\source\common\JclLogic.pas
+File72=..\jcl\source\common\JclMath.pas
+File73=..\jcl\source\common\JclMIDI.pas
+File74=..\jcl\source\common\JclMime.pas
+File75=..\jcl\source\common\JclPCRE.pas
+File76=..\jcl\source\common\JclQueues.pas
+File77=..\jcl\source\common\JclResources.pas
+File78=..\jcl\source\common\JclRTTI.pas
+File79=..\jcl\source\common\JclSchedule.pas
File8=DateTime.dtx
-File80=..\jcl\source\common\JclStatistics.pas
-File81=..\jcl\source\common\JclStrHashMap.pas
-File82=..\jcl\source\common\JclStrings.pas
-File83=..\jcl\source\common\JclSysInfo.pas
-File84=..\jcl\source\common\JclSysUtils.pas
-File85=..\jcl\source\common\JclUnitConv.pas
-File86=..\jcl\source\common\JclUnitVersioning.pas
-File87=..\jcl\source\common\JclUnitVersioningProviders.pas
-File88=..\jcl\source\common\JclValidation.pas
-File89=..\jcl\source\common\JclVectors.pas
+File80=..\jcl\source\common\JclStacks.pas
+File81=..\jcl\source\common\JclStatistics.pas
+File82=..\jcl\source\common\JclStreams.pas
+File83=..\jcl\source\common\JclStrHashMap.pas
+File84=..\jcl\source\common\JclStrings.pas
+File85=..\jcl\source\common\JclSysInfo.pas
+File86=..\jcl\source\common\JclSysUtils.pas
+File87=..\jcl\source\common\JclUnitConv.pas
+File88=..\jcl\source\common\JclUnitVersioning.pas
+File89=..\jcl\source\common\JclUnitVersioningProviders.pas
File9=Debug.dtx
-File90=..\jcl\source\common\JclWideStrings.pas
-File91=..\jcl\source\vcl\JclGraphics.pas
-File92=..\jcl\source\vcl\JclGraphUtils.pas
-File93=..\jcl\source\vcl\JclPrint.pas
-File94=..\jcl\source\visclx\JclQGraphics.pas
-File95=..\jcl\source\visclx\JclQGraphUtils.pas
-File96=..\jcl\source\windows\Hardlinks.pas
-File97=..\jcl\source\windows\JclAppInst.pas
-File98=..\jcl\source\windows\JclCIL.pas
-File99=..\jcl\source\windows\JclCLR.pas
+File90=..\jcl\source\common\JclValidation.pas
+File91=..\jcl\source\common\JclVectors.pas
+File92=..\jcl\source\common\JclWideStrings.pas
+File93=..\jcl\source\common\pcre.pas
+File94=..\jcl\source\vcl\JclGraphics.pas
+File95=..\jcl\source\vcl\JclGraphUtils.pas
+File96=..\jcl\source\vcl\JclPrint.pas
+File97=..\jcl\source\visclx\JclQGraphics.pas
+File98=..\jcl\source\visclx\JclQGraphUtils.pas
+File99=..\jcl\source\windows\Hardlinks.pas
[Source Include Directories]
Count=1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ob...@us...> - 2006-11-03 16:38:41
|
Revision: 1811
http://svn.sourceforge.net/jcl/?rev=1811&view=rev
Author: obones
Date: 2006-11-03 08:38:30 -0800 (Fri, 03 Nov 2006)
Log Message:
-----------
Regenerated
Modified Paths:
--------------
trunk/jcl/packages/c5/JclRepositoryExpertC50.res
trunk/jcl/packages/c6/JclRepositoryExpert.res
Modified: trunk/jcl/packages/c5/JclRepositoryExpertC50.res
===================================================================
(Binary files differ)
Modified: trunk/jcl/packages/c6/JclRepositoryExpert.res
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2006-11-03 10:48:42
|
Revision: 1810
http://svn.sourceforge.net/jcl/?rev=1810&view=rev
Author: outchy
Date: 2006-11-03 02:48:22 -0800 (Fri, 03 Nov 2006)
Log Message:
-----------
pcre source and licence files
Added Paths:
-----------
trunk/thirdparty/pcre/
trunk/thirdparty/pcre/LICENCE.txt
trunk/thirdparty/pcre/pcre-6.7.tar.gz
Added: trunk/thirdparty/pcre/LICENCE.txt
===================================================================
--- trunk/thirdparty/pcre/LICENCE.txt (rev 0)
+++ trunk/thirdparty/pcre/LICENCE.txt 2006-11-03 10:48:22 UTC (rev 1810)
@@ -0,0 +1,68 @@
+PCRE LICENCE
+------------
+
+PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+Release 6 of PCRE is distributed under the terms of the "BSD" licence, as
+specified below. The documentation for PCRE, supplied in the "doc"
+directory, is distributed under the same terms as the software itself.
+
+The basic library functions are written in C and are freestanding. Also
+included in the distribution is a set of C++ wrapper functions.
+
+
+THE BASIC LIBRARY FUNCTIONS
+---------------------------
+
+Written by: Philip Hazel
+Email local part: ph10
+Email domain: cam.ac.uk
+
+University of Cambridge Computing Service,
+Cambridge, England. Phone: +44 1223 334714.
+
+Copyright (c) 1997-2006 University of Cambridge
+All rights reserved.
+
+
+THE C++ WRAPPER FUNCTIONS
+-------------------------
+
+Contributed by: Google Inc.
+
+Copyright (c) 2006, Google Inc.
+All rights reserved.
+
+
+THE "BSD" LICENCE
+-----------------
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the name of Google
+ Inc. nor the names of their contributors may be used to endorse or
+ promote products derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+End
Property changes on: trunk/thirdparty/pcre/LICENCE.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/thirdparty/pcre/pcre-6.7.tar.gz
===================================================================
(Binary files differ)
Property changes on: trunk/thirdparty/pcre/pcre-6.7.tar.gz
___________________________________________________________________
Name: svn:mime-type
+ application/x-compressed-tar
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ob...@us...> - 2006-10-31 10:59:45
|
Revision: 1809
http://svn.sourceforge.net/jcl/?rev=1809&view=rev
Author: obones
Date: 2006-10-31 02:59:37 -0800 (Tue, 31 Oct 2006)
Log Message:
-----------
GZ support functional. Might need extending, but it is already able to open and save GZ files.
Modified Paths:
--------------
trunk/jcl/source/common/JclCompression.pas
Modified: trunk/jcl/source/common/JclCompression.pas
===================================================================
--- trunk/jcl/source/common/JclCompression.pas 2006-10-30 18:04:11 UTC (rev 1808)
+++ trunk/jcl/source/common/JclCompression.pas 2006-10-31 10:59:37 UTC (rev 1809)
@@ -158,10 +158,67 @@
end;
// GZIP Support
- TJclGZIPCompressionStream = class(TJclCompressionStream)
+ // Format is described in RFC 1952, http://www.faqs.org/rfcs/rfc1952.html
+ TJclGZIPCompressionStream = class(TJclCompressStream)
+ private
+ FComment: string;
+ FOriginalDateTime: TDateTime;
+ FOriginalFileName: string;
+ FHeaderWritten: Boolean;
+ FZlStream: TJclZlibCompressStream;
+
+ FOriginalSize: Cardinal;
+ FCRC32: Cardinal;
+ FCompressionLevel: TJclCompressionLevel;
+
+ procedure WriteHeader;
+ procedure ZlStreamProgress(Sender: TObject);
+ public
+ constructor Create(Destination: TStream; CompressionLevel: TJclCompressionLevel = -1);
+ destructor Destroy; override;
+ function Write(const Buffer; Count: Longint): Longint; override;
+ procedure Reset; override;
+
+ // IMPORTANT: In order to get a valid GZip file, Flush MUST be called after
+ // the last call to Write.
+ function Flush: Integer; override;
+
+ // Note: In order for most decompressors to work, the original file name
+ // must be given or they would display an empty file name in their list.
+ // This does not affect the decompression stream below as it simply reads
+ // the value and does not work with it
+ property OriginalFileName: string read FOriginalFileName write FOriginalFileName;
+ property OriginalDateTime: TDateTime read FOriginalDateTime write FOriginalDateTime;
+ property Comment: string read FComment write FComment;
end;
TJclGZIPDecompressionStream = class(TJclDecompressStream)
+ private
+ FZlStream: TJclZLibDecompressStream;
+ FMemStream: TMemoryStream;
+
+ FHeaderRead: Boolean;
+ FOriginalFileName: string;
+ FComment: string;
+ FOriginalDateTime: TDateTime;
+ FCRC16: Word;
+ FCompressedDataSize: Int64;
+ FCRC32: Cardinal;
+ FOriginalSize: Cardinal;
+
+ function ReadHeader: Boolean;
+ procedure ZlStreamProgress(Sender: TObject);
+ public
+ destructor Destroy; override;
+
+ function Read(var Buffer; Count: Longint): Longint; override;
+
+ property OriginalFileName: string read FOriginalFileName;
+ property OriginalSize: Cardinal read FOriginalSize;
+ property OriginalDateTime: TDateTime read FOriginalDateTime;
+ property Comment: string read FComment;
+ property CRC16: Word read FCRC16;
+ property CRC32: Cardinal read FCRC32;
end;
// RAR Support
@@ -226,7 +283,7 @@
implementation
uses
- JclResources;
+ JclResources, JclDateTime;
const
JclDefaultBufferSize = 131072; // 128k
@@ -513,6 +570,8 @@
end;
function TJclZLibDecompressStream.Read(var Buffer; Count: Longint): Longint;
+var
+ Res: Integer;
begin
if not FInflateInitialized then
begin
@@ -540,7 +599,8 @@
if ZLibRecord.avail_in > 0 then
begin
- ZLibCheck(inflate(ZLibRecord, Z_NO_FLUSH));
+ Res := inflate(ZLibRecord, Z_NO_FLUSH);
+ ZLibCheck(Res);
Progress(Self);
end;
end;
@@ -561,6 +621,268 @@
FWindowBits := Value;
end;
+//=== { TJclGZIPCompressionStream } ==========================================
+
+constructor TJclGZIPCompressionStream.Create(Destination: TStream;
+ CompressionLevel: TJclCompressionLevel);
+begin
+ inherited Create(Destination);
+
+ FCompressionLevel := CompressionLevel;
+ FCRC32 := crc32(0, nil, 0);
+end;
+
+destructor TJclGZIPCompressionStream.Destroy;
+begin
+ FZlStream.Free;
+
+ inherited Destroy;
+end;
+
+function TJclGZIPCompressionStream.Flush: Integer;
+begin
+ if Assigned(FZlStream) then
+ Result := FZlStream.Flush
+ else
+ Result := 0;
+
+ // Write trailer, CRC32 followed by ISIZE
+ FStream.Write(FCRC32, SizeOf(FCRC32));
+ FStream.Write(FOriginalSize, SizeOf(FOriginalSize));
+
+ Inc(Result, SizeOf(FCRC32) + SizeOf(FOriginalSize));
+end;
+
+procedure TJclGZIPCompressionStream.Reset;
+begin
+ if Assigned(FZlStream) then
+ FZlStream.Reset;
+
+ FCRC32 := crc32(0, nil, 0);
+ FOriginalSize := 0;
+end;
+
+function TJclGZIPCompressionStream.Write(const Buffer; Count: Integer): Longint;
+begin
+ if not FHeaderWritten then
+ begin
+ WriteHeader;
+ FHeaderWritten := True;
+ end;
+
+ if not Assigned(FZlStream) then
+ begin
+ FZlStream := TJclZlibCompressStream.Create(FStream, FCompressionLevel);
+ FZlStream.WindowBits := -DEF_WBITS; // negative value for raw mode
+ FZlStream.OnProgress := ZlStreamProgress;
+ end;
+
+ Result := FZlStream.Write(Buffer, Count);
+ FCRC32 := crc32(FCRC32, PBytef(@Buffer), Result);
+ Inc(FOriginalSize, Result);
+end;
+
+procedure TJclGZIPCompressionStream.WriteHeader;
+var
+ Dummy: Byte;
+ UnixTimeStamp: Cardinal;
+ Flags: Byte;
+begin
+ // ID1
+ Dummy := $1F;
+ FStream.Write(Dummy, 1);
+ // ID2
+ Dummy := $8B;
+ FStream.Write(Dummy, 1);
+
+ // Compression Method, always deflate
+ Dummy := 8;
+ FStream.Write(Dummy, 1);
+
+ // Flags
+ Flags := $00;
+ if Length(FOriginalFileName) > 0 then
+ Flags := Flags or $08;
+ if Length(FComment) > 0 then
+ Flags := Flags or $10;
+ FStream.Write(Flags, 1);
+
+ // MTIME
+ UnixTimeStamp := DateTimeToUnixTime(OriginalDateTime);
+ FStream.Write(UnixTimeStamp, SizeOf(UnixTimeStamp));
+
+ // No extras
+ Dummy := $0;
+ FStream.Write(Dummy, 1);
+
+ // Unknown OS
+ Dummy := $FF;
+ FStream.Write(Dummy, 1);
+
+ // FileName, if any
+ if Length(FOriginalFileName) > 0 then
+ begin
+ FStream.Write(FOriginalFileName[1], Length(FOriginalFileName));
+ Dummy := $0;
+ FStream.Write(Dummy, 1);
+ end;
+
+ // Comment, if any
+ if Length(FComment) > 0 then
+ begin
+ FStream.Write(FComment[1], Length(FComment));
+ Dummy := $0;
+ FStream.Write(Dummy, 1);
+ end;
+end;
+
+procedure TJclGZIPCompressionStream.ZlStreamProgress(Sender: TObject);
+begin
+ Progress(Self);
+end;
+
+//=== { TJclGZIPDecompressionStream } ========================================
+
+destructor TJclGZIPDecompressionStream.Destroy;
+begin
+ FZlStream.Free;
+ FMemStream.Free;
+
+ inherited Destroy;
+end;
+
+function TJclGZIPDecompressionStream.Read(var Buffer; Count: Integer): Longint;
+begin
+ if not FHeaderRead then
+ begin
+ if not ReadHeader then
+ begin
+ Result := 0;
+ Exit;
+ end;
+ FHeaderRead := True;
+ end;
+
+ if not Assigned(FZlStream) then
+ begin
+ FMemStream := TMemoryStream.Create;
+ FMemStream.CopyFrom(FStream, FCompressedDataSize);
+ FMemStream.Position := 0;
+ FZlStream := TJclZLibDecompressStream.Create(FMemStream, -DEF_WBITS); // negative value for raw mode
+ FZlStream.OnProgress := ZlStreamProgress;
+
+ // we are now positionned right in front of CRC32 and ISIZE and we can
+ // thus read them
+ FStream.Read(FCRC32, SizeOf(FCRC32));
+ FStream.Read(FOriginalSize, SizeOf(FOriginalSize));
+ end;
+
+ Result := FZlStream.Read(Buffer, Count);
+end;
+
+function TJclGZIPDecompressionStream.ReadHeader: Boolean;
+var
+ ID1: Byte;
+ ID2: Byte;
+ CM: Byte;
+ Flags: Byte;
+ HasHeaderCRC16: Boolean;
+ HasExtra: Boolean;
+ HasName: Boolean;
+ HasComment: Boolean;
+ Dummy: Byte;
+ OriginalTimeStamp: Cardinal;
+ ExtraLength: Word;
+ I: Integer;
+begin
+ Result := False;
+
+ // ID
+ FStream.Read(ID1, 1);
+ FStream.Read(ID2, 1);
+ if (ID1 <> $1F) or (ID2 <> $8B) then
+ begin
+ // Invalid ID
+ Exit;
+ end;
+
+ // Compression method
+ FStream.Read(CM, 1);
+ if CM <> 8 then
+ begin
+ // Invalid compression method, only deflate is known
+ Exit;
+ end;
+
+ // Flags
+ FStream.Read(Flags, 1);
+ if Flags and $E0 <> $00 then
+ begin
+ // Extra flags, don't know what to do with them
+ Exit;
+ end;
+
+ HasHeaderCRC16 := Flags and $02 = $02;
+ HasExtra := Flags and $04 = $04;
+ HasName := Flags and $08 = $08;
+ HasComment := Flags and $10 = $10;
+
+ // Original modification time
+ FStream.Read(OriginalTimeStamp, SizeOf(OriginalTimeStamp));
+ FOriginalDateTime := UnixTimeToDateTime(OriginalTimeStamp);
+
+ // Extra flags and OS are ignored
+ FStream.Read(Dummy, 1);
+ FStream.Read(Dummy, 1);
+
+ // If file has extra, ignore it
+ if HasExtra then
+ begin
+ FStream.Read(ExtraLength, SizeOf(ExtraLength));
+
+ for I := 0 to ExtraLength - 1 do
+ FStream.Read(Dummy, 1);
+ end;
+
+ // Read name, if present
+ FOriginalFileName := '';
+ if HasName then
+ begin
+ FStream.Read(Dummy, 1);
+ while Dummy <> 0 do
+ begin
+ FOriginalFileName := FOriginalFileName + Chr(Dummy);
+ FStream.Read(Dummy, 1);
+ end;
+ end;
+
+ // Read comment, if present
+ FComment := '';
+ if HasComment then
+ begin
+ FStream.Read(Dummy, 1);
+ while Dummy <> 0 do
+ begin
+ FComment := FComment + Chr(Dummy);
+ FStream.Read(Dummy, 1);
+ end;
+ end;
+
+ // Read CRC16, if present
+ FCRC16 := 0;
+ if HasHeaderCRC16 then
+ FStream.Read(FCRC16, SizeOf(FCRC16));
+
+ FCompressedDataSize := FStream.Size - FStream.Position - 2 * SizeOf(Cardinal);
+
+ Result := True;
+end;
+
+procedure TJclGZIPDecompressionStream.ZlStreamProgress(Sender: TObject);
+begin
+ Progress(Self);
+end;
+
//=== { TJclBZLibCompressionStream } =========================================
(*
{ Error checking helper }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|