updated physfs to version 2.0.3

This commit is contained in:
fysx
2013-12-20 22:05:14 +01:00
parent 3a8901d831
commit da22cf589a
28 changed files with 204 additions and 151 deletions
+9 -5
View File
@@ -161,9 +161,9 @@ char *__PHYSFS_platformGetUserDir(void)
} /* __PHYSFS_platformGetUserDir */
PHYSFS_uint64 __PHYSFS_platformGetThreadID(void)
void *__PHYSFS_platformGetThreadID(void)
{
return(1); /* single threaded. */
return((void *)1); /* single threaded. */
} /* __PHYSFS_platformGetThreadID */
@@ -467,7 +467,7 @@ PHYSFS_sint64 __PHYSFS_platformTell(void *opaque)
LowPos = SetFilePointer(Handle, 0, &HighPos, FILE_CURRENT);
if ((LowPos == INVALID_SET_FILE_POINTER) && (GetLastError() != NO_ERROR))
{
BAIL_MACRO(win32strerror(), 0);
BAIL_MACRO(win32strerror(), -1);
} /* if */
else
{
@@ -505,14 +505,18 @@ PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque)
int __PHYSFS_platformEOF(void *opaque)
{
const PHYSFS_sint64 FileLength = __PHYSFS_platformFileLength(opaque);
PHYSFS_sint64 FilePosition;
int retval = 0;
if (FileLength == 0)
return 1; /* we're definitely at EOF. */
/* Get the current position in the file */
if ((FilePosition = __PHYSFS_platformTell(opaque)) != 0)
if ((FilePosition = __PHYSFS_platformTell(opaque)) != -1)
{
/* Non-zero if EOF is equal to the file length */
retval = FilePosition == __PHYSFS_platformFileLength(opaque);
retval = (FilePosition == FileLength);
} /* if */
return(retval);