bool SIMPLEAPI IsEOF(IStream* pStream) { __int64 iPos=GetStreamOffset(pStream); __int64 iEndPos=StreamSeek(pStream, 0, STREAM_SEEK_END); StreamSeek(pStream, iPos); return iPos>=iEndPos; }
__int64 SIMPLEAPI GetStreamLength(IStream* pStream) { __int64 iPos=GetStreamOffset(pStream); __int64 iEndPos=StreamSeek(pStream, 0, STREAM_SEEK_END); StreamSeek(pStream, iPos); return iEndPos; }
off_t lseek(int fd, off_t offset, int whence) { off_t pos; int ret; SYS_RET ( ret, StreamSeek (fd, offset, whence, &pos) ); return pos; }