remove Rewind()

This commit is contained in:
Glenn Maynard
2004-12-09 10:44:07 +00:00
parent c87fd69606
commit 6761eb7a51
3 changed files with 0 additions and 29 deletions
-6
View File
@@ -44,7 +44,6 @@ public:
virtual int Read(void *buffer, size_t bytes);
virtual int Write(const void *buffer, size_t bytes);
virtual int Flush();
virtual void Rewind();
virtual int Seek( int offset );
virtual RageFileObj *Copy( RageFile &p ) const;
virtual CString GetDisplayPath() const { return path; }
@@ -359,11 +358,6 @@ int RageFileObjDirect::Write( const void *buf, size_t bytes )
return bytes;
}
void RageFileObjDirect::Rewind()
{
lseek( fd, 0, SEEK_SET );
}
int RageFileObjDirect::Seek( int offset )
{
return lseek( fd, offset, SEEK_SET );
-5
View File
@@ -68,11 +68,6 @@ public:
return bytes;
}
void Rewind()
{
m_iFilePos = 0;
}
int Seek( int offset )
{
m_iFilePos = clamp( offset, 0, GetFileSize() );
-18
View File
@@ -83,7 +83,6 @@ public:
~RageFileObjZipDeflated();
int Read(void *buffer, size_t bytes);
int Write(const void *buffer, size_t bytes) { SetError( "Not implemented" ); return -1; }
void Rewind();
int Seek( int offset );
int GetFileSize() { return info.uncompr_size; }
RageFileObj *Copy( RageFile &p ) const
@@ -106,12 +105,6 @@ public:
int Read(void *buffer, size_t bytes);
int Write(const void *buffer, size_t bytes) { SetError( "Not implemented" ); return -1; }
void Rewind()
{
zip.Seek( info.data_offset );
FilePos = 0;
}
int Seek( int offset );
int GetFileSize() { return info.uncompr_size; }
@@ -568,17 +561,6 @@ int RageFileObjZipDeflated::Read( void *buf, size_t bytes )
return ret;
}
void RageFileObjZipDeflated::Rewind()
{
inflateReset( &dstrm );
decomp_buf_ptr = decomp_buf;
decomp_buf_avail = 0;
zip.Seek( info.data_offset );
CFilePos = 0;
UFilePos = 0;
}
int RageFileObjZipDeflated::Seek( int iPos )
{
/* Optimization: if offset is the end of the file, it's a lseek(0,SEEK_END). Don't