paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/physfs/platform win32.c,1.1.1.1.6.4,1.1.1


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/physfs/platform win32.c,1.1.1.1.6.4,1.1.1.1.6.5
Date: Fri, 31 May 2002 04:42:19 -0400

Update of /cvsroot/paragui/paragui/src/physfs/platform
In directory subversions:/tmp/cvs-serv17473/src/physfs/platform

Modified Files:
      Tag: devel-1-0
        win32.c 
Log Message:
final Win32 fix 
The Win32 version is ready for RC2 :))



Index: win32.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/win32.c,v
retrieving revision 1.1.1.1.6.4
retrieving revision 1.1.1.1.6.5
diff -C2 -r1.1.1.1.6.4 -r1.1.1.1.6.5
*** win32.c     31 May 2002 08:09:16 -0000      1.1.1.1.6.4
--- win32.c     31 May 2002 08:42:17 -0000      1.1.1.1.6.5
***************
*** 59,63 ****
      }
  
!       basedir = __PHYSFS_platformCalcBaseDir("dummy");
        SetCurrentDirectory(basedir);
  
--- 59,63 ----
      }
  
!       basedir = __PHYSFS_platformCalcBaseDir("");
        SetCurrentDirectory(basedir);
  
***************
*** 649,659 ****
      /* Get current position */
      retval = SetFilePointer(FileHandle, 0, NULL, FILE_CURRENT);
!     if(GetLastError() != NO_ERROR)
      {
-         /* Set the error to GetLastError */
          __PHYSFS_setError(win32strerror());
-         /* We errored out */
          retval = 0;
      }
  
      return retval;
--- 649,658 ----
      /* Get current position */
      retval = SetFilePointer(FileHandle, 0, NULL, FILE_CURRENT);
! /*    if(GetLastError() != NO_ERROR)
      {
          __PHYSFS_setError(win32strerror());
          retval = 0;
      }
+ */
  
      return retval;
***************
*** 664,683 ****
  {
      HANDLE FileHandle;
-     PHYSFS_sint64 retval;
  
      /* Cast the generic handle to a Win32 handle */
!     FileHandle = (HANDLE)handle;
!     
!     retval = GetFileSize(FileHandle, NULL);
! 
!     if(GetLastError() != NO_ERROR)
!     {
!         /* Set the error to GetLastError */
!         __PHYSFS_setError(win32strerror());
! 
!         retval = -1;
!     }
! 
!     return retval;
  } /* __PHYSFS_platformFileLength */
  
--- 663,670 ----
  {
      HANDLE FileHandle;
  
      /* Cast the generic handle to a Win32 handle */
!     FileHandle = (HANDLE)handle;  
!     return GetFileSize(FileHandle, NULL);
  } /* __PHYSFS_platformFileLength */
  
***************
*** 692,707 ****
      FileHandle = (HANDLE)opaque;
  
!       if(__PHYSFS_platformFileLength(opaque) == -1) {
                return 1;
        }
  
      /* Get the current position in the file */
!     if((FilePosition = __PHYSFS_platformTell(opaque)) != 0)
!     {
!         /* Non-zero if EOF is equal to the file length - 1 */
!         retval = (FilePosition >= (__PHYSFS_platformFileLength(opaque) - 1));
!     }
! 
!     return retval;
  } /* __PHYSFS_platformEOF */
  
--- 679,689 ----
      FileHandle = (HANDLE)opaque;
  
!       if(__PHYSFS_platformFileLength(FileHandle) == -1) {
                return 1;
        }
  
      /* Get the current position in the file */
!       FilePosition = __PHYSFS_platformTell(FileHandle);
!     return (FilePosition >= (__PHYSFS_platformFileLength(FileHandle) - 1));
  } /* __PHYSFS_platformEOF */
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]