diff options
author | Max Horn | 2004-06-25 22:11:48 +0000 |
---|---|---|
committer | Max Horn | 2004-06-25 22:11:48 +0000 |
commit | e5f90509a606819dec58b7642c9845373ae364d5 (patch) | |
tree | b892289fd90878d306be42c236c18f6ea6bbf269 /backends/PalmOS/Src/palmsave.cpp | |
parent | de7c36f063eb4ee33b01bfb7be4186c7cb9fd704 (diff) | |
download | scummvm-rg350-e5f90509a606819dec58b7642c9845373ae364d5.tar.gz scummvm-rg350-e5f90509a606819dec58b7642c9845373ae364d5.tar.bz2 scummvm-rg350-e5f90509a606819dec58b7642c9845373ae364d5.zip |
Cleaned up SaveFileManager stuff a little bit
svn-id: r14056
Diffstat (limited to 'backends/PalmOS/Src/palmsave.cpp')
-rw-r--r-- | backends/PalmOS/Src/palmsave.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/backends/PalmOS/Src/palmsave.cpp b/backends/PalmOS/Src/palmsave.cpp index 1df11705a6..5e49e71ec8 100644 --- a/backends/PalmOS/Src/palmsave.cpp +++ b/backends/PalmOS/Src/palmsave.cpp @@ -37,9 +37,9 @@ public: ~PalmSaveFile(); bool isOpen() const { return file != NULL; } -protected: - int fread(void *buf, int size, int cnt); - int fwrite(const void *buf, int size, int cnt); + + uint32 read(void *buf, uint32 cnt); + uint32 write(const void *buf, uint32 cnt); private : FILE *file; @@ -67,12 +67,12 @@ PalmSaveFile::~PalmSaveFile() { } } -int PalmSaveFile::fread(void *buf, int size, int cnt) { - return ::fread(buf, size, cnt, file); +uint32 PalmSaveFile::read(void *buf, uint32 cnt) { + return ::fread(buf, 1, cnt, file); } -int PalmSaveFile::fwrite(const void *buf, int size, int cnt) { - UInt32 fullsize = size*cnt; +uint32 PalmSaveFile::write(const void *buf, uint32 cnt) { + UInt32 fullsize = cnt; if (fullsize <= MAX_BLOCK) { @@ -92,12 +92,12 @@ int PalmSaveFile::fwrite(const void *buf, int size, int cnt) { return cnt; } - return ::fwrite(buf, size, cnt, file); + return ::fwrite(buf, 1, cnt, file); } // SaveFileManager class -class PalmSaveFileManager : public SaveFileManager { +class PalmSaveFileManager : public DefaultSaveFileManager { public: void list_savefiles(const char *prefix, const char *directory, bool *marks, int num); |