* nested types fixed

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@436 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
skalogryz
2008-04-22 11:13:59 +00:00
parent 7574dbc5dc
commit 783f9c197f
4 changed files with 241 additions and 88 deletions

View File

@@ -145,6 +145,7 @@ type
{ TStructField } { TStructField }
TStructField = class(TEntity) TStructField = class(TEntity)
{updated} {updated}
protected protected
@@ -184,7 +185,7 @@ type
{ TTypeDef } { TTypeDef }
//C token - any type, including unsigned short //C token - any type, including unsigned short
TTypeDefSpecs = set of (td_Unsigned, td_Signed, td_Volitale, td_Const, td_Long, td_Short, td_Char, td_Int); TTypeDefSpecs = set of (td_Unsigned, td_Signed, td_Volitale, td_Const, td_InOut, td_Long, td_Short, td_Char, td_Int);
{updated} {updated}
TTypeDef = class(TEntity) TTypeDef = class(TEntity)
@@ -206,8 +207,8 @@ type
function DoParse(AParser: TTextParser): Boolean; override; function DoParse(AParser: TTextParser): Boolean; override;
public public
_Inherited : AnsiString; _Inherited : AnsiString;
_Type : TEntity;
_TypeName : AnsiString; _TypeName : AnsiString;
_Type : TEntity;
end; end;
{ TObjCParameterDef } { TObjCParameterDef }
@@ -316,8 +317,59 @@ function CToPascalNumeric(const Cnum: AnsiString): AnsiString;
function IsTypePointer(AType: TEntity; DefResult: Boolean ): Boolean; function IsTypePointer(AType: TEntity; DefResult: Boolean ): Boolean;
function ErrExpectStr(const Expected, Found: AnsiString): AnsiString; function ErrExpectStr(const Expected, Found: AnsiString): AnsiString;
function IsTypeOrTypeDef(const Token: AnsiString): Boolean;
function ParseTypeOrTypeDef(AParser: TTextParser; Owner: TEntity; var Ent: TEntity): Boolean;
function IsTypeDefEntity(Ent: TEntity): Boolean;
function isEmptyStruct(AStruct: TStructTypeDef): Boolean;
implementation implementation
function IsTypeDefEntity(Ent: TEntity): Boolean;
begin
Result := (Ent is TTypeDef) or (Ent is TStructTypeDef)
or (Ent is TUnionTypeDef) or (Ent is TTypeNameDef) or (Ent is TEnumTypeDef);
end;
function IsTypeOrTypeDef(const Token: AnsiString): Boolean;
begin
Result := false;
if Token = '' then Exit;
case Token[1] of
't': Result := Token = 'typedef';
'e': Result := Token = 'enum';
's': Result := Token = 'struct';
'u': Result := Token = 'union';
end;
end;
function ParseTypeOrTypeDef(AParser: TTextParser; Owner: TEntity; var Ent: TEntity): Boolean;
var
s : AnsiString;
tt : TTokenType;
begin
AParser.FindNextToken(s, tt);
Result := (tt = tt_Ident) and IsTypeOrTypeDef(s);
if (not Result) then begin
AParser.Index := AParser.TokenPos;
Exit;
end;
if s = 'typedef' then begin
AParser.Index := AParser.TokenPos;
Ent := TTypeNameDef.Create(Owner);
Result := Ent.Parse(AParser);
end else begin
AParser.Index := AParser.TokenPos;
Ent := ParseTypeDef(Owner, AParser);
Result := Assigned(ent);
AParser.FindNextToken(s, tt);
Result := (tt=tt_Symbol) and (s = ';');
end;
end;
// isPointer returned the * is declared // isPointer returned the * is declared
// isPointerRef return the ** is declared // isPointerRef return the ** is declared
procedure ParsePointerDef(AParser: TTextParser; var isPointer, isPointerRef: Boolean); procedure ParsePointerDef(AParser: TTextParser; var isPointer, isPointerRef: Boolean);
@@ -840,6 +892,7 @@ var
tt : TTokenType; tt : TTokenType;
cnt : Integer; cnt : Integer;
mtd : TClassMethodDef; mtd : TClassMethodDef;
ent : TEntity;
begin begin
Result := false; Result := false;
AParser.FindNextToken(s, tt); AParser.FindNextToken(s, tt);
@@ -893,7 +946,13 @@ begin
mtd := TClassMethodDef.Create(Self); mtd := TClassMethodDef.Create(Self);
mtd.Parse(AParser); mtd.Parse(AParser);
Items.Add(mtd); Items.Add(mtd);
end else if IsTypeOrTypeDef(s) then begin
AParser.Index := AParser.TokenPos;
if ParseTypeOrTypeDef(AParser, Self, ent) then
Items.Add(ent);
//AParser.FindNextToken(s, tt);
end; end;
end; end;
until (s = '@end') or (s = ''); // looking for declaration end until (s = '@end') or (s = ''); // looking for declaration end
Result := true; Result := true;
@@ -1041,23 +1100,6 @@ end;
{ TResultTypeDef } { TResultTypeDef }
const
TypeDefReserved : array [0..1] of AnsiString = (
'unsigned', 'const'
);
function IsTypeDefReserved(const s: AnsiString): Boolean;
var
i : integer;
begin
Result := false;
for i := 0 to length(TypeDefReserved) - 1 do
if TypeDefReserved[i] = s then begin
Result := true;
Exit;
end;
end;
function TObjCResultTypeDef.DoParse(AParser: TTextParser): Boolean; function TObjCResultTypeDef.DoParse(AParser: TTextParser): Boolean;
var var
s : AnsiString; s : AnsiString;
@@ -1336,13 +1378,12 @@ begin
AParser.SetError( ErrExpectStr('Type name identifier', _TypeName) ); AParser.SetError( ErrExpectStr('Type name identifier', _TypeName) );
Exit; Exit;
end; end;
_inherited := GetTypeNameFromEntity(_Type); _inherited := GetTypeNameFromEntity( _Type );
AParser.FindNextToken(s, tt); // skip last ';'; AParser.FindNextToken(s, tt); // skip last ';';
Result := true; Result := true;
end; end;
{ TStructTypeDef } { TStructTypeDef }
function TStructTypeDef.DoParse(AParser: TTextParser): Boolean; function TStructTypeDef.DoParse(AParser: TTextParser): Boolean;
@@ -1464,10 +1505,10 @@ begin
Result := true; Result := true;
if (s = 'volitle') then begin if (s = 'volitle') then begin
SpecVal := [td_Volitale]; SpecVal := [td_Volitale];
SpecMask := [td_Volitale, td_Const]; SpecMask := [td_Volitale];
end else if (s = 'const') then begin end else if (s = 'const') then begin
SpecVal := [td_Volitale]; SpecVal := [td_Const];
SpecMask := [td_Volitale, td_Const]; SpecMask := [td_InOut, td_Const];
end else if (s = 'signed') then begin end else if (s = 'signed') then begin
SpecVal := [td_Signed]; SpecVal := [td_Signed];
SpecMask := [td_Signed, td_Unsigned]; SpecMask := [td_Signed, td_Unsigned];
@@ -1486,6 +1527,9 @@ begin
end else if (s = 'int') then begin end else if (s = 'int') then begin
SpecVal := [td_Int]; SpecVal := [td_Int];
SpecMask := [td_Int]; SpecMask := [td_Int];
end else if (s = 'inout') then begin
SpecVal := [td_inout];
SpecMask := [td_inout, td_const];
end else end else
Result := false; Result := false;
end; end;
@@ -1617,4 +1661,18 @@ begin
//ie: struct POINT {int x; int y} point; //ie: struct POINT {int x; int y} point;
end; end;
function isEmptyStruct(AStruct: TStructTypeDef): Boolean;
var
i : integer;
begin
for i := 0 to AStruct.Items.Count - 1 do
if TEntity(AStruct.Items[i]) is TStructField then begin
Result := false;
Exit;
end;
Result := true;
end;
end. end.

View File

@@ -116,12 +116,14 @@ begin
end; end;
end; end;
// 'result' is considered reserved word!
function IsPascalReserved(const s: AnsiString): Boolean; function IsPascalReserved(const s: AnsiString): Boolean;
var var
ls : AnsiString; ls : AnsiString;
begin begin
//todo: a hash table should be used? //todo: a hash table should be used!
Result := true; Result := false;
if s = '' then Exit; if s = '' then Exit;
ls := AnsiLowerCase(s); ls := AnsiLowerCase(s);
case ls[1] of case ls[1] of
@@ -142,7 +144,7 @@ begin
'p': 'p':
Result := (ls = 'packed') or (ls = 'popstack') or (ls = 'private') or (ls = 'procedure') or (ls = 'program') or (ls = 'property') Result := (ls = 'packed') or (ls = 'popstack') or (ls = 'private') or (ls = 'procedure') or (ls = 'program') or (ls = 'property')
or (ls = 'protected') or (ls = 'public'); or (ls = 'protected') or (ls = 'public');
'r': Result := (ls = 'raise') or (ls = 'record') or (ls = 'reintroduce') or (ls = 'repeat'); 'r': Result := (ls = 'raise') or (ls = 'record') or (ls = 'reintroduce') or (ls = 'repeat') or (ls = 'result');
's': Result := (ls = 'self') or (ls = 'set') or (ls = 'shl') or (ls = 'shr') or (ls = 'stdcall') or (ls = 'string'); 's': Result := (ls = 'self') or (ls = 'set') or (ls = 'shl') or (ls = 'shr') or (ls = 'stdcall') or (ls = 'string');
't': Result := (ls = 'then') or (ls = 'to') or (ls = 'true') or (ls = 'try') or (ls = 'type'); 't': Result := (ls = 'then') or (ls = 'to') or (ls = 'true') or (ls = 'try') or (ls = 'type');
'u': Result := (ls = 'unimplemented') or (ls = 'unit') or (ls = 'until') or (ls = 'uses'); 'u': Result := (ls = 'unimplemented') or (ls = 'unit') or (ls = 'until') or (ls = 'uses');
@@ -876,12 +878,15 @@ var
s : AnsiString; s : AnsiString;
begin begin
i := subs.Count; i := subs.Count;
if not isEmptyStruct(struct) then begin
WriteOutRecord(struct, Prefix, RecPrefix, subs); WriteOutRecord(struct, Prefix, RecPrefix, subs);
s := subs[i]; s := subs[i];
Delete(s, 1, length(Prefix)); Delete(s, 1, length(Prefix));
s := Prefix + struct._Name + ' = ' + s; s := Prefix + struct._Name + ' = ' + s;
subs[i] := s; subs[i] := s;
end else begin
subs.Add(Prefix + struct._Name + ' = Pointer;');
end;
end; end;
function WriteOutTypeDefName(const NewType, FromType: AnsiSTring; isPointer: Boolean): AnsiString; function WriteOutTypeDefName(const NewType, FromType: AnsiSTring; isPointer: Boolean): AnsiString;
@@ -1410,7 +1415,8 @@ begin
if res._IsClassMethod then res._Name := res._Name + '_' if res._IsClassMethod then res._Name := res._Name + '_'
else if mtd._IsClassMethod then mtd._Name := mtd._Name + '_'; else if mtd._IsClassMethod then mtd._Name := mtd._Name + '_';
end; end;
if IsPascalReserved(mtd._Name) then mtd._Name := mtd._Name + '_'; if IsPascalReserved(mtd._Name) then
mtd._Name := mtd._Name + '_';
end; end;
finally finally
mtdnames.Free; mtdnames.Free;
@@ -1418,10 +1424,74 @@ begin
//nothing todo... //nothing todo...
end; end;
procedure AppleHeaderFix(ent : TEntity); procedure FastPack(Items: TList);
var
i, j : INteger;
begin
j := 0;
for i := 0 to Items.Count - 1 do
if Assigned(Items[i]) then begin
Items[j] := Items[i];
inc(j);
end;
Items.Count := j;
end;
procedure FixObjCClassTypeDef(ent: TEntity);
var var
i : Integer; i : Integer;
j : Integer; j : Integer;
cl : TClassDef;
begin
for i := 0 to ent.Items.Count - 1 do begin
if not (TObject(ent.Items[i]) is TClassDef) then Continue;
cl := TClassDef(ent.Items[i]);
for j := 0 to cl.Items.Count - 1 do begin
if not IsTypeDefEntity(cl.Items[j]) then Continue;
ent.Items.Add(cl.Items[j]);
TEntity(cl.Items[j]).Owner := ent;
cl.Items[j] := nil;
end;
end;
FastPack(ent.Items);
end;
procedure FixEmptyStruct(var ent: TEntity);
var
i : Integer;
td : TTypeDef;
dis : TEntity;
begin
(*
if not Assigned(ent) then Exit;
if (ent is TStructTypeDef) and isEmptyStruct(TStructTypeDef(ent) ) then begin
td := TTypeDef.Create(ent.Owner);
td._Name := TStructTypeDef(ent)._Name;
//td._IsPointer := true;
for i := 0 to ent.Items.Count - 1 do begin
td.Items.Add(ent.Items[i]);
TEntity(ent.Items[i]).Owner := td;
end;
dis := ent;
ent := td;
dis.Free;
end;
for i := 0 to ent.Items.Count - 1 do begin
dis := TEntity(ent.Items[i]);
FixEmptyStruct(dis);
ent.Items[i] := dis;
end;
*)
//hack and work-around :(
{if ent is TTypeNameDef then
FixEmptyStruct( TTypeNameDef(ent)._Type);}
end;
procedure AppleHeaderFix(ent : TEntity);
var
i : Integer;
obj : TEntity; obj : TEntity;
begin begin
// i := 0; // i := 0;
@@ -1447,17 +1517,12 @@ begin
end; end;
// packing list, removing nil references. // packing list, removing nil references.
j := 0; FastPack(ent.Items);
for i := 0 to ent.Items.Count - 1 do FixObjCClassTypeDef(ent);
if Assigned(ent.Items[i]) then begin FixEmptyStruct(ent);
ent.Items[j] := ent.Items[i];
inc(j);
end;
ent.Items.Count := j;
for i := 0 to ent.Items.Count - 1 do begin for i := 0 to ent.Items.Count - 1 do
AppleHeaderFix( TEntity(ent.Items[i])); AppleHeaderFix( TEntity(ent.Items[i]));
end;
end; end;

View File

@@ -13,7 +13,7 @@
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
<UseAppBundle Value="False"/> <UseAppBundle Value="False"/>
<ActiveEditorIndexAtStart Value="2"/> <ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<VersionInfo> <VersionInfo>
<ProjectVersion Value=""/> <ProjectVersion Value=""/>
@@ -35,28 +35,28 @@
<Filename Value="objcparser.pas"/> <Filename Value="objcparser.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="Project1"/> <UnitName Value="Project1"/>
<CursorPos X="1" Y="8"/> <CursorPos X="1" Y="6"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="74"/> <UsageCount Value="80"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="ObjCParserUtils.pas"/> <Filename Value="ObjCParserUtils.pas"/>
<UnitName Value="ObjCParserUtils"/> <UnitName Value="ObjCParserUtils"/>
<CursorPos X="1" Y="24"/> <CursorPos X="1" Y="7"/>
<TopLine Value="18"/> <TopLine Value="1"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="34"/> <UsageCount Value="37"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="ObjCParserTypes.pas"/> <Filename Value="ObjCParserTypes.pas"/>
<UnitName Value="ObjCParserTypes"/> <UnitName Value="ObjCParserTypes"/>
<CursorPos X="1" Y="187"/> <CursorPos X="1" Y="9"/>
<TopLine Value="177"/> <TopLine Value="1"/>
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<UsageCount Value="34"/> <UsageCount Value="37"/>
<Bookmarks Count="1"> <Bookmarks Count="1">
<Item0 X="1" Y="612" ID="0"/> <Item0 X="1" Y="612" ID="0"/>
</Bookmarks> </Bookmarks>
@@ -67,50 +67,50 @@
<UnitName Value="foundation"/> <UnitName Value="foundation"/>
<CursorPos X="28" Y="10"/> <CursorPos X="28" Y="10"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="../appkit/AppKit.inc"/> <Filename Value="../appkit/AppKit.inc"/>
<CursorPos X="18" Y="156"/> <CursorPos X="18" Y="156"/>
<TopLine Value="156"/> <TopLine Value="156"/>
<UsageCount Value="11"/> <UsageCount Value="10"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
<Filename Value="../../objc/objc.pas"/> <Filename Value="../../objc/objc.pas"/>
<UnitName Value="objc"/> <UnitName Value="objc"/>
<CursorPos X="32" Y="38"/> <CursorPos X="32" Y="38"/>
<TopLine Value="36"/> <TopLine Value="36"/>
<UsageCount Value="12"/> <UsageCount Value="11"/>
</Unit5> </Unit5>
<Unit6> <Unit6>
<Filename Value="../../objc/objc-api.inc"/> <Filename Value="../../objc/objc-api.inc"/>
<CursorPos X="106" Y="9"/> <CursorPos X="106" Y="9"/>
<TopLine Value="8"/> <TopLine Value="8"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
<Filename Value="../appkit/NSActionCell.inc"/> <Filename Value="../appkit/NSActionCell.inc"/>
<CursorPos X="49" Y="34"/> <CursorPos X="49" Y="34"/>
<TopLine Value="13"/> <TopLine Value="13"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit7> </Unit7>
<Unit8> <Unit8>
<Filename Value="../appkit/NSCell.inc"/> <Filename Value="../appkit/NSCell.inc"/>
<CursorPos X="1" Y="48"/> <CursorPos X="1" Y="48"/>
<TopLine Value="42"/> <TopLine Value="42"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
<Filename Value="../foundation/NSGeometry.inc"/> <Filename Value="../foundation/NSGeometry.inc"/>
<CursorPos X="1" Y="46"/> <CursorPos X="1" Y="46"/>
<TopLine Value="26"/> <TopLine Value="26"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
<Filename Value="../foundation/NSObject.inc"/> <Filename Value="../foundation/NSObject.inc"/>
<CursorPos X="37" Y="302"/> <CursorPos X="37" Y="302"/>
<TopLine Value="302"/> <TopLine Value="302"/>
<UsageCount Value="14"/> <UsageCount Value="17"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit10> </Unit10>
<Unit11> <Unit11>
@@ -119,165 +119,194 @@
<UnitName Value="pascodeutils"/> <UnitName Value="pascodeutils"/>
<CursorPos X="1" Y="13"/> <CursorPos X="1" Y="13"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="71"/> <UsageCount Value="77"/>
</Unit11> </Unit11>
<Unit12> <Unit12>
<Filename Value="../appkit/NSWindow.inc"/> <Filename Value="../appkit/NSWindow.inc"/>
<CursorPos X="37" Y="302"/> <CursorPos X="37" Y="302"/>
<TopLine Value="302"/> <TopLine Value="302"/>
<UsageCount Value="16"/> <UsageCount Value="19"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit12> </Unit12>
<Unit13> <Unit13>
<Filename Value="test.inc"/> <Filename Value="test.inc"/>
<CursorPos X="9" Y="18"/> <CursorPos X="9" Y="18"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit13> </Unit13>
<Unit14> <Unit14>
<Filename Value="NSWindow.h"/> <Filename Value="NSWindow.h"/>
<CursorPos X="35" Y="194"/> <CursorPos X="35" Y="194"/>
<TopLine Value="172"/> <TopLine Value="172"/>
<UsageCount Value="24"/> <UsageCount Value="23"/>
<SyntaxHighlighter Value="C++"/> <SyntaxHighlighter Value="C++"/>
</Unit14> </Unit14>
<Unit15> <Unit15>
<Filename Value="../../objc/objc-runtime.inc"/> <Filename Value="../../objc/objc-runtime.inc"/>
<CursorPos X="1" Y="127"/> <CursorPos X="1" Y="127"/>
<TopLine Value="127"/> <TopLine Value="127"/>
<UsageCount Value="12"/> <UsageCount Value="11"/>
</Unit15> </Unit15>
<Unit16> <Unit16>
<Filename Value="headers/NSScreen.h"/> <Filename Value="headers/NSScreen.h"/>
<CursorPos X="1" Y="9"/> <CursorPos X="1" Y="9"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
<SyntaxHighlighter Value="C++"/> <SyntaxHighlighter Value="C++"/>
</Unit16> </Unit16>
<Unit17> <Unit17>
<Filename Value="../foundation/NSAutoreleasePool.inc"/> <Filename Value="../foundation/NSAutoreleasePool.inc"/>
<CursorPos X="16" Y="12"/> <CursorPos X="16" Y="12"/>
<TopLine Value="12"/> <TopLine Value="12"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit17> </Unit17>
<Unit18> <Unit18>
<Filename Value="../appkit/NSButton.inc"/> <Filename Value="../appkit/NSButton.inc"/>
<CursorPos X="23" Y="15"/> <CursorPos X="23" Y="15"/>
<TopLine Value="12"/> <TopLine Value="12"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit18> </Unit18>
<Unit19> <Unit19>
<Filename Value="../appkit/NSControl.inc"/> <Filename Value="../appkit/NSControl.inc"/>
<CursorPos X="21" Y="151"/> <CursorPos X="21" Y="151"/>
<TopLine Value="139"/> <TopLine Value="139"/>
<UsageCount Value="13"/> <UsageCount Value="12"/>
</Unit19> </Unit19>
<Unit20> <Unit20>
<Filename Value="headers/NSButton.h"/> <Filename Value="headers/NSButton.h"/>
<CursorPos X="1" Y="23"/> <CursorPos X="1" Y="23"/>
<TopLine Value="4"/> <TopLine Value="4"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
<SyntaxHighlighter Value="C++"/> <SyntaxHighlighter Value="C++"/>
</Unit20> </Unit20>
<Unit21> <Unit21>
<Filename Value="NSWindow.inc"/> <Filename Value="NSWindow.inc"/>
<CursorPos X="51" Y="447"/> <CursorPos X="51" Y="447"/>
<TopLine Value="442"/> <TopLine Value="442"/>
<UsageCount Value="19"/> <UsageCount Value="18"/>
</Unit21> </Unit21>
<Unit22> <Unit22>
<Filename Value="NSWindow2.h"/> <Filename Value="NSWindow2.h"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<CursorPos X="44" Y="16"/> <CursorPos X="44" Y="16"/>
<TopLine Value="11"/> <TopLine Value="11"/>
<UsageCount Value="52"/> <UsageCount Value="58"/>
<SyntaxHighlighter Value="C++"/> <SyntaxHighlighter Value="C++"/>
</Unit22> </Unit22>
<Unit23> <Unit23>
<Filename Value="../uikit/UIKit.h"/> <Filename Value="../uikit/UIKit.h"/>
<CursorPos X="1" Y="31"/> <CursorPos X="1" Y="31"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
<SyntaxHighlighter Value="C++"/> <SyntaxHighlighter Value="C++"/>
</Unit23> </Unit23>
<Unit24> <Unit24>
<Filename Value="../appkit/NSAlert.inc"/> <Filename Value="../appkit/NSAlert.inc"/>
<CursorPos X="1" Y="61"/> <CursorPos X="1" Y="61"/>
<TopLine Value="38"/> <TopLine Value="38"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit24> </Unit24>
<Unit25> <Unit25>
<Filename Value="../appkit/NSPanel.inc"/> <Filename Value="../appkit/NSPanel.inc"/>
<CursorPos X="1" Y="34"/> <CursorPos X="1" Y="34"/>
<TopLine Value="11"/> <TopLine Value="11"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit25> </Unit25>
<Unit26> <Unit26>
<Filename Value="../appkit/NSView.inc"/> <Filename Value="../appkit/NSView.inc"/>
<CursorPos X="5" Y="136"/> <CursorPos X="5" Y="136"/>
<TopLine Value="121"/> <TopLine Value="121"/>
<UsageCount Value="13"/> <UsageCount Value="12"/>
</Unit26> </Unit26>
<Unit27> <Unit27>
<Filename Value="headersMacOS/NSWindow.inc"/> <Filename Value="headersMacOS/NSWindow.inc"/>
<CursorPos X="37" Y="302"/> <CursorPos X="37" Y="302"/>
<TopLine Value="302"/> <TopLine Value="302"/>
<UsageCount Value="12"/> <UsageCount Value="11"/>
</Unit27> </Unit27>
<Unit28> <Unit28>
<Filename Value="../appkit/appkit.pas"/> <Filename Value="../appkit/appkit.pas"/>
<UnitName Value="appkit"/> <UnitName Value="appkit"/>
<CursorPos X="1" Y="7"/> <CursorPos X="1" Y="7"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="11"/> <UsageCount Value="10"/>
</Unit28> </Unit28>
<Unit29> <Unit29>
<Filename Value="NSFontPanelUnit.pas"/> <Filename Value="NSFontPanelUnit.pas"/>
<UnitName Value="NSFontPanelUnit"/> <UnitName Value="NSFontPanelUnit"/>
<CursorPos X="25" Y="93"/> <CursorPos X="25" Y="93"/>
<TopLine Value="79"/> <TopLine Value="79"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit29> </Unit29>
<Unit30> <Unit30>
<Filename Value="objc.pas"/> <Filename Value="objc.pas"/>
<UnitName Value="objc"/> <UnitName Value="objc"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit30> </Unit30>
<Unit31> <Unit31>
<Filename Value="/usr/local/share/fpcsrc/rtl/objpas/sysutils/finah.inc"/> <Filename Value="/usr/local/share/fpcsrc/rtl/objpas/sysutils/finah.inc"/>
<CursorPos X="10" Y="28"/> <CursorPos X="10" Y="28"/>
<TopLine Value="18"/> <TopLine Value="18"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit31> </Unit31>
<Unit32> <Unit32>
<Filename Value="/usr/local/share/fpcsrc/rtl/objpas/sysutils/fina.inc"/> <Filename Value="/usr/local/share/fpcsrc/rtl/objpas/sysutils/fina.inc"/>
<CursorPos X="1" Y="41"/> <CursorPos X="1" Y="41"/>
<TopLine Value="34"/> <TopLine Value="34"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit32> </Unit32>
<Unit33> <Unit33>
<Filename Value="NSAlert.inc"/> <Filename Value="NSAlert.inc"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit33> </Unit33>
<Unit34> <Unit34>
<Filename Value="NSAffineTransform.h"/> <Filename Value="NSAffineTransform.h"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
<SyntaxHighlighter Value="C++"/> <SyntaxHighlighter Value="C++"/>
</Unit34> </Unit34>
<Unit35> <Unit35>
<Filename Value="NSAffineTransform.inc"/> <Filename Value="NSAffineTransform.inc"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit35> </Unit35>
</Units> </Units>
<JumpHistory Count="0" HistoryIndex="-1"/> <JumpHistory Count="7" HistoryIndex="6">
<Position1>
<Filename Value="objcparser.pas"/>
<Caret Line="259" Column="37" TopLine="250"/>
</Position1>
<Position2>
<Filename Value="objcparser.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="objcparser.pas"/>
<Caret Line="301" Column="20" TopLine="294"/>
</Position3>
<Position4>
<Filename Value="objcparser.pas"/>
<Caret Line="305" Column="7" TopLine="292"/>
</Position4>
<Position5>
<Filename Value="objcparser.pas"/>
<Caret Line="306" Column="19" TopLine="299"/>
</Position5>
<Position6>
<Filename Value="objcparser.pas"/>
<Caret Line="220" Column="31" TopLine="207"/>
</Position6>
<Position7>
<Filename Value="objcparser.pas"/>
<Caret Line="299" Column="1" TopLine="288"/>
</Position7>
</JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>

View File

@@ -303,8 +303,9 @@ end;
var var
inpf : AnsiString = ''; inpf : AnsiString = '';
st : TStrings = nil; st : TStrings = nil;
i : integer;
err : AnsiString = ''; err : AnsiString = '';
i : integer;
begin begin
try try
GetConvertSettings(ConvertSettings, inpf); GetConvertSettings(ConvertSettings, inpf);