Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-08-23 12:04:21 +0000
committerStijn Buys <ingar@osirion.org>2008-08-23 12:04:21 +0000
commit02e9a70009f79064043033abc5e597930aa11079 (patch)
tree606615f7ed162f9acc1e91f03b9745a12637d41a /src/filesystem
parent375b7d96a3974a03416c600b579048e48f1580a2 (diff)
PNG support
Diffstat (limited to 'src/filesystem')
-rw-r--r--src/filesystem/diskfile.cc5
-rw-r--r--src/filesystem/diskfile.h1
-rw-r--r--src/filesystem/file.cc5
-rw-r--r--src/filesystem/file.h2
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;