--- libgig/trunk/src/RIFF.h 2005/09/25 13:40:37 780 +++ libgig/trunk/src/RIFF.h 2005/11/09 20:04:11 800 @@ -78,8 +78,9 @@ /** Whether file stream is open in read or in read/write mode. */ typedef enum { - stream_mode_read, - stream_mode_read_write + stream_mode_read = 0, + stream_mode_read_write = 1, + stream_mode_closed = 2 } stream_mode_t; /** Current state of the file stream. */ @@ -144,6 +145,7 @@ unsigned long ulStartPos; /* actual position in file where chunk (without header) starts */ unsigned long ulPos; /* # of bytes from ulStartPos */ uint8_t* pChunkData; + unsigned long ulChunkDataSize; Chunk(File* pFile); Chunk(File* pFile, List* pParent, uint32_t uiChunkID, uint uiBodySize); @@ -229,7 +231,7 @@ /** Parses arbitrary RIFF files and provides together with it's base classes convenient methods to walk through the RIFF tree. */ class File : public List { public: - File(); + File(uint32_t FileType); File(const String& path); stream_mode_t GetMode(); bool SetMode(stream_mode_t NewMode); @@ -257,6 +259,11 @@ unsigned long GetFileSize(); void ResizeFile(unsigned long ulNewSize); + #if POSIX + unsigned long __GetFileSize(int hFile); + #else + unsigned long __GetFileSize(FILE* hFile); + #endif }; /** Will be thrown whenever an error occurs while parsing a RIFF file. */