mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-21 18:29:20 +02:00
+ implemented TOmfObjInput.CanReadObjData
git-svn-id: trunk@30864 -
This commit is contained in:
parent
91d3cb1cd0
commit
29a1c74e34
@ -121,6 +121,7 @@ interface
|
|||||||
|
|
||||||
TOmfObjInput = class(TObjInput)
|
TOmfObjInput = class(TObjInput)
|
||||||
constructor create;override;
|
constructor create;override;
|
||||||
|
class function CanReadObjData(AReader:TObjectreader):boolean;override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TMZExeOutput }
|
{ TMZExeOutput }
|
||||||
@ -890,6 +891,20 @@ implementation
|
|||||||
cobjdata:=TOmfObjData;
|
cobjdata:=TOmfObjData;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class function TOmfObjInput.CanReadObjData(AReader: TObjectreader): boolean;
|
||||||
|
var
|
||||||
|
b: Byte;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
if AReader.Read(b,sizeof(b)) then
|
||||||
|
begin
|
||||||
|
if b=RT_THEADR then
|
||||||
|
{ TODO: check additional fields }
|
||||||
|
result:=true;
|
||||||
|
end;
|
||||||
|
AReader.Seek(0);
|
||||||
|
end;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TMZExeOutput
|
TMZExeOutput
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
Loading…
Reference in New Issue
Block a user