codetools: implemented function to convert simple functions to constants, h2pas: new tools to reduce IFDEFs and fucntions to constant conversion

git-svn-id: trunk@11761 -
This commit is contained in:
mattias 2007-08-08 18:22:43 +00:00
parent 3b1bf0495f
commit d48eb4b364
12 changed files with 644 additions and 292 deletions

View File

@ -198,6 +198,8 @@ type
function FixAliasDefinitions(TreeOfCodeTreeNodeExt: TAVLTree;
SourceChangeCache: TSourceChangeCache): boolean;
function FindConstFunctions(out TreeOfCodeTreeNodeExt: TAVLTree): boolean;
function ReplaceConstFunctions(TreeOfCodeTreeNodeExt: TAVLTree;
SourceChangeCache: TSourceChangeCache): boolean;
// custom class completion
function InitClassCompletion(const UpperClassName: string;
@ -1217,7 +1219,8 @@ var
begin
Result:=false;
if SourceChangeCache=nil then exit;
if (TreeOfCodeTreeNodeExt=nil) or (TreeOfCodeTreeNodeExt.Count=0) then exit;
if (TreeOfCodeTreeNodeExt=nil) or (TreeOfCodeTreeNodeExt.Count=0) then
exit(true);
SourceChangeCache.MainScanner:=Scanner;
NodesToDo:=TAVLTree.Create;
@ -1313,6 +1316,7 @@ end;
function TCodeCompletionCodeTool.FindAliasDefinitions(out
TreeOfCodeTreeNodeExt: TAVLTree; OnlyWrongType: boolean): boolean;
// finds all public definitions of the form 'const A = B;'
var
NodeExt: TCodeTreeNodeExtension;
AllNodes: TAVLTree;
@ -1410,12 +1414,12 @@ function TCodeCompletionCodeTool.FixAliasDefinitions(
): boolean;
begin
Result:=false;
raise Exception.Create('TCodeCompletionCodeTool.FixAliasDefinitions not implemented yet');
end;
function TCodeCompletionCodeTool.FindConstFunctions(
out TreeOfCodeTreeNodeExt: TAVLTree): boolean;
{ find dummy functions that can be replaced with a constant
{ find public dummy functions that can be replaced with a constant
For example:
function MPI_CONVERSION_FN_NULL : PMPI_Datarep_conversion_function;
@ -1423,16 +1427,89 @@ function TCodeCompletionCodeTool.FindConstFunctions(
MPI_CONVERSION_FN_NULL:=PMPI_Datarep_conversion_function(0);
end;
Where the expression only contains unit wide defined types, constants,
variables, built-in functions and no members nor functions.
Where the expression only contains unit defined types, constants,
variables, built-in const functions and no members nor functions.
NodeExt.Txt: description
NodeExt.Node: definition node
NodeExt.Data: function body node
NodeExt.ExtTxt1: ExtractCode(ExprStart,ExprEnd,[]);
}
var
Definitions: TAVLTree;
procedure CheckProcNode(ProcNode: TCodeTreeNode);
// check if node is a function (not class function)
var
Node: TCodeTreeNode;
FuncName: String;
ExprStart: LongInt;
NodeText: String;
NodeExt: TCodeTreeNodeExtension;
ExprEnd: LongInt;
ResultNodeExt: TCodeTreeNodeExtension;
function CheckExprIdentifier(const Identifier: string): boolean;
var
NodeExt: TCodeTreeNodeExtension;
begin
Result:=true;
if CompareIdentifiers('Result',PChar(Identifier))=0 then exit;
if CompareIdentifiers('FuncName',PChar(Identifier))=0 then exit;
// check for const and type definitions
NodeExt:=FindCodeTreeNodeExt(Definitions,Identifier);
if (NodeExt<>nil) and (NodeExt.Node<>nil) then begin
if NodeExt.Node.Desc in [ctnConstDefinition,ctnTypeDefinition] then
exit;
end;
// check for compiler built in operators, constants and types
if IsWordBuiltInFunc.DoIt(Identifier) then exit;
if WordIsBinaryOperator.DoIt(Identifier) then exit;
if WordIsPredefinedFPCIdentifier.DoIt(Identifier) then exit;
Result:=false;
end;
begin
if not NodeIsFunction(ProcNode) then exit;
if ProcNodeHasParamList(ProcNode) then exit;
if (ProcNode=nil) or (ProcNode.Desc<>ctnProcedure) then exit;
DebugLn(['CheckProcNode START ',ExtractProcHead(ProcNode,[])]);
MoveCursorToNodeStart(ProcNode);
// read 'function'
ReadNextAtom;
if not UpAtomIs('FUNCTION') then exit;
// read name
ReadNextAtom;
FuncName:=GetAtom;
ReadNextAtom;
if CurPos.Flag=cafRoundBracketOpen then begin
// skip empty parameter list ()
ReadNextAtom;
if CurPos.Flag<>cafRoundBracketClose then exit;
ReadNextAtom;
end;
// read :
if CurPos.Flag<>cafColon then exit;
// read result type
ReadNextAtom;
if not AtomIsIdentifier(false) then exit;
// check if there is a public definition of the procedure
NodeText:=GetRedefinitionNodeText(ProcNode);
if TreeOfCodeTreeNodeExt<>nil then begin
ResultNodeExt:=FindCodeTreeNodeExt(TreeOfCodeTreeNodeExt,NodeText);
if ResultNodeExt<>nil then begin
DebugLn(['CheckProcNode function exists twice']);
exit;
end;
end;
NodeExt:=FindCodeTreeNodeExt(Definitions,NodeText);
if (NodeExt=nil) or (NodeExt.Node=nil) or (NodeExt.Node.Desc<>ctnProcedure)
then begin
DebugLn(['CheckProcNode function is not public NodeText=',NodeText]);
exit;
end;
// check child nodes only contain the proc head and a begin block
Node:=ProcNode.FirstChild;
if Node=nil then exit;
if Node.Desc=ctnProcedureHead then begin
@ -1440,44 +1517,83 @@ function TCodeCompletionCodeTool.FindConstFunctions(
if Node=nil then exit;
end;
if Node.Desc<>ctnBeginBlock then exit;
DebugLn(['CheckProcNode has begin block']);
// check begin block is only a single assignment
MoveCursorToNodeStart(Node);
repeat
// read begin
ReadNextAtom;
// read 'Result' or 'FunctionName'
ReadNextAtom;
if (not UpAtomIs('RESULT')) and (not AtomIs(FuncName)) then exit;
// read :=
ReadNextAtom;
if not UpAtomIs(':=') then exit;
// read expression
ReadNextAtom;
ExprStart:=CurPos.StartPos;
ExprEnd:=ExprStart;
while (CurPos.EndPos<=Node.EndPos) do begin
if (CurPos.Flag in [cafSemicolon,cafEnd]) then
break;
// check if all identifiers can be used in a constant expression
if AtomIsIdentifier(false) and not CheckExprIdentifier(GetAtom) then
exit;
ExprEnd:=CurPos.EndPos;
ReadNextAtom;
// ToDo: check identifier
if CurPos.EndPos>Node.EndPos then break;
until false;
end;
if ExprStart=ExprEnd then exit;
DebugLn(['CheckProcNode FOUND']);
// save values
ResultNodeExt:=NodeExtMemManager.NewNode;
ResultNodeExt.Txt:=NodeText;
ResultNodeExt.Node:=NodeExt.Node;
ResultNodeExt.Data:=ProcNode;
ResultNodeExt.ExtTxt1:=ExtractCode(ExprStart,ExprEnd,[]);
if TreeOfCodeTreeNodeExt=nil then
TreeOfCodeTreeNodeExt:=TAVLTree.Create(@CompareCodeTreeNodeExt);
TreeOfCodeTreeNodeExt.Add(ResultNodeExt);
end;
procedure AddDefinition(Node: TCodeTreeNode);
var
NodeExt: TCodeTreeNodeExtension;
NodeText: String;
begin
NodeText:=GetRedefinitionNodeText(Node);
NodeExt:=FindCodeTreeNodeExt(Definitions,NodeText);
if NodeExt=nil then begin
NodeExt:=NodeExtMemManager.NewNode;
NodeExt.Txt:=NodeText;
Definitions.Add(NodeExt);
end;
NodeExt.Node:=Node;
end;
var
Node: TCodeTreeNode;
Definitions: TAVLTree;
NodeText: String;
NodeExt: TCodeTreeNodeExtension;
begin
Result:=false;
TreeOfCodeTreeNodeExt:=nil;
BuildTree(false);
if not EndOfSourceFound then exit;
// first step: find all global identifiers
// first step: find all unit identifiers (excluding implementation section)
Definitions:=TAVLTree.Create(@CompareCodeTreeNodeExt);
try
Node:=Tree.Root;
while Node<>nil do begin
case Node.Desc of
ctnProcedureHead, ctnProperty, ctnParameterList:
ctnProcedureHead, ctnProperty, ctnParameterList, ctnImplementation:
Node:=Node.NextSkipChilds;
ctnVarDefinition,ctnConstDefinition,ctnTypeDefinition,ctnEnumIdentifier:
begin
// add or update definition
NodeText:=ExtractDefinitionName(Node);
NodeExt:=FindCodeTreeNodeExt(Definitions,NodeText);
if NodeExt=nil then begin
NodeExt:=NodeExtMemManager.NewNode;
NodeExt.Txt:=NodeText;
end;
NodeExt.Node:=Node;
AddDefinition(Node);
if (Node.Desc=ctnTypeDefinition)
and (Node.FirstChild<>nil)
and (Node.FirstChild.Desc=ctnEnumerationType) then
@ -1485,6 +1601,11 @@ begin
else
Node:=Node.Next;
end;
ctnProcedure:
begin
AddDefinition(Node);
Node:=Node.NextSkipChilds;
end;
else
Node:=Node.Next;
end;
@ -1500,7 +1621,7 @@ begin
ctnProcedure:
begin
CheckProcNode(Node);
Node:=Node.Next;
Node:=Node.NextSkipChilds;
end;
else
Node:=Node.Next;
@ -1511,6 +1632,87 @@ begin
Definitions.FreeAndClear;
Definitions.Free;
end;
Result:=true;
end;
function TCodeCompletionCodeTool.ReplaceConstFunctions(
TreeOfCodeTreeNodeExt: TAVLTree; SourceChangeCache: TSourceChangeCache
): boolean;
{ replaces public dummy functions with a constant.
The function body will be removed.
See the function FindConstFunctions.
}
function IsConstSectionNeeded(Node: TCodeTreeNode): boolean;
var
AVLNode: TAVLTreeNode;
NodeExt: TCodeTreeNodeExtension;
begin
if Node.PriorBrother.Desc=ctnConstSection then exit(false);
AVLNode:=TreeOfCodeTreeNodeExt.FindLowest;
while AVLNode<>nil do begin
NodeExt:=TCodeTreeNodeExtension(AVLNode.Data);
if NodeExt.Node=Node.PriorBrother then begin
// the function in front will be replaced too
exit(false);
end;
AVLNode:=TreeOfCodeTreeNodeExt.FindSuccessor(AVLNode);
end;
Result:=true;
end;
var
AVLNode: TAVLTreeNode;
NodeExt: TCodeTreeNodeExtension;
DefNode: TCodeTreeNode;
BodyNode: TCodeTreeNode;
Expr: String;
FromPos: LongInt;
ToPos: LongInt;
NewSrc: String;
begin
Result:=false;
if SourceChangeCache=nil then exit;
if (TreeOfCodeTreeNodeExt=nil) or (TreeOfCodeTreeNodeExt.Count=0) then
exit(true);
SourceChangeCache.MainScanner:=Scanner;
AVLNode:=TreeOfCodeTreeNodeExt.FindLowest;
while AVLNode<>nil do begin
NodeExt:=TCodeTreeNodeExtension(AVLNode.Data);
DebugLn(['TCodeCompletionCodeTool.ReplaceConstFunctions ',NodeExt.Txt]);
DefNode:=NodeExt.Node;
BodyNode:=TCodeTreeNode(NodeExt.Data);
Expr:=NodeExt.ExtTxt1;
DebugLn(['TCodeCompletionCodeTool.ReplaceConstFunctions Expr=',Expr]);
// remove body node
FromPos:=FindLineEndOrCodeInFrontOfPosition(BodyNode.StartPos);
ToPos:=FindLineEndOrCodeAfterPosition(BodyNode.EndPos);
if (ToPos<=SrcLen) and (Src[ToPos] in [#10,#13]) then begin
inc(ToPos);
if (ToPos<=SrcLen) and (Src[ToPos] in [#10,#13])
and (Src[ToPos-1]<>Src[ToPos]) then
inc(ToPos);
end;
DebugLn(['TCodeCompletionCodeTool.ReplaceConstFunctions Body="',copy(Src,FromPos,ToPos-FromPos),'"']);
SourceChangeCache.Replace(gtNone,gtNone,FromPos,ToPos,'');
// replace definition
FromPos:=DefNode.StartPos;
ToPos:=DefNode.EndPos;
if Src[ToPos]=';' then inc(ToPos);// add semicolon
NewSrc:=GetIndentStr(SourceChangeCache.BeautifyCodeOptions.Indent)
+ExtractProcName(DefNode,[])+' = '+Expr+';';
SourceChangeCache.Replace(gtNone,gtNone,FromPos,ToPos,NewSrc);
// add 'const' keyword
if IsConstSectionNeeded(DefNode) then begin
FromPos:=FindLineEndOrCodeInFrontOfPosition(DefNode.StartPos);
SourceChangeCache.Replace(gtEmptyLine,gtNewLine,FromPos,FromPos,'const');
end;
AVLNode:=TreeOfCodeTreeNodeExt.FindSuccessor(AVLNode);
end;
Result:=SourceChangeCache.Apply;
end;
function TCodeCompletionCodeTool.InitClassCompletion(

View File

@ -419,7 +419,10 @@ type
function FixAllAliasDefinitions(Code: TCodeBuffer): boolean;
function FindConstFunctions(Code: TCodeBuffer;
out TreeOfCodeTreeNodeExt: TAVLTree): boolean;
function ReplaceConstFunctions(Code: TCodeBuffer;
TreeOfCodeTreeNodeExt: TAVLTree): boolean;
function ReplaceAllConstFunctions(Code: TCodeBuffer): boolean;
// custom class completion
function InitClassCompletion(Code: TCodeBuffer;
const UpperClassName: string; out CodeTool: TCodeTool): boolean;
@ -2849,6 +2852,53 @@ begin
end;
end;
function TCodeToolManager.ReplaceConstFunctions(Code: TCodeBuffer;
TreeOfCodeTreeNodeExt: TAVLTree): boolean;
begin
{$IFDEF CTDEBUG}
DebugLn('TCodeToolManager.ReplaceConstFunctions A ',Code.Filename);
{$ENDIF}
Result:=false;
if not InitCurCodeTool(Code) then exit;
try
Result:=FCurCodeTool.ReplaceConstFunctions(TreeOfCodeTreeNodeExt,
SourceChangeCache);
except
on e: Exception do Result:=HandleException(e);
end;
end;
function TCodeToolManager.ReplaceAllConstFunctions(Code: TCodeBuffer): boolean;
var
TreeOfCodeTreeNodeExt: TAVLTree;
begin
{$IFDEF CTDEBUG}
DebugLn('TCodeToolManager.ReplaceAllConstFunctions A ',Code.Filename);
{$ENDIF}
Result:=false;
if not InitCurCodeTool(Code) then exit;
try
repeat
TreeOfCodeTreeNodeExt:=nil;
try
Result:=FCurCodeTool.FindConstFunctions(TreeOfCodeTreeNodeExt);
if (not Result) or (TreeOfCodeTreeNodeExt=nil)
or (TreeOfCodeTreeNodeExt.Count=0) then
break;
Result:=FCurCodeTool.ReplaceConstFunctions(TreeOfCodeTreeNodeExt,
SourceChangeCache);
finally
if TreeOfCodeTreeNodeExt<>nil then begin
TreeOfCodeTreeNodeExt.FreeAndClear;
TreeOfCodeTreeNodeExt.Free;
end;
end;
until not Result;
except
on e: Exception do Result:=HandleException(e);
end;
end;
function TCodeToolManager.InitClassCompletion(Code: TCodeBuffer;
const UpperClassName: string; out CodeTool: TCodeTool): boolean;
begin

View File

@ -910,6 +910,7 @@ procedure TCompilerDirectivesTree.ReduceCompilerDirectives(var Changed: boolean)
DisableDefineNode(MacroNode.LastDefineNode,Changed);
end;
MacroNode.LastReadNode:=nil;
MacroNode.LastDefineNode:=Node;
end;

View File

@ -18,6 +18,7 @@ uses
{$define HAVE_MPI_OFFSET}
{$if !defined(MPI_BUILD_PROFILING)}
var c: char;
{$ENDIF}
{$define HAVE_MPI_GREQUEST}

View File

@ -924,29 +924,32 @@ begin
IsWordBuiltInFunc:=TKeyWordFunctionList.Create;
KeyWordLists.Add(IsWordBuiltInFunc);
with IsWordBuiltInFunc do begin
Add('LOW',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('HIGH',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('LO',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('HI',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('ORD',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('PREC',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('SUCC',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('LENGTH',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('SETLENGTH',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('INC',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('DEC',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('INITIALIZE',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('FINALIZE',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('COPY',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('SIZEOF',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('WRITE',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('WRITELN',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('READ',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('READLN',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('TYPEOF',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('ASSIGNED',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('INCLUDE',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('EXCLUDE',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('LOW' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('HIGH' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('LO' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('HI' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('ORD' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('PREC' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('SUCC' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('LENGTH' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('SETLENGTH' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('INC' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('DEC' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('INITIALIZE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('FINALIZE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('COPY' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('SIZEOF' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('WRITE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('WRITELN' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('READ' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('READLN' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('TYPEOF' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('ASSIGNED' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('INCLUDE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('EXCLUDE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('EXIT' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('BREAK' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('CONTINUE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
end;
WordIsTermOperator:=TKeyWordFunctionList.Create;
@ -1308,9 +1311,6 @@ begin
Add('TRUE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('WIDECHAR' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('WIDESTRING' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('EXIT' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('BREAK' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('CONTINUE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('LONGWORD' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('WORD' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('LONGINT' ,{$ifdef FPC}@{$endif}AllwaysTrue);

View File

@ -26,7 +26,7 @@ uses
Classes, SysUtils, LCLProc, LResources, LazConfigStorage, XMLPropStorage,
Forms, Controls, Dialogs, FileUtil, FileProcs, AvgLvlTree,
// CodeTools
KeywordFuncLists, BasicCodeTools, CodeCache, CodeToolManager,
KeywordFuncLists, BasicCodeTools, CodeCache, DirectivesTree, CodeToolManager,
// IDEIntf
TextTools, IDEExternToolIntf, IDEDialogs, LazIDEIntf, SrcEditorIntf,
IDEMsgIntf, IDETextConverter;
@ -185,9 +185,23 @@ type
function Execute(aText: TIDETextConverter): TModalResult; override;
end;
{ TReduceCompilerDirectivesInUnit }
TReduceCompilerDirectivesInUnit = class(TCustomTextConverterTool)
public
class function ClassDescription: string; override;
function Execute(aText: TIDETextConverter): TModalResult; override;
end;
{ TReplaceConstFunctionsInUnit }
TReplaceConstFunctionsInUnit = class(TCustomTextConverterTool)
public
class function ClassDescription: string; override;
function Execute(aText: TIDETextConverter): TModalResult; override;
end;
{ Proposal:
- A tool to remove redefinitions
- A tool to fix "constant A=B;" to type A=B; or functions
- A tool to reorder a unit to fix forward definitions
Difficulties:
@ -1368,7 +1382,7 @@ var
i: Integer;
begin
for i:=0 to CHeaderFileCount-1 do
if CHeaderFiles[i].Enabled then exit(true);
if CHeaderFiles[i].Enabled and (not CHeaderFiles[i].Merge) then exit(true);
Result:=false;
end;
@ -1386,11 +1400,13 @@ begin
AddNewTextConverterTool(FPostH2PasTools,TRemoveSystemTypes);
AddNewTextConverterTool(FPostH2PasTools,TRemoveRedefinedPointerTypes);
AddNewTextConverterTool(FPostH2PasTools,TRemoveEmptyTypeVarConstSections);
AddNewTextConverterTool(FPostH2PasTools,TReduceCompilerDirectivesInUnit);
AddNewTextConverterTool(FPostH2PasTools,TReplaceImplicitTypes);
AddNewTextConverterTool(FPostH2PasTools,TFixArrayOfParameterType);
// the above tools fixed the syntax
// now improve the declarations
AddNewTextConverterTool(FPostH2PasTools,TRemoveRedefinitionsInUnit);
AddNewTextConverterTool(FPostH2PasTools,TReplaceConstFunctionsInUnit);
end;
function TH2PasProject.SearchIncludedCHeaderFile(aFile: TH2PasFile;
@ -2213,7 +2229,7 @@ function TRemoveRedefinedPointerTypes.Execute(aText: TIDETextConverter
): TModalResult;
{ search for
Pname = ^name;
if PName has a redefinition, delete the first one
if PName has a redefinition, delete the second one
}
var
Lines: TStrings;
@ -2234,12 +2250,11 @@ begin
PointerName:=REVar(1);
TypeName:=REVar(2);
Pattern:='^\s*'+PointerName+'\s*=\s*\^\s*'+TypeName+'\s*;';
j:=i+1;
while (j<Lines.Count-1) and (not REMatches(Line,Pattern)) do
j:=Lines.Count-1;
while (j>i) do begin
if REMatches(Lines[j],Pattern) then
Lines.Delete(j);
dec(j);
if j<Lines.Count then begin
Lines.Delete(i);
dec(i);
end;
end;
inc(i);
@ -3161,12 +3176,66 @@ function TFixAliasDefinitionsInUnit.Execute(aText: TIDETextConverter
begin
Result:=mrCancel;
if (not FilenameIsPascalUnit(aText.Filename)) then begin
DebugLn(['TRemoveRedefinitionsInUnit.Execute file is not pascal: ',aText.Filename]);
DebugLn(['TFixAliasDefinitionsInUnit.Execute file is not pascal: ',aText.Filename]);
exit(mrOk);// ignore
end;
// ToDo: finish codetools FixAllAliasDefinitions
if not CodeToolBoss.FixAllAliasDefinitions(TCodeBuffer(aText.CodeBuffer)) then begin
DebugLn(['TRemoveRedefinitionsInUnit.Execute FixAllAliasDefinitions failed ',CodeToolBoss.ErrorMessage]);
DebugLn(['TFixAliasDefinitionsInUnit.Execute FixAllAliasDefinitions failed ',CodeToolBoss.ErrorMessage]);
exit;
end;
Result:=mrOk;
end;
{ TReduceCompilerDirectivesInUnit }
class function TReduceCompilerDirectivesInUnit.ClassDescription: string;
begin
Result:='Reduce compiler directives in pascal file'#13
+'Shortens expressions in $IF directives'#13
+'and removes unneeded $IFDEF and $DEFINE directives.';
end;
function TReduceCompilerDirectivesInUnit.Execute(aText: TIDETextConverter
): TModalResult;
var
Tree: TCompilerDirectivesTree;
Code: TCodeBuffer;
Changed: Boolean;
begin
Result:=mrCancel;
Tree:=TCompilerDirectivesTree.Create;
Code:=TCodeBuffer(aText.CodeBuffer);
if not Tree.Parse(Code,CodeToolBoss.GetNestedCommentsFlagForFile(Code.Filename))
then begin
DebugLn(['TReduceCompilerDirectivesInUnit.Execute failed parsing compiler directives']);
exit;
end;
repeat
Changed:=false;
Tree.ReduceCompilerDirectives(Changed);
//Tree.WriteDebugReport;
until not Changed;
Result:=mrOk;
end;
{ TReplaceConstFunctionsInUnit }
class function TReplaceConstFunctionsInUnit.ClassDescription: string;
begin
Result:='Replace simple functions with constants';
end;
function TReplaceConstFunctionsInUnit.Execute(aText: TIDETextConverter
): TModalResult;
begin
Result:=mrCancel;
if (not FilenameIsPascalUnit(aText.Filename)) then begin
DebugLn(['TReplaceConstFunctionsInUnit.Execute file is not pascal: ',aText.Filename]);
exit(mrOk);// ignore
end;
if not CodeToolBoss.ReplaceAllConstFunctions(TCodeBuffer(aText.CodeBuffer)) then begin
DebugLn(['TReplaceConstFunctionsInUnit.Execute ReplaceAllConstFunctions failed ',CodeToolBoss.ErrorMessage]);
exit;
end;
Result:=mrOk;

View File

@ -7,6 +7,8 @@ object H2PasDialog: TH2PasDialog
VertScrollBar.Page = 548
ActiveControl = ConvertButton
Caption = 'H2PasDialog'
ClientHeight = 549
ClientWidth = 785
KeyPreview = True
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
@ -15,7 +17,7 @@ object H2PasDialog: TH2PasDialog
Position = poDesktopCenter
object MainPageControl: TPageControl
AnchorSideBottom.Control = OpenSettingsButton
Height = 509
Height = 502
Width = 785
ActivePage = FilesTabSheet
Align = alTop
@ -24,11 +26,13 @@ object H2PasDialog: TH2PasDialog
TabOrder = 4
object FilesTabSheet: TTabSheet
Caption = 'FilesTabSheet'
ClientHeight = 471
ClientWidth = 781
object CHeaderFilesCheckTreeView: TTreeView
Height = 475
Height = 471
Width = 255
Align = alLeft
DefaultItemHeight = 18
DefaultItemHeight = 19
StateImages = FileStateImageList
TabOrder = 0
OnDblClick = CHeaderFilesCheckTreeViewDblClick
@ -90,7 +94,7 @@ object H2PasDialog: TH2PasDialog
end
object CHeaderFilesSplitter1: TSplitter
Left = 255
Height = 475
Height = 471
Width = 5
Beveled = True
end
@ -102,19 +106,21 @@ object H2PasDialog: TH2PasDialog
AnchorSideBottom.Control = FilesTabSheet
AnchorSideBottom.Side = asrBottom
Left = 260
Height = 267
Height = 263
Top = 208
Width = 521
Anchors = [akTop, akLeft, akRight, akBottom]
Caption = 'FileInfoGroupBox'
ClientHeight = 244
ClientWidth = 517
TabOrder = 5
object AddIncludedCHeaderFilesButton: TButton
AnchorSideBottom.Control = FileInfoGroupBox
AnchorSideBottom.Side = asrBottom
Left = 8
Height = 30
Top = 210
Width = 249
Height = 37
Top = 201
Width = 224
Anchors = [akLeft, akBottom]
AutoSize = True
BorderSpacing.Around = 6
@ -130,8 +136,8 @@ object H2PasDialog: TH2PasDialog
AnchorSideRight.Control = FileInfoGroupBox
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = AddIncludedCHeaderFilesButton
Height = 183
Top = 21
Height = 176
Top = 19
Width = 517
Anchors = [akTop, akLeft, akRight, akBottom]
Color = clNone
@ -140,10 +146,11 @@ object H2PasDialog: TH2PasDialog
end
object MergeFileCheckBox: TCheckBox
Left = 8
Height = 24
Height = 22
Top = -3
Width = 168
Width = 146
Caption = 'MergeFileCheckBox'
OnEditingDone = MergeFileCheckBoxEditingDone
TabOrder = 2
end
end
@ -194,8 +201,10 @@ object H2PasDialog: TH2PasDialog
end
object PreH2PasTabSheet: TTabSheet
Caption = 'PreH2PasTabSheet'
ClientHeight = 471
ClientWidth = 781
object PreH2PasGroupBox: TGroupBox
Height = 475
Height = 471
Width = 781
Align = alClient
Caption = 'PreH2PasGroupBox'
@ -204,6 +213,8 @@ object H2PasDialog: TH2PasDialog
end
object h2pasOptionsTabSheet: TTabSheet
Caption = 'h2pasOptionsTabSheet'
ClientHeight = 471
ClientWidth = 781
object LibNameLabel: TLabel
AnchorSideTop.Control = LibnameEdit
AnchorSideTop.Side = asrCenter
@ -213,7 +224,6 @@ object H2PasDialog: TH2PasDialog
Width = 105
BorderSpacing.Top = 10
Caption = 'LibNameLabel'
Color = clNone
ParentColor = False
end
object OutputExtLabel: TLabel
@ -224,7 +234,6 @@ object H2PasDialog: TH2PasDialog
Top = 311
Width = 114
Caption = 'OutputExtLabel'
Color = clNone
ParentColor = False
end
object OutputDirLabel: TLabel
@ -235,7 +244,6 @@ object H2PasDialog: TH2PasDialog
Top = 340
Width = 110
Caption = 'OutputDirLabel'
Color = clNone
ParentColor = False
end
object LibnameEdit: TEdit
@ -319,8 +327,10 @@ object H2PasDialog: TH2PasDialog
end
object PostH2PasTabSheet: TTabSheet
Caption = 'PostH2PasTabSheet'
ClientHeight = 471
ClientWidth = 781
object PostH2PasGroupBox: TGroupBox
Height = 475
Height = 471
Width = 781
Align = alClient
Caption = 'PostH2PasGroupBox'
@ -329,6 +339,8 @@ object H2PasDialog: TH2PasDialog
end
object SettingsTabSheet: TTabSheet
Caption = 'SettingsTabSheet'
ClientHeight = 471
ClientWidth = 781
object H2PasFilenameLabel: TLabel
AnchorSideTop.Control = H2PasFilenameEdit
AnchorSideTop.Side = asrCenter
@ -337,7 +349,6 @@ object H2PasDialog: TH2PasDialog
Top = 7
Width = 155
Caption = 'H2PasFilenameLabel'
Color = clNone
ParentColor = False
end
object OpenLastProjectOnStartCheckBox: TCheckBox
@ -407,9 +418,9 @@ object H2PasDialog: TH2PasDialog
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 5
Height = 30
Top = 514
Width = 161
Height = 37
Top = 507
Width = 150
Anchors = [akLeft, akBottom]
AutoSize = True
BorderSpacing.Around = 5
@ -423,10 +434,10 @@ object H2PasDialog: TH2PasDialog
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 171
Height = 30
Top = 514
Width = 158
Left = 160
Height = 37
Top = 507
Width = 148
Anchors = [akLeft, akBottom]
AutoSize = True
BorderSpacing.Around = 5
@ -439,10 +450,10 @@ object H2PasDialog: TH2PasDialog
AnchorSideLeft.Control = SaveSettingsButton
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = OpenSettingsButton
Left = 344
Height = 30
Top = 514
Width = 119
Left = 323
Height = 37
Top = 507
Width = 113
AutoSize = True
BorderSpacing.Left = 15
BorderSpacing.InnerBorder = 4
@ -455,10 +466,10 @@ object H2PasDialog: TH2PasDialog
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 677
Height = 30
Top = 514
Width = 103
Left = 682
Height = 37
Top = 507
Width = 98
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Around = 5
@ -471,10 +482,10 @@ object H2PasDialog: TH2PasDialog
AnchorSideLeft.Control = ConvertButton
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = OpenSettingsButton
Left = 469
Height = 30
Top = 514
Width = 183
Left = 442
Height = 37
Top = 507
Width = 169
AutoSize = True
BorderSpacing.Left = 6
BorderSpacing.InnerBorder = 4

View File

@ -4,193 +4,197 @@ LazarusResources.Add('TH2PasDialog','FORMDATA',[
'TPF0'#12'TH2PasDialog'#11'H2PasDialog'#4'Left'#3#245#0#6'Height'#3'%'#2#3'To'
+'p'#3#205#0#5'Width'#3#17#3#18'HorzScrollBar.Page'#3#16#3#18'VertScrollBar.P'
+'age'#3'$'#2#13'ActiveControl'#7#13'ConvertButton'#7'Caption'#6#11'H2PasDial'
+'og'#10'KeyPreview'#9#12'OnCloseQuery'#7#14'FormCloseQuery'#8'OnCreate'#7#10
+'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#9'OnKeyDown'#7#11'FormKeyDown'#8
+'Position'#7#15'poDesktopCenter'#0#12'TPageControl'#15'MainPageControl'#24'A'
+'nchorSideBottom.Control'#7#18'OpenSettingsButton'#6'Height'#3#253#1#5'Width'
+#3#17#3#10'ActivePage'#7#13'FilesTabSheet'#5'Align'#7#5'alTop'#7'Anchors'#11
+#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabIndex'#2#0#8'TabOrder'#2#4
+#0#9'TTabSheet'#13'FilesTabSheet'#7'Caption'#6#13'FilesTabSheet'#0#9'TTreeVi'
+'ew'#25'CHeaderFilesCheckTreeView'#6'Height'#3#219#1#5'Width'#3#255#0#5'Alig'
+'n'#7#6'alLeft'#17'DefaultItemHeight'#2#18#11'StateImages'#7#18'FileStateIma'
+'geList'#8'TabOrder'#2#0#10'OnDblClick'#7'!CHeaderFilesCheckTreeViewDblClick'
+#11'OnMouseDown'#7'"CHeaderFilesCheckTreeViewMouseDown'#18'OnSelectionChange'
+'d'#7')CHeaderFilesCheckTreeViewSelectionChanged'#7'Options'#11#19'tvoAllowM'
+'ultiselect'#17'tvoAutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedN'
+'odes'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0
+#0#0#7'TButton'#17'AddCHeadersButton'#22'AnchorSideLeft.Control'#7#21'CHeade'
+'rFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'He'
+'ight'#2#25#3'Top'#2#12#5'Width'#3#185#0#18'BorderSpacing.Left'#2#6#25'Borde'
+'rSpacing.InnerBorder'#2#4#7'Caption'#6#17'AddCHeadersButton'#7'OnClick'#7#22
+'AddCHeadersButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'#20'DeleteCHeadersBut'
+'ton'#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLe'
+'ft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'('#5'Width'#3
+#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Captio'
+'n'#6#20'DeleteCHeadersButton'#7'OnClick'#7#25'DeleteCHeadersButtonClick'#8
+'TabOrder'#2#2#0#0#7'TButton'#23'EnableAllCHeadersButton'#22'AnchorSideLeft.'
+'Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'
+#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'H'#5'Width'#3#185#0#18'BorderSpacing'
+'.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#23'EnableAllCHead'
+'ersButton'#7'OnClick'#7#28'EnableAllCHeadersButtonClick'#8'TabOrder'#2#3#0#0
+#7'TButton'#24'DisableAllCHeadersButton'#22'AnchorSideLeft.Control'#7#21'CHe'
+'aderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6
+'Height'#2#25#3'Top'#2'h'#5'Width'#3#185#0#18'BorderSpacing.Left'#2#6#25'Bor'
+'derSpacing.InnerBorder'#2#4#7'Caption'#6#24'DisableAllCHeadersButton'#7'OnC'
+'lick'#7#29'DisableAllCHeadersButtonClick'#8'TabOrder'#2#4#0#0#9'TSplitter'
+#21'CHeaderFilesSplitter1'#4'Left'#3#255#0#6'Height'#3#219#1#5'Width'#2#5#7
+'Beveled'#9#0#0#9'TGroupBox'#16'FileInfoGroupBox'#22'AnchorSideLeft.Control'
+#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#23'Ancho'
+'rSideRight.Control'#7#13'FilesTabSheet'#20'AnchorSideRight.Side'#7#9'asrBot'
+'tom'#24'AnchorSideBottom.Control'#7#13'FilesTabSheet'#21'AnchorSideBottom.S'
+'ide'#7#9'asrBottom'#4'Left'#3#4#1#6'Height'#3#11#1#3'Top'#3#208#0#5'Width'#3
+#9#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'Caption'#6
+#16'FileInfoGroupBox'#8'TabOrder'#2#5#0#7'TButton'#29'AddIncludedCHeaderFile'
+'sButton'#24'AnchorSideBottom.Control'#7#16'FileInfoGroupBox'#21'AnchorSideB'
+'ottom.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#30#3'Top'#3#210#0#5'Widt'
+'h'#3#249#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpa'
+'cing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#29'AddInclu'
+'dedCHeaderFilesButton'#7'OnClick'#7'"AddIncludedCHeaderFilesButtonClick'#8
+'TabOrder'#2#0#0#0#5'TMemo'#12'FileInfoMemo'#22'AnchorSideLeft.Control'#7#16
+'FileInfoGroupBox'#21'AnchorSideTop.Control'#7#17'MergeFileCheckBox'#18'Anch'
+'orSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#16'FileInfoGro'
+'upBox'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'
+#7#29'AddIncludedCHeaderFilesButton'#6'Height'#3#183#0#3'Top'#2#21#5'Width'#3
+#5#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#5'Color'#7#6
+'clNone'#8'ReadOnly'#9#8'TabOrder'#2#1#0#0#9'TCheckBox'#17'MergeFileCheckBox'
+#4'Left'#2#8#6'Height'#2#24#3'Top'#2#253#5'Width'#3#168#0#7'Caption'#6#17'Me'
+'rgeFileCheckBox'#8'TabOrder'#2#2#0#0#0#7'TButton'#16'MoveFileUpButton'#22'A'
+'nchorSideLeft.Control'#7#17'AddCHeadersButton'#21'AnchorSideTop.Control'#7
+#24'DisableAllCHeadersButton'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'Ancho'
+'rSideRight.Control'#7#17'AddCHeadersButton'#20'AnchorSideRight.Side'#7#9'as'
+'rBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#3#135#0#5'Width'#3#185#0#7'An'
+'chors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#6#25'Bord'
+'erSpacing.InnerBorder'#2#4#7'Caption'#6#16'MoveFileUpButton'#7'OnClick'#7#21
,'MoveFileUpButtonClick'#8'TabOrder'#2#6#0#0#7'TButton'#18'MoveFileDownButton'
+#22'AnchorSideLeft.Control'#7#17'AddCHeadersButton'#21'AnchorSideTop.Control'
+#7#16'MoveFileUpButton'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideR'
+'ight.Control'#7#17'AddCHeadersButton'#20'AnchorSideRight.Side'#7#9'asrBotto'
+'m'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#3#166#0#5'Width'#3#185#0#7'Anchors'
+#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#6#25'BorderSpaci'
+'ng.InnerBorder'#2#4#7'Caption'#6#18'MoveFileDownButton'#7'OnClick'#7#23'Mov'
+'eFileDownButtonClick'#8'TabOrder'#2#7#0#0#7'TButton#MergeAllCHeadersExceptC'
+'urrentButton'#4'Left'#3#230#1#6'Height'#2#25#3'Top'#2#12#5'Width'#3#184#0#25
+'BorderSpacing.InnerBorder'#2#4#7'Caption'#6'#MergeAllCHeadersExceptCurrentB'
+'utton'#7'OnClick'#7'(MergeAllCHeadersExceptCurrentButtonClick'#8'TabOrder'#2
+#8#0#0#0#9'TTabSheet'#16'PreH2PasTabSheet'#7'Caption'#6#16'PreH2PasTabSheet'
+#0#9'TGroupBox'#16'PreH2PasGroupBox'#6'Height'#3#219#1#5'Width'#3#13#3#5'Ali'
+'gn'#7#8'alClient'#7'Caption'#6#16'PreH2PasGroupBox'#8'TabOrder'#2#0#0#0#0#9
+'TTabSheet'#20'h2pasOptionsTabSheet'#7'Caption'#6#20'h2pasOptionsTabSheet'#0
+#6'TLabel'#12'LibNameLabel'#21'AnchorSideTop.Control'#7#11'LibnameEdit'#18'A'
+'nchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#17#3'Top'#3#23#1#5
+'Width'#2'i'#17'BorderSpacing.Top'#2#10#7'Caption'#6#12'LibNameLabel'#5'Colo'
+'r'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#14'OutputExtLabel'#21'Anchor'
+'SideTop.Control'#7#13'OutputExtEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4
+'Left'#2#6#6'Height'#2#17#3'Top'#3'7'#1#5'Width'#2'r'#7'Caption'#6#14'Output'
+'ExtLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#14'OutputDir'
+'Label'#21'AnchorSideTop.Control'#7#13'OutputDirEdit'#18'AnchorSideTop.Side'
+#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#17#3'Top'#3'T'#1#5'Width'#2'n'#7'Cap'
+'tion'#6#14'OutputDirLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#5'TEd'
+'it'#11'LibnameEdit'#22'AnchorSideLeft.Control'#7#12'LibNameLabel'#19'Anchor'
+'SideLeft.Side'#7#9'asrBottom'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'
+#2'u'#6'Height'#2#23#3'Top'#3#20#1#5'Width'#2'q'#18'BorderSpacing.Left'#2#6
+#17'BorderSpacing.Top'#2#6#13'OnEditingDone'#7#22'LibnameEditEditingDone'#8
+'TabOrder'#2#0#4'Text'#6#11'LibnameEdit'#0#0#5'TEdit'#13'OutputExtEdit'#22'A'
+'nchorSideLeft.Control'#7#14'OutputExtLabel'#19'AnchorSideLeft.Side'#7#9'asr'
+'Bottom'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'~'#6'Height'#2#23#3
+'Top'#3'4'#1#5'Width'#2'P'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2
+#6#13'OnEditingDone'#7#24'OutputExtEditEditingDone'#8'TabOrder'#2#1#4'Text'#6
+#13'OutputExtEdit'#0#0#5'TEdit'#13'OutputDirEdit'#22'AnchorSideLeft.Control'
+#7#14'OutputDirLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTo'
+'p.Control'#7#13'OutputExtEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'
+#2'z'#6'Height'#2#23#3'Top'#3'Q'#1#5'Width'#3#141#1#18'BorderSpacing.Left'#2
+#6#17'BorderSpacing.Top'#2#6#13'OnEditingDone'#7#24'OutputDirEditEditingDone'
+#8'TabOrder'#2#2#4'Text'#6#13'OutputDirEdit'#0#0#7'TButton'#21'OutputDirBrow'
+'seButton'#22'AnchorSideLeft.Control'#7#13'OutputDirEdit'#19'AnchorSideLeft.'
+'Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#13'OutputDirEdit'#24'Ancho'
+'rSideBottom.Control'#7#13'OutputDirEdit'#21'AnchorSideBottom.Side'#7#9'asrB'
+'ottom'#4'Left'#3#7#2#6'Height'#2#23#3'Top'#3'Q'#1#5'Width'#2' '#7'Anchors'
+#11#5'akTop'#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Cap'
+'tion'#6#3'...'#7'OnClick'#7#26'OutputDirBrowseButtonClick'#8'TabOrder'#2#3#0
+#0#11'TCheckGroup'#22'h2pasOptionsCheckGroup'#4'Left'#2#6#6'Height'#3#8#1#3
+'Top'#2#4#5'Width'#3#0#3#8'AutoFill'#9#7'Caption'#6#22'h2pasOptionsCheckGrou'
+'p'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6
+#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSi'
+'zing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkH'
+'orizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScal'
+'eChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'Chil'
+'dSizing.ControlsPerLine'#2#2#7'Columns'#2#2#11'OnItemClick'#7#31'h2pasOptio'
+'nsCheckGroupItemClick'#8'TabOrder'#2#4#0#0#0#9'TTabSheet'#17'PostH2PasTabSh'
+'eet'#7'Caption'#6#17'PostH2PasTabSheet'#0#9'TGroupBox'#17'PostH2PasGroupBox'
+#6'Height'#3#219#1#5'Width'#3#13#3#5'Align'#7#8'alClient'#7'Caption'#6#17'Po'
+'stH2PasGroupBox'#8'TabOrder'#2#0#0#0#0#9'TTabSheet'#16'SettingsTabSheet'#7
+'Caption'#6#16'SettingsTabSheet'#0#6'TLabel'#18'H2PasFilenameLabel'#21'Ancho'
+'rSideTop.Control'#7#17'H2PasFilenameEdit'#18'AnchorSideTop.Side'#7#9'asrCen'
+'ter'#4'Left'#2#6#6'Height'#2#17#3'Top'#2#7#5'Width'#3#155#0#7'Caption'#6#18
+'H2PasFilenameLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#9'TCheckBox'
+#30'OpenLastProjectOnStartCheckBox'#4'Left'#2#6#6'Height'#2#24#3'Top'#2'*'#5
+'Width'#3#21#1#7'Caption'#6#30'OpenLastProjectOnStartCheckBox'#8'OnChange'#7
,'$OpenLastProjectOnStartCheckBoxChange'#8'TabOrder'#2#0#0#0#7'TButton'#20'Sa'
+'veSettingsAsButton'#4'Left'#2#6#6'Height'#2#30#3'Top'#2'R'#5'Width'#3#177#0
+#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#20'SaveSetting'
+'sAsButton'#7'OnClick'#7#25'SaveSettingsAsButtonClick'#8'TabOrder'#2#1#0#0#5
+'TEdit'#17'H2PasFilenameEdit'#22'AnchorSideLeft.Control'#7#18'H2PasFilenameL'
+'abel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#167#0#6'Height'#2#23
+#3'Top'#2#4#5'Width'#3'`'#1#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'
+#2#6#13'OnEditingDone'#7#28'H2PasFilenameEditEditingDone'#8'TabOrder'#2#2#4
+'Text'#6#17'H2PasFilenameEdit'#0#0#7'TButton'#25'h2pasFilenameBrowseButton'
+#22'AnchorSideLeft.Control'#7#17'H2PasFilenameEdit'#19'AnchorSideLeft.Side'#7
+#9'asrBottom'#21'AnchorSideTop.Control'#7#17'H2PasFilenameEdit'#24'AnchorSid'
+'eBottom.Control'#7#17'H2PasFilenameEdit'#21'AnchorSideBottom.Side'#7#9'asrB'
+'ottom'#4'Left'#3#7#2#6'Height'#2#23#3'Top'#2#4#5'Width'#2'#'#7'Anchors'#11#5
+'akTop'#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'
+#6#3'...'#7'OnClick'#7#30'h2pasFilenameBrowseButtonClick'#8'TabOrder'#2#3#0#0
+#7'TButton'#17'NewSettingsButton'#4'Left'#2#6#6'Height'#2#30#3'Top'#2'|'#5'W'
+'idth'#3#154#0#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6
+#17'NewSettingsButton'#7'OnClick'#7#22'NewSettingsButtonClick'#8'TabOrder'#2
+#4#0#0#0#0#7'TButton'#18'OpenSettingsButton'#22'AnchorSideLeft.Control'#7#5
+'Owner'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9
+'asrBottom'#4'Left'#2#5#6'Height'#2#30#3'Top'#3#2#2#5'Width'#3#161#0#7'Ancho'
+'rs'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#5#25
+'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#18'OpenSettingsButton'#7'OnClic'
+'k'#7#23'OpenSettingsButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'#18'SaveSett'
+'ingsButton'#22'AnchorSideLeft.Control'#7#18'OpenSettingsButton'#19'AnchorSi'
+'deLeft.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'Anch'
+'orSideBottom.Side'#7#9'asrBottom'#4'Left'#3#171#0#6'Height'#2#30#3'Top'#3#2
+#2#5'Width'#3#158#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#20'B'
+'orderSpacing.Around'#2#5#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#18
+'SaveSettingsButton'#7'OnClick'#7#23'SaveSettingsButtonClick'#8'TabOrder'#2#2
+#0#0#7'TButton'#13'ConvertButton'#22'AnchorSideLeft.Control'#7#18'SaveSettin'
+'gsButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7
+#18'OpenSettingsButton'#4'Left'#3'X'#1#6'Height'#2#30#3'Top'#3#2#2#5'Width'#2
+'w'#8'AutoSize'#9#18'BorderSpacing.Left'#2#15#25'BorderSpacing.InnerBorder'#2
+#4#7'Caption'#6#13'ConvertButton'#7'OnClick'#7#18'ConvertButtonClick'#8'TabO'
+'rder'#2#0#0#0#7'TButton'#11'CloseButton'#23'AnchorSideRight.Control'#7#5'Ow'
+'ner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7
+#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#165#2#6'Height'
+#2#30#3'Top'#3#2#2#5'Width'#2'g'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'Au'
+'toSize'#9#20'BorderSpacing.Around'#2#5#25'BorderSpacing.InnerBorder'#2#4#7
+'Caption'#6#11'CloseButton'#7'OnClick'#7#16'CloseButtonClick'#8'TabOrder'#2#3
+#0#0#7'TButton'#21'ConvertAndBuildButton'#22'AnchorSideLeft.Control'#7#13'Co'
+'nvertButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Contro'
+'l'#7#18'OpenSettingsButton'#4'Left'#3#213#1#6'Height'#2#30#3'Top'#3#2#2#5'W'
+'idth'#3#183#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#6#25'BorderSpacing.Inn'
+'erBorder'#2#4#7'Caption'#6#21'ConvertAndBuildButton'#7'OnClick'#7#26'Conver'
+'tAndBuildButtonClick'#8'TabOrder'#2#5#0#0#10'TImageList'#18'FileStateImageL'
+'ist'#4'left'#3#136#0#3'top'#2'^'#6'Bitmap'#10'}'#3#0#0'li'#2#0#0#0#16#0#0#0
+#16#0#0#0#191#1#0#0'/* XPM */'#10'static char * pkg_removedfiles_xpm[] = {'
+#10'"14 13 10 1",'#10'" '#9'c None",'#10'".'#9'c #000044",'#10'"+'#9'c #0000'
+'55",'#10'"@'#9'c #FF1414",'#10'"#'#9'c #000084",'#10'"$'#9'c #000033",'#10
+'"%'#9'c #FFFFFF",'#10'"&'#9'c #D5D5EF",'#10'"*'#9'c #CBCBCB",'#10'"='#9'c #'
+'000000",'#10'" ..++.... ",'#10'" .@@####. @@ ",'#10'" $%@@%%&.@@ ",'
+#10'" $*%@@..@@.. ",'#10'" =%%.@@@@... ",'#10'"...++$%@@%%&=%",'#10'".....'
+'$@@@@&&=%",'#10'".%*%%@@%%@@&=%",'#10'".*%%@@%&&&@@=%",'#10'".%%@@======@@%'
+'",'#10'".%@@&&&=%%%%@%",'#10'".@@=====% ",'#10'" %%%%%%%% "};'#10
+#168#1#0#0'/* XPM */'#10'static char * pkg_files_xpm[] = {'#10'"14 13 9 1",'
+#10'" '#9'c None",'#10'".'#9'c #000044",'#10'"+'#9'c #000055",'#10'"@'#9'c #'
+'000084",'#10'"#'#9'c #000033",'#10'"$'#9'c #FFFFFF",'#10'"%'#9'c #CBCBCB",'
+#10'"&'#9'c #D5D5EF",'#10'"*'#9'c #000000",'#10'" ..++.... ",'#10'" .@@'
+'@@@@. ",'#10'" #$%$$$&.$ ",'#10'" #%$........ ",'#10'" *$$........ '
+'",'#10'"...++#$%$$$&*$",'#10'".....#%$$$&&*$",'#10'".$%$$*$$$&$&*$",'#10'".'
+'%$$$*$&&&&&*$",'#10'".$$$$********$",'#10'".$&&&&&*$$$$$$",'#10'".*******$ '
+' ",'#10'" $$$$$$$$ "};'#10#0#0#0
+'og'#12'ClientHeight'#3'%'#2#11'ClientWidth'#3#17#3#10'KeyPreview'#9#12'OnCl'
+'oseQuery'#7#14'FormCloseQuery'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7
+#11'FormDestroy'#9'OnKeyDown'#7#11'FormKeyDown'#8'Position'#7#15'poDesktopCe'
+'nter'#0#12'TPageControl'#15'MainPageControl'#24'AnchorSideBottom.Control'#7
+#18'OpenSettingsButton'#6'Height'#3#246#1#5'Width'#3#17#3#10'ActivePage'#7#13
+'FilesTabSheet'#5'Align'#7#5'alTop'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRig'
+'ht'#8'akBottom'#0#8'TabIndex'#2#0#8'TabOrder'#2#4#0#9'TTabSheet'#13'FilesTa'
+'bSheet'#7'Caption'#6#13'FilesTabSheet'#12'ClientHeight'#3#215#1#11'ClientWi'
+'dth'#3#13#3#0#9'TTreeView'#25'CHeaderFilesCheckTreeView'#6'Height'#3#215#1#5
+'Width'#3#255#0#5'Align'#7#6'alLeft'#17'DefaultItemHeight'#2#19#11'StateImag'
+'es'#7#18'FileStateImageList'#8'TabOrder'#2#0#10'OnDblClick'#7'!CHeaderFiles'
+'CheckTreeViewDblClick'#11'OnMouseDown'#7'"CHeaderFilesCheckTreeViewMouseDow'
+'n'#18'OnSelectionChanged'#7')CHeaderFilesCheckTreeViewSelectionChanged'#7'O'
+'ptions'#11#19'tvoAllowMultiselect'#17'tvoAutoItemHeight'#16'tvoHideSelectio'
+'n'#21'tvoKeepCollapsedNodes'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShow'
+'Root'#11'tvoToolTips'#0#0#0#7'TButton'#17'AddCHeadersButton'#22'AnchorSideL'
+'eft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9'asrBot'
+'tom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2#12#5'Width'#3#185#0#18'BorderSp'
+'acing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#17'AddCHeade'
+'rsButton'#7'OnClick'#7#22'AddCHeadersButtonClick'#8'TabOrder'#2#1#0#0#7'TBu'
+'tton'#20'DeleteCHeadersButton'#22'AnchorSideLeft.Control'#7#21'CHeaderFiles'
+'Splitter1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2
+#25#3'Top'#2'('#5'Width'#3#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing'
+'.InnerBorder'#2#4#7'Caption'#6#20'DeleteCHeadersButton'#7'OnClick'#7#25'Del'
+'eteCHeadersButtonClick'#8'TabOrder'#2#2#0#0#7'TButton'#23'EnableAllCHeaders'
+'Button'#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSid'
+'eLeft.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'H'#5'Widt'
+'h'#3#185#0#18'BorderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'C'
+'aption'#6#23'EnableAllCHeadersButton'#7'OnClick'#7#28'EnableAllCHeadersButt'
+'onClick'#8'TabOrder'#2#3#0#0#7'TButton'#24'DisableAllCHeadersButton'#22'Anc'
+'horSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Side'#7#9
+'asrBottom'#4'Left'#3#10#1#6'Height'#2#25#3'Top'#2'h'#5'Width'#3#185#0#18'Bo'
+'rderSpacing.Left'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#24'Dis'
+'ableAllCHeadersButton'#7'OnClick'#7#29'DisableAllCHeadersButtonClick'#8'Tab'
+'Order'#2#4#0#0#9'TSplitter'#21'CHeaderFilesSplitter1'#4'Left'#3#255#0#6'Hei'
+'ght'#3#215#1#5'Width'#2#5#7'Beveled'#9#0#0#9'TGroupBox'#16'FileInfoGroupBox'
+#22'AnchorSideLeft.Control'#7#21'CHeaderFilesSplitter1'#19'AnchorSideLeft.Si'
+'de'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#13'FilesTabSheet'#20'Ancho'
+'rSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#13'FilesTabS'
+'heet'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#4#1#6'Height'#3#7#1
+#3'Top'#3#208#0#5'Width'#3#9#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8
+'akBottom'#0#7'Caption'#6#16'FileInfoGroupBox'#12'ClientHeight'#3#244#0#11'C'
+'lientWidth'#3#5#2#8'TabOrder'#2#5#0#7'TButton'#29'AddIncludedCHeaderFilesBu'
+'tton'#24'AnchorSideBottom.Control'#7#16'FileInfoGroupBox'#21'AnchorSideBott'
+'om.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2'%'#3'Top'#3#201#0#5'Width'#3
+#224#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.'
+'Around'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#29'AddIncludedCH'
+'eaderFilesButton'#7'OnClick'#7'"AddIncludedCHeaderFilesButtonClick'#8'TabOr'
+'der'#2#0#0#0#5'TMemo'#12'FileInfoMemo'#22'AnchorSideLeft.Control'#7#16'File'
+'InfoGroupBox'#21'AnchorSideTop.Control'#7#17'MergeFileCheckBox'#18'AnchorSi'
+'deTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#16'FileInfoGroupBo'
+'x'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#29
+'AddIncludedCHeaderFilesButton'#6'Height'#3#176#0#3'Top'#2#19#5'Width'#3#5#2
+#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#5'Color'#7#6'clNo'
+'ne'#8'ReadOnly'#9#8'TabOrder'#2#1#0#0#9'TCheckBox'#17'MergeFileCheckBox'#4
+'Left'#2#8#6'Height'#2#22#3'Top'#2#253#5'Width'#3#146#0#7'Caption'#6#17'Merg'
+'eFileCheckBox'#13'OnEditingDone'#7#28'MergeFileCheckBoxEditingDone'#8'TabOr'
+'der'#2#2#0#0#0#7'TButton'#16'MoveFileUpButton'#22'AnchorSideLeft.Control'#7
+#17'AddCHeadersButton'#21'AnchorSideTop.Control'#7#24'DisableAllCHeadersButt'
+'on'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#17
+'AddCHeadersButton'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#10#1#6
,'Height'#2#25#3'Top'#3#135#0#5'Width'#3#185#0#7'Anchors'#11#5'akTop'#6'akLef'
+'t'#7'akRight'#0#17'BorderSpacing.Top'#2#6#25'BorderSpacing.InnerBorder'#2#4
+#7'Caption'#6#16'MoveFileUpButton'#7'OnClick'#7#21'MoveFileUpButtonClick'#8
+'TabOrder'#2#6#0#0#7'TButton'#18'MoveFileDownButton'#22'AnchorSideLeft.Contr'
+'ol'#7#17'AddCHeadersButton'#21'AnchorSideTop.Control'#7#16'MoveFileUpButton'
+#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#17'AddC'
+'HeadersButton'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#10#1#6'Hei'
+'ght'#2#25#3'Top'#3#166#0#5'Width'#3#185#0#7'Anchors'#11#5'akTop'#6'akLeft'#7
+'akRight'#0#17'BorderSpacing.Top'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Ca'
+'ption'#6#18'MoveFileDownButton'#7'OnClick'#7#23'MoveFileDownButtonClick'#8
+'TabOrder'#2#7#0#0#7'TButton#MergeAllCHeadersExceptCurrentButton'#4'Left'#3
+#230#1#6'Height'#2#25#3'Top'#2#12#5'Width'#3#184#0#25'BorderSpacing.InnerBor'
+'der'#2#4#7'Caption'#6'#MergeAllCHeadersExceptCurrentButton'#7'OnClick'#7'(M'
+'ergeAllCHeadersExceptCurrentButtonClick'#8'TabOrder'#2#8#0#0#0#9'TTabSheet'
+#16'PreH2PasTabSheet'#7'Caption'#6#16'PreH2PasTabSheet'#12'ClientHeight'#3
+#215#1#11'ClientWidth'#3#13#3#0#9'TGroupBox'#16'PreH2PasGroupBox'#6'Height'#3
+#215#1#5'Width'#3#13#3#5'Align'#7#8'alClient'#7'Caption'#6#16'PreH2PasGroupB'
+'ox'#8'TabOrder'#2#0#0#0#0#9'TTabSheet'#20'h2pasOptionsTabSheet'#7'Caption'#6
+#20'h2pasOptionsTabSheet'#12'ClientHeight'#3#215#1#11'ClientWidth'#3#13#3#0#6
+'TLabel'#12'LibNameLabel'#21'AnchorSideTop.Control'#7#11'LibnameEdit'#18'Anc'
+'horSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#17#3'Top'#3#23#1#5
+'Width'#2'i'#17'BorderSpacing.Top'#2#10#7'Caption'#6#12'LibNameLabel'#11'Par'
+'entColor'#8#0#0#6'TLabel'#14'OutputExtLabel'#21'AnchorSideTop.Control'#7#13
+'OutputExtEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2
+#17#3'Top'#3'7'#1#5'Width'#2'r'#7'Caption'#6#14'OutputExtLabel'#11'ParentCol'
+'or'#8#0#0#6'TLabel'#14'OutputDirLabel'#21'AnchorSideTop.Control'#7#13'Outpu'
+'tDirEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#17#3
+'Top'#3'T'#1#5'Width'#2'n'#7'Caption'#6#14'OutputDirLabel'#11'ParentColor'#8
+#0#0#5'TEdit'#11'LibnameEdit'#22'AnchorSideLeft.Control'#7#12'LibNameLabel'
+#19'AnchorSideLeft.Side'#7#9'asrBottom'#18'AnchorSideTop.Side'#7#9'asrBottom'
+#4'Left'#2'u'#6'Height'#2#23#3'Top'#3#20#1#5'Width'#2'q'#18'BorderSpacing.Le'
+'ft'#2#6#17'BorderSpacing.Top'#2#6#13'OnEditingDone'#7#22'LibnameEditEditing'
+'Done'#8'TabOrder'#2#0#4'Text'#6#11'LibnameEdit'#0#0#5'TEdit'#13'OutputExtEd'
+'it'#22'AnchorSideLeft.Control'#7#14'OutputExtLabel'#19'AnchorSideLeft.Side'
+#7#9'asrBottom'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'~'#6'Height'
+#2#23#3'Top'#3'4'#1#5'Width'#2'P'#18'BorderSpacing.Left'#2#6#17'BorderSpacin'
+'g.Top'#2#6#13'OnEditingDone'#7#24'OutputExtEditEditingDone'#8'TabOrder'#2#1
+#4'Text'#6#13'OutputExtEdit'#0#0#5'TEdit'#13'OutputDirEdit'#22'AnchorSideLef'
+'t.Control'#7#14'OutputDirLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'A'
+'nchorSideTop.Control'#7#13'OutputExtEdit'#18'AnchorSideTop.Side'#7#9'asrBot'
+'tom'#4'Left'#2'z'#6'Height'#2#23#3'Top'#3'Q'#1#5'Width'#3#141#1#18'BorderSp'
+'acing.Left'#2#6#17'BorderSpacing.Top'#2#6#13'OnEditingDone'#7#24'OutputDirE'
+'ditEditingDone'#8'TabOrder'#2#2#4'Text'#6#13'OutputDirEdit'#0#0#7'TButton'
+#21'OutputDirBrowseButton'#22'AnchorSideLeft.Control'#7#13'OutputDirEdit'#19
+'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#13'OutputDi'
+'rEdit'#24'AnchorSideBottom.Control'#7#13'OutputDirEdit'#21'AnchorSideBottom'
+'.Side'#7#9'asrBottom'#4'Left'#3#7#2#6'Height'#2#23#3'Top'#3'Q'#1#5'Width'#2
+' '#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBor'
+'der'#2#4#7'Caption'#6#3'...'#7'OnClick'#7#26'OutputDirBrowseButtonClick'#8
+'TabOrder'#2#3#0#0#11'TCheckGroup'#22'h2pasOptionsCheckGroup'#4'Left'#2#6#6
+'Height'#3#8#1#3'Top'#2#4#5'Width'#3#0#3#8'AutoFill'#9#7'Caption'#6#22'h2pas'
+'OptionsCheckGroup'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopB'
+'ottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChild'
+'Resize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'C'
+'hildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVert'
+'ical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTo'
+'pToBottom'#27'ChildSizing.ControlsPerLine'#2#2#7'Columns'#2#2#11'OnItemClic'
+'k'#7#31'h2pasOptionsCheckGroupItemClick'#8'TabOrder'#2#4#0#0#0#9'TTabSheet'
+#17'PostH2PasTabSheet'#7'Caption'#6#17'PostH2PasTabSheet'#12'ClientHeight'#3
+#215#1#11'ClientWidth'#3#13#3#0#9'TGroupBox'#17'PostH2PasGroupBox'#6'Height'
+#3#215#1#5'Width'#3#13#3#5'Align'#7#8'alClient'#7'Caption'#6#17'PostH2PasGro'
+'upBox'#8'TabOrder'#2#0#0#0#0#9'TTabSheet'#16'SettingsTabSheet'#7'Caption'#6
+#16'SettingsTabSheet'#12'ClientHeight'#3#215#1#11'ClientWidth'#3#13#3#0#6'TL'
+'abel'#18'H2PasFilenameLabel'#21'AnchorSideTop.Control'#7#17'H2PasFilenameEd'
,'it'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#17#3'Top'
+#2#7#5'Width'#3#155#0#7'Caption'#6#18'H2PasFilenameLabel'#11'ParentColor'#8#0
+#0#9'TCheckBox'#30'OpenLastProjectOnStartCheckBox'#4'Left'#2#6#6'Height'#2#24
+#3'Top'#2'*'#5'Width'#3#21#1#7'Caption'#6#30'OpenLastProjectOnStartCheckBox'
+#8'OnChange'#7'$OpenLastProjectOnStartCheckBoxChange'#8'TabOrder'#2#0#0#0#7
+'TButton'#20'SaveSettingsAsButton'#4'Left'#2#6#6'Height'#2#30#3'Top'#2'R'#5
+'Width'#3#177#0#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6
+#20'SaveSettingsAsButton'#7'OnClick'#7#25'SaveSettingsAsButtonClick'#8'TabOr'
+'der'#2#1#0#0#5'TEdit'#17'H2PasFilenameEdit'#22'AnchorSideLeft.Control'#7#18
+'H2PasFilenameLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#167#0#6
+'Height'#2#23#3'Top'#2#4#5'Width'#3'`'#1#18'BorderSpacing.Left'#2#6#17'Borde'
+'rSpacing.Top'#2#6#13'OnEditingDone'#7#28'H2PasFilenameEditEditingDone'#8'Ta'
+'bOrder'#2#2#4'Text'#6#17'H2PasFilenameEdit'#0#0#7'TButton'#25'h2pasFilename'
+'BrowseButton'#22'AnchorSideLeft.Control'#7#17'H2PasFilenameEdit'#19'AnchorS'
+'ideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#17'H2PasFilenameEd'
+'it'#24'AnchorSideBottom.Control'#7#17'H2PasFilenameEdit'#21'AnchorSideBotto'
+'m.Side'#7#9'asrBottom'#4'Left'#3#7#2#6'Height'#2#23#3'Top'#2#4#5'Width'#2'#'
+#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'
+#2#4#7'Caption'#6#3'...'#7'OnClick'#7#30'h2pasFilenameBrowseButtonClick'#8'T'
+'abOrder'#2#3#0#0#7'TButton'#17'NewSettingsButton'#4'Left'#2#6#6'Height'#2#30
+#3'Top'#2'|'#5'Width'#3#154#0#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4
+#7'Caption'#6#17'NewSettingsButton'#7'OnClick'#7#22'NewSettingsButtonClick'#8
+'TabOrder'#2#4#0#0#0#0#7'TButton'#18'OpenSettingsButton'#22'AnchorSideLeft.C'
+'ontrol'#7#5'Owner'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBot'
+'tom.Side'#7#9'asrBottom'#4'Left'#2#5#6'Height'#2'%'#3'Top'#3#251#1#5'Width'
+#3#150#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacin'
+'g.Around'#2#5#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#18'OpenSetting'
+'sButton'#7'OnClick'#7#23'OpenSettingsButtonClick'#8'TabOrder'#2#1#0#0#7'TBu'
+'tton'#18'SaveSettingsButton'#22'AnchorSideLeft.Control'#7#18'OpenSettingsBu'
+'tton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7
+#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#160#0#6'Height'
+#2'%'#3'Top'#3#251#1#5'Width'#3#148#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8
+'AutoSize'#9#20'BorderSpacing.Around'#2#5#25'BorderSpacing.InnerBorder'#2#4#7
+'Caption'#6#18'SaveSettingsButton'#7'OnClick'#7#23'SaveSettingsButtonClick'#8
+'TabOrder'#2#2#0#0#7'TButton'#13'ConvertButton'#22'AnchorSideLeft.Control'#7
+#18'SaveSettingsButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSide'
+'Top.Control'#7#18'OpenSettingsButton'#4'Left'#3'C'#1#6'Height'#2'%'#3'Top'#3
+#251#1#5'Width'#2'q'#8'AutoSize'#9#18'BorderSpacing.Left'#2#15#25'BorderSpac'
+'ing.InnerBorder'#2#4#7'Caption'#6#13'ConvertButton'#7'OnClick'#7#18'Convert'
+'ButtonClick'#8'TabOrder'#2#0#0#0#7'TButton'#11'CloseButton'#23'AnchorSideRi'
+'ght.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSi'
+'deBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Lef'
+'t'#3#170#2#6'Height'#2'%'#3'Top'#3#251#1#5'Width'#2'b'#7'Anchors'#11#7'akRi'
+'ght'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#5#25'BorderSpac'
+'ing.InnerBorder'#2#4#7'Caption'#6#11'CloseButton'#7'OnClick'#7#16'CloseButt'
+'onClick'#8'TabOrder'#2#3#0#0#7'TButton'#21'ConvertAndBuildButton'#22'Anchor'
+'SideLeft.Control'#7#13'ConvertButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'
+#21'AnchorSideTop.Control'#7#18'OpenSettingsButton'#4'Left'#3#186#1#6'Height'
+#2'%'#3'Top'#3#251#1#5'Width'#3#169#0#8'AutoSize'#9#18'BorderSpacing.Left'#2
+#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#21'ConvertAndBuildButton'#7
+'OnClick'#7#26'ConvertAndBuildButtonClick'#8'TabOrder'#2#5#0#0#10'TImageList'
+#18'FileStateImageList'#4'left'#3#136#0#3'top'#2'^'#6'Bitmap'#10'}'#3#0#0'li'
+#2#0#0#0#16#0#0#0#16#0#0#0#191#1#0#0'/* XPM */'#10'static char * pkg_removed'
+'files_xpm[] = {'#10'"14 13 10 1",'#10'" '#9'c None",'#10'".'#9'c #000044",'
+#10'"+'#9'c #000055",'#10'"@'#9'c #FF1414",'#10'"#'#9'c #000084",'#10'"$'#9
+'c #000033",'#10'"%'#9'c #FFFFFF",'#10'"&'#9'c #D5D5EF",'#10'"*'#9'c #CBCBCB'
+'",'#10'"='#9'c #000000",'#10'" ..++.... ",'#10'" .@@####. @@ ",'#10'" '
+' $%@@%%&.@@ ",'#10'" $*%@@..@@.. ",'#10'" =%%.@@@@... ",'#10'"...++$%@@%'
+'%&=%",'#10'".....$@@@@&&=%",'#10'".%*%%@@%%@@&=%",'#10'".*%%@@%&&&@@=%",'#10
+'".%%@@======@@%",'#10'".%@@&&&=%%%%@%",'#10'".@@=====% ",'#10'" %%%%%%%'
+'% "};'#10#168#1#0#0'/* XPM */'#10'static char * pkg_files_xpm[] = {'#10
+'"14 13 9 1",'#10'" '#9'c None",'#10'".'#9'c #000044",'#10'"+'#9'c #000055",'
+#10'"@'#9'c #000084",'#10'"#'#9'c #000033",'#10'"$'#9'c #FFFFFF",'#10'"%'#9
+'c #CBCBCB",'#10'"&'#9'c #D5D5EF",'#10'"*'#9'c #000000",'#10'" ..++.... '
,'",'#10'" .@@@@@@. ",'#10'" #$%$$$&.$ ",'#10'" #%$........ ",'#10'" '
+' *$$........ ",'#10'"...++#$%$$$&*$",'#10'".....#%$$$&&*$",'#10'".$%$$*$$$&'
+'$&*$",'#10'".%$$$*$&&&&&*$",'#10'".$$$$********$",'#10'".$&&&&&*$$$$$$",'#10
+'".*******$ ",'#10'" $$$$$$$$ "};'#10#0#0#0
]);

View File

@ -110,6 +110,7 @@ type
procedure H2PasFilenameEditEditingDone(Sender: TObject);
procedure LibnameEditEditingDone(Sender: TObject);
procedure MergeAllCHeadersExceptCurrentButtonClick(Sender: TObject);
procedure MergeFileCheckBoxEditingDone(Sender: TObject);
procedure MoveFileDownButtonClick(Sender: TObject);
procedure MoveFileUpButtonClick(Sender: TObject);
procedure NewSettingsButtonClick(Sender: TObject);
@ -216,9 +217,11 @@ begin
TextConverterToolClasses.RegisterClass(TRemoveSystemTypes);
TextConverterToolClasses.RegisterClass(TRemoveRedefinedPointerTypes);
TextConverterToolClasses.RegisterClass(TRemoveEmptyTypeVarConstSections);
TextConverterToolClasses.RegisterClass(TReduceCompilerDirectivesInUnit);
TextConverterToolClasses.RegisterClass(TReplaceImplicitTypes);
TextConverterToolClasses.RegisterClass(TFixArrayOfParameterType);
TextConverterToolClasses.RegisterClass(TRemoveRedefinitionsInUnit);
TextConverterToolClasses.RegisterClass(TReplaceConstFunctionsInUnit);
end;
{ TH2PasDialog }
@ -525,6 +528,17 @@ begin
MarkAllCHeadersExceptCurrentToMerge;
end;
procedure TH2PasDialog.MergeFileCheckBoxEditingDone(Sender: TObject);
var
CurFile: TH2PasFile;
begin
if Project=nil then exit;
CurFile:=GetCurrentCHeaderFile;
if CurFile=nil then exit;
CurFile.Merge:=MergeFileCheckBox.Checked;
UpdateFileInfo;
end;
procedure TH2PasDialog.MoveFileDownButtonClick(Sender: TObject);
begin
MoveCurrentFile(1);
@ -1066,7 +1080,7 @@ begin
if not Project.HasEnabledFiles then begin
IDEMessageDialog('Nothing to do',
'No c header file is enabled, so nothing to do.',
'Please enable at least one c header file that is not merged.',
mtInformation,[mbOk],'');
Result:=mrOK;
exit;

View File

@ -743,6 +743,7 @@ constructor TCustomTextConverterTool.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
Enabled:=true;
Caption:=FirstLineOfClassDescription;
end;
procedure TCustomTextConverterTool.Assign(Source: TPersistent);

View File

@ -161,7 +161,6 @@ type
fOnNewDataSet: TDataSetNotifyEvent;
FOnRecordChanged: TFieldNotifyEvent;
FOnUpdateData: TDataSetNotifyEvent;
fOldFirstRecord: Integer;
function GetDataSetName: string;
function GetFields(Index: Integer): TField;

View File

@ -1924,7 +1924,7 @@ begin
// Important: change the BaseBounds too
OldChildBounds:=AControl.BoundsRect;
if not CompareRect(@OldChildBounds,@NewChildBounds) then begin
DebugLn(['TWinControl.DoAutoSize moving child: ',DbgSName(AControl),' Old=',dbgs(OldChildBounds),' New=',dbgs(NewChildBounds)]);
//DebugLn(['TWinControl.DoAutoSize moving child: ',DbgSName(AControl),' Old=',dbgs(OldChildBounds),' New=',dbgs(NewChildBounds)]);
AControl.BoundsRect:=NewChildBounds;
//DebugLn(['TWinControl.DoAutoSize AFTER ',DbgSName(AControl),' ',dbgs(AControl.BoundsRect)]);
end;