mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 04:49:07 +02:00
+ added property tobjectreader.pos, which returns the current position when reading an object file
git-svn-id: trunk@31315 -
This commit is contained in:
parent
515d702408
commit
c3133c498a
@ -75,6 +75,7 @@ type
|
||||
procedure ReadArchive;
|
||||
protected
|
||||
function getfilename:string;override;
|
||||
function GetPos: longint;override;
|
||||
public
|
||||
constructor create(const Aarfn:string;allow_nonar:boolean=false);
|
||||
destructor destroy;override;
|
||||
@ -357,6 +358,12 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function tarobjectreader.GetPos: longint;
|
||||
begin
|
||||
result:=inherited GetPos-CurrMemberPos;
|
||||
end;
|
||||
|
||||
|
||||
function tarobjectreader.DecodeMemberName(ahdr:TArHdr):string;
|
||||
var
|
||||
hs : string;
|
||||
|
@ -66,6 +66,7 @@ type
|
||||
function readbuf:boolean;
|
||||
protected
|
||||
function getfilename : string;virtual;
|
||||
function GetPos: longint;virtual;
|
||||
public
|
||||
constructor create;
|
||||
destructor destroy;override;
|
||||
@ -76,6 +77,7 @@ type
|
||||
function readarray(a:TDynamicArray;len:longint):boolean;
|
||||
property filename : string read getfilename;
|
||||
property size:longint read bufmax;
|
||||
property Pos:longint read GetPos;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -310,4 +312,9 @@ function tobjectreader.getfilename : string;
|
||||
result:=ffilename;
|
||||
end;
|
||||
|
||||
function tobjectreader.GetPos: longint;
|
||||
begin
|
||||
Result:=bufidx;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -81,6 +81,8 @@ type
|
||||
FPageSize: Integer;
|
||||
procedure ReadLibrary;
|
||||
procedure ReadDictionary(DictionaryOffset: DWord; DictionarySizeInBlocks: Word);
|
||||
protected
|
||||
function GetPos: longint;override;
|
||||
public
|
||||
constructor create(const Aarfn:string;allow_nonar:boolean=false);
|
||||
destructor destroy;override;
|
||||
@ -399,6 +401,11 @@ implementation
|
||||
end;
|
||||
end;
|
||||
|
||||
function TOmfLibObjectReader.GetPos: longint;
|
||||
begin
|
||||
result:=inherited GetPos-CurrMemberPos;
|
||||
end;
|
||||
|
||||
constructor TOmfLibObjectReader.create(const Aarfn: string; allow_nonar: boolean);
|
||||
var
|
||||
RecType: Byte;
|
||||
|
Loading…
Reference in New Issue
Block a user