Patched to compile on Windows.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 21 Jan 2011 02:50:20 -0500
changeset 1135 3b71a0c08665
parent 1134 da6ebdc43c14
child 1136 888695d89f70
Patched to compile on Windows.
src/physfs.c
src/platform_windows.c
--- a/src/physfs.c	Thu Dec 30 19:53:41 2010 -0500
+++ b/src/physfs.c	Fri Jan 21 02:50:20 2011 -0500
@@ -798,8 +798,8 @@
     const char *retval = NULL;
     if (fname != NULL)
     {
-        retval = strchr(fname, '.');
-        const char *p = retval;
+        const char *p = strchr(fname, '.');
+        retval = p;
 
         while (p != NULL)
         {
--- a/src/platform_windows.c	Thu Dec 30 19:53:41 2010 -0500
+++ b/src/platform_windows.c	Fri Jan 21 02:50:20 2011 -0500
@@ -971,6 +971,7 @@
 } /* __PHYSFS_platformOpenAppend */
 
 
+/* !!! FIXME: this function fails if len > 0xFFFFFFFF. */
 PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buf, PHYSFS_uint64 len)
 {
     HANDLE Handle = ((WinApiFile *) opaque)->handle;
@@ -984,8 +985,9 @@
 } /* __PHYSFS_platformRead */
 
 
+/* !!! FIXME: this function fails if len > 0xFFFFFFFF. */
 PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer,
-                                     PHYSFS_uint32 size, PHYSFS_uint32 count)
+                                     PHYSFS_uint64 len)
 {
     HANDLE Handle = ((WinApiFile *) opaque)->handle;
     DWORD CountOfBytesWritten = 0;