diff options
author | David Corrales | 2007-08-01 22:07:50 +0000 |
---|---|---|
committer | David Corrales | 2007-08-01 22:07:50 +0000 |
commit | 1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7 (patch) | |
tree | 57e08541d48d6a98fc7f700f75dade472a2878bb /backends/file/symbian | |
parent | 9752c75f407c8bd82006222433fcc3618b9e82bb (diff) | |
download | scummvm-rg350-1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7.tar.gz scummvm-rg350-1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7.tar.bz2 scummvm-rg350-1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7.zip |
Initial commit of the new BaseFile implementation. It provides a common ground for file objects across platforms and divides responsibilities between the Common::File class and a base file implementation.
Also rearranged the factories into a new directory for clarity.
Note 1: The posix-file.h and cpp files are for testing only. Only the ds, ps2 and symbian architecture will use special BaseFile based objects.
Note 2: The current code does not yet make use of this new structure, since the Common::File remains intact.
svn-id: r28395
Diffstat (limited to 'backends/file/symbian')
-rw-r--r-- | backends/file/symbian/symbian-file.cpp | 0 | ||||
-rw-r--r-- | backends/file/symbian/symbian-file.h | 29 |
2 files changed, 29 insertions, 0 deletions
diff --git a/backends/file/symbian/symbian-file.cpp b/backends/file/symbian/symbian-file.cpp new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/backends/file/symbian/symbian-file.cpp diff --git a/backends/file/symbian/symbian-file.h b/backends/file/symbian/symbian-file.h new file mode 100644 index 0000000000..7807a9355a --- /dev/null +++ b/backends/file/symbian/symbian-file.h @@ -0,0 +1,29 @@ +#ifdef __SYMBIAN32__ + #undef feof + #undef clearerr + + #define FILE void + + FILE* symbian_fopen(const char* name, const char* mode); + void symbian_fclose(FILE* handle); + size_t symbian_fread(const void* ptr, size_t size, size_t numItems, FILE* handle); + size_t symbian_fwrite(const void* ptr, size_t size, size_t numItems, FILE* handle); + bool symbian_feof(FILE* handle); + long int symbian_ftell(FILE* handle); + int symbian_fseek(FILE* handle, long int offset, int whence); + void symbian_clearerr(FILE* handle); + + // Only functions used in the ScummVM source have been defined here! + #define fopen(name, mode) symbian_fopen(name, mode) + #define fclose(handle) symbian_fclose(handle) + #define fread(ptr, size, items, file) symbian_fread(ptr, size, items, file) + #define fwrite(ptr, size, items, file) symbian_fwrite(ptr, size, items, file) + #define feof(handle) symbian_feof(handle) + #define ftell(handle) symbian_ftell(handle) + #define fseek(handle, offset, whence) symbian_fseek(handle, offset, whence) + #define clearerr(handle) symbian_clearerr(handle) +#endif + +#if defined(UNIX) || defined(__SYMBIAN32__) +#include <errno.h> +#endif
\ No newline at end of file |