diff options
author | Stijn Buys <ingar@osirion.org> | 2008-08-23 12:04:21 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-08-23 12:04:21 +0000 |
commit | 02e9a70009f79064043033abc5e597930aa11079 (patch) | |
tree | 606615f7ed162f9acc1e91f03b9745a12637d41a /src/filesystem | |
parent | 375b7d96a3974a03416c600b579048e48f1580a2 (diff) |
PNG support
Diffstat (limited to 'src/filesystem')
-rw-r--r-- | src/filesystem/diskfile.cc | 5 | ||||
-rw-r--r-- | src/filesystem/diskfile.h | 1 | ||||
-rw-r--r-- | src/filesystem/file.cc | 5 | ||||
-rw-r--r-- | src/filesystem/file.h | 2 |
4 files changed, 13 insertions, 0 deletions
diff --git a/src/filesystem/diskfile.cc b/src/filesystem/diskfile.cc index 56e2727..6554f1e 100644 --- a/src/filesystem/diskfile.cc +++ b/src/filesystem/diskfile.cc @@ -20,6 +20,11 @@ DiskFile::~DiskFile() fclose(diskfile_handle); } +FILE *DiskFile::handle() +{ + return diskfile_handle; +} + bool DiskFile::open(const char *filename) { if (diskfile_handle) { diff --git a/src/filesystem/diskfile.h b/src/filesystem/diskfile.h index b71576d..7da1a88 100644 --- a/src/filesystem/diskfile.h +++ b/src/filesystem/diskfile.h @@ -31,6 +31,7 @@ public: virtual size_t read(void *buffer, size_t count); + virtual FILE *handle(); void skip(size_t count); private: diff --git a/src/filesystem/file.cc b/src/filesystem/file.cc index 07f8870..91ac9f9 100644 --- a/src/filesystem/file.cc +++ b/src/filesystem/file.cc @@ -13,5 +13,10 @@ File::File() {} File::~File() {} +FILE *File::handle() +{ + return 0; +} + } // namespace filesystem diff --git a/src/filesystem/file.h b/src/filesystem/file.h index 37ac8b4..daef174 100644 --- a/src/filesystem/file.h +++ b/src/filesystem/file.h @@ -27,6 +27,8 @@ public: /// close file virtual void close() = 0; + virtual FILE *handle(); + /// read bytes virtual size_t read(void *buffer, size_t count) = 0; |