- PHYSFS_file* file = (PHYSFS_file*) context->hidden.unknown.data1;
- int res;
- switch(whence) {
- case SEEK_SET:
- res = PHYSFS_seek(file, offset);
- break;
- case SEEK_CUR:
- res = PHYSFS_seek(file, PHYSFS_tell(file) + offset);
- break;
- case SEEK_END:
- res = PHYSFS_seek(file, PHYSFS_fileLength(file) + offset);
- break;
- default:
- res = 0;
- assert(false);
- break;
- }
- if(res == 0) {
- log_warning << "Error seeking in file: " << PHYSFS_getLastError() << std::endl;
- return -1;
- }
+ PHYSFS_file* file = (PHYSFS_file*) context->hidden.unknown.data1;
+ int res;
+ switch(whence) {
+ case SEEK_SET:
+ res = PHYSFS_seek(file, offset);
+ break;
+ case SEEK_CUR:
+ res = PHYSFS_seek(file, PHYSFS_tell(file) + offset);
+ break;
+ case SEEK_END:
+ res = PHYSFS_seek(file, PHYSFS_fileLength(file) + offset);
+ break;
+ default:
+ res = 0;
+ assert(false);
+ break;
+ }
+ if(res == 0) {
+ log_warning << "Error seeking in file: " << PHYSFS_getLastError() << std::endl;
+ return -1;
+ }