Implement GetFPos; SetFPos placeholder

This commit is contained in:
Iliyas Jorio 2020-12-15 23:27:12 +01:00
parent 3ee40824cc
commit e8939dbc8a
2 changed files with 21 additions and 0 deletions

View File

@ -340,6 +340,23 @@ OSErr SetEOF(short refNum, long logEOF)
return unimpErr;
}
OSErr GetFPos(short refNum, long* filePos)
{
if (!IsRefNumLegal(refNum)) return rfNumErr;
if (!IsStreamOpen(refNum)) return fnOpnErr;
auto& f = GetStream(refNum);
*filePos = (long) f.tellg();
return noErr;
}
OSErr SetFPos(short refNum, long filePos)
{
TODO();
return unimpErr;
}
FSSpec Pomme::Files::HostPathToFSSpec(const fs::path& fullPath)
{
return dynamic_cast<HostVolume*>(volumes[0].get())->ToFSSpec(fullPath);

View File

@ -62,6 +62,10 @@ OSErr GetEOF(short refNum, long* logEOF);
OSErr SetEOF(short refNum, long logEOF);
OSErr GetFPos(short refNum, long* filePos);
OSErr SetFPos(short refNum, long filePos);
//-----------------------------------------------------------------------------
// Resource file management