platform/pocketpc.c
branchstable-1.0
changeset 1179 eea580b4e199
parent 1177 05a842260409
equal deleted inserted replaced
1177:05a842260409 1179:eea580b4e199
   551 
   551 
   552     /* Get current position */
   552     /* Get current position */
   553     LowPos = SetFilePointer(FileHandle, 0, &HighPos, FILE_CURRENT);
   553     LowPos = SetFilePointer(FileHandle, 0, &HighPos, FILE_CURRENT);
   554     if ((LowPos == INVALID_SET_FILE_POINTER) && (GetLastError() != NO_ERROR))
   554     if ((LowPos == INVALID_SET_FILE_POINTER) && (GetLastError() != NO_ERROR))
   555     {
   555     {
   556         BAIL_MACRO(win32strerror(), 0);
   556         BAIL_MACRO(win32strerror(), -1);
   557     } /* if */
   557     } /* if */
   558     else
   558     else
   559     {
   559     {
   560         /* Combine the high/low order to create the 64-bit position value */
   560         /* Combine the high/low order to create the 64-bit position value */
   561         retval = (((PHYSFS_uint64) HighPos) << 32) | LowPos;
   561         retval = (((PHYSFS_uint64) HighPos) << 32) | LowPos;
   597 
   597 
   598     if (FileLength == 0)
   598     if (FileLength == 0)
   599         return 1;  /* we're definitely at EOF. */
   599         return 1;  /* we're definitely at EOF. */
   600 
   600 
   601     /* Get the current position in the file */
   601     /* Get the current position in the file */
   602     if ((FilePosition = __PHYSFS_platformTell(opaque)) != 0)
   602     if ((FilePosition = __PHYSFS_platformTell(opaque)) != -1)
   603     {
   603     {
   604         /* Non-zero if EOF is equal to the file length */
   604         /* Non-zero if EOF is equal to the file length */
   605         retval = (FilePosition == FileLength);
   605         retval = (FilePosition == FileLength);
   606     } /* if */
   606     } /* if */
   607 
   607