diff options
Diffstat (limited to 'common/savefile.cpp')
-rw-r--r-- | common/savefile.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/common/savefile.cpp b/common/savefile.cpp index 02234a9a78..aa6e54b9f1 100644 --- a/common/savefile.cpp +++ b/common/savefile.cpp @@ -73,8 +73,10 @@ public: ::fclose(fh); } - bool readingFailed() const { return ferror(fh) != 0; } - bool writingFailed() const { return ferror(fh) != 0; } + bool eos() const { return feof(fh) != 0; } + bool ioFailed() const { return ferror(fh) != 0; } + void clearIOFailed() { clearerr(fh); } + bool isOpen() const { return fh != 0; } uint32 read(void *buf, uint32 cnt) { @@ -101,8 +103,10 @@ public: ::gzclose(fh); } - bool readingFailed() const { return _ioError; } - bool writingFailed() const { return _ioError; } + bool eos() const { return gzeof(fh) != 0; } + bool ioFailed() const { return _ioError; } + void clearIOFailed() { _ioError = false; } + bool isOpen() const { return fh != 0; } uint32 read(void *buf, uint32 cnt) { |