equal
deleted
inserted
replaced
503 } /* __PHYSFS_platformFileLength */ |
503 } /* __PHYSFS_platformFileLength */ |
504 |
504 |
505 |
505 |
506 int __PHYSFS_platformEOF(void *opaque) |
506 int __PHYSFS_platformEOF(void *opaque) |
507 { |
507 { |
|
508 const PHYSFS_sint64 FileLength = __PHYSFS_platformFileLength(opaque); |
508 PHYSFS_sint64 FilePosition; |
509 PHYSFS_sint64 FilePosition; |
509 int retval = 0; |
510 int retval = 0; |
510 |
511 |
|
512 if (FileLength == 0) |
|
513 return 1; /* we're definitely at EOF. */ |
|
514 |
511 /* Get the current position in the file */ |
515 /* Get the current position in the file */ |
512 if ((FilePosition = __PHYSFS_platformTell(opaque)) != 0) |
516 if ((FilePosition = __PHYSFS_platformTell(opaque)) != 0) |
513 { |
517 { |
514 /* Non-zero if EOF is equal to the file length */ |
518 /* Non-zero if EOF is equal to the file length */ |
515 retval = FilePosition == __PHYSFS_platformFileLength(opaque); |
519 retval = (FilePosition == FileLength); |
516 } /* if */ |
520 } /* if */ |
517 |
521 |
518 return(retval); |
522 return(retval); |
519 } /* __PHYSFS_platformEOF */ |
523 } /* __PHYSFS_platformEOF */ |
520 |
524 |