Renamed File:eof to File:isEOF (closes issue #683.)

This commit is contained in:
Alex Szpakowski
2015-03-17 01:13:29 -03:00
parent 06ef263537
commit d982f02634
8 changed files with 38 additions and 38 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ bool DroppedFile::flush()
return fflush(file) == 0;
}
bool DroppedFile::eof()
bool DroppedFile::isEOF()
{
return file == nullptr || feof(file) != 0;
}
+14 -14
View File
@@ -47,20 +47,20 @@ public:
// Implements File.
using File::read;
using File::write;
bool open(Mode mode);
bool close();
bool isOpen() const;
int64 getSize();
int64 read(void *dst, int64 size);
bool write(const void *data, int64 size);
bool flush();
bool eof();
int64 tell();
bool seek(uint64 pos);
bool setBuffer(BufferMode bufmode, int64 size);
BufferMode getBuffer(int64 &size) const;
Mode getMode() const;
const std::string &getFilename() const;
bool open(Mode mode) override;
bool close() override;
bool isOpen() const override;
int64 getSize() override;
int64 read(void *dst, int64 size) override;
bool write(const void *data, int64 size) override;
bool flush() override;
bool isEOF() override;
int64 tell() override;
bool seek(uint64 pos) override;
bool setBuffer(BufferMode bufmode, int64 size) override;
BufferMode getBuffer(int64 &size) const override;
Mode getMode() const override;
const std::string &getFilename() const override;
private:
+1 -1
View File
@@ -147,7 +147,7 @@ public:
*
* @return True if EOF, false otherwise.
**/
virtual bool eof() = 0;
virtual bool isEOF() = 0;
/**
* Gets the current position in the File.
+1 -1
View File
@@ -212,7 +212,7 @@ inline bool test_eof(File *, PHYSFS_File *file)
}
#endif
bool File::eof()
bool File::isEOF()
{
return file == nullptr || test_eof(this, file);
}
+14 -14
View File
@@ -56,20 +56,20 @@ public:
// Implements love::filesystem::File.
using love::filesystem::File::read;
using love::filesystem::File::write;
bool open(Mode mode);
bool close();
bool isOpen() const;
int64 getSize();
virtual int64 read(void *dst, int64 size);
bool write(const void *data, int64 size);
bool flush();
bool eof();
int64 tell();
bool seek(uint64 pos);
bool setBuffer(BufferMode bufmode, int64 size);
BufferMode getBuffer(int64 &size) const;
Mode getMode() const;
const std::string &getFilename() const;
bool open(Mode mode) override;
bool close() override;
bool isOpen() const override;
int64 getSize() override;
virtual int64 read(void *dst, int64 size) override;
bool write(const void *data, int64 size) override;
bool flush() override;
bool isEOF() override;
int64 tell() override;
bool seek(uint64 pos) override;
bool setBuffer(BufferMode bufmode, int64 size) override;
BufferMode getBuffer(int64 &size) const override;
Mode getMode() const override;
const std::string &getFilename() const override;
private:
+1 -1
View File
@@ -41,7 +41,7 @@ static const luaL_Reg functions[] =
{ "read", w_File_read },
{ "write", w_File_write },
{ "flush", w_File_flush },
{ "eof", w_File_eof },
{ "isEOF", w_File_isEOF },
{ "tell", w_File_tell },
{ "seek", w_File_seek },
{ "lines", w_File_lines },
+5 -5
View File
@@ -186,10 +186,10 @@ int w_File_flush(lua_State *L)
return 1;
}
int w_File_eof(lua_State *L)
int w_File_isEOF(lua_State *L)
{
File *file = luax_checkfile(L, 1);
luax_pushboolean(L, file->eof());
luax_pushboolean(L, file->isEOF());
return 1;
}
@@ -246,7 +246,7 @@ int w_File_lines_i(lua_State *L)
file->seek(pos);
}
while (!newline && !file->eof())
while (!newline && !file->isEOF())
{
// This 64-bit to 32-bit integer cast should be safe as it never exceeds bufsize.
int read = (int) file->read(buf, bufsize);
@@ -266,7 +266,7 @@ int w_File_lines_i(lua_State *L)
}
}
if (newline || (file->eof() && linesize > 0))
if (newline || (file->isEOF() && linesize > 0))
{
if (linesize < bufsize)
{
@@ -422,7 +422,7 @@ static const luaL_Reg functions[] =
{ "read", w_File_read },
{ "write", w_File_write },
{ "flush", w_File_flush },
{ "eof", w_File_eof },
{ "isEOF", w_File_isEOF },
{ "tell", w_File_tell },
{ "seek", w_File_seek },
{ "lines", w_File_lines },
+1 -1
View File
@@ -41,7 +41,7 @@ int w_File_isOpen(lua_State *L);
int w_File_read(lua_State *L);
int w_File_write(lua_State *L);
int w_File_flush(lua_State *L);
int w_File_eof(lua_State *L);
int w_File_isEOF(lua_State *L);
int w_File_tell(lua_State *L);
int w_File_seek(lua_State *L);
int w_File_lines_i(lua_State *L);