Commit 48a894e8 authored by cRTrn13's avatar cRTrn13

off_t -> uint64_t

file_linux -> file_posix
now we have fseeko/ftello instead of fseek/ftell
parent bc82b2ab
......@@ -51,7 +51,7 @@ void bd_close(BLURAY *bd)
X_FREE(bd);
}
off_t bd_seek(BLURAY *bd, off_t pos)
off_t bd_seek(BLURAY *bd, uint64_t pos)
{
if (pos < bd->s_size) {
bd->s_pos = pos - (pos % 6144);
......
......@@ -25,7 +25,7 @@ struct bluray {
BLURAY *bd_open(const char* device_path, const char* keyfile_path);
void bd_close(BLURAY *bd);
void bd_select_title(BLURAY *bd, uint64_t title);
off_t bd_seek(BLURAY *bd, off_t pos);
off_t bd_seek(BLURAY *bd, uint64_t pos);
int bd_read(BLURAY *bd, unsigned char *buf, int len);
#endif /* BLURAY_H_ */
......@@ -21,8 +21,8 @@ struct file
{
void* internal;
void (*close)(FILE_H *file);
int64_t (*seek)(FILE_H *file, int64_t offset, int32_t origin);
int64_t (*tell)(FILE_H *file);
int64_t (*seeko)(FILE_H *file, int64_t offset, int32_t origin);
int64_t (*tello)(FILE_H *file);
int (*eof)(FILE_H *file);
int (*read)(FILE_H *file, uint8_t *buf, int64_t size);
int (*write)(FILE_H *file, uint8_t *buf, int64_t size);
......
......@@ -8,8 +8,8 @@
FILE_H *file_open_linux(const char* filename, const char *mode);
void file_close_linux(FILE_H *file);
int64_t file_seek_linux(FILE_H *file, int64_t offset, int32_t origin);
int64_t file_tell_linux(FILE_H *file);
int64_t file_seeko_linux(FILE_H *file, int64_t offset, int32_t origin);
int64_t file_tello_linux(FILE_H *file);
int file_eof_linux(FILE_H *file);
int file_read_linux(FILE_H *file, uint8_t *buf, int64_t size);
int file_write_linux(FILE_H *file, uint8_t *buf, int64_t size);
......@@ -28,12 +28,12 @@ void file_close_linux(FILE_H *file)
int64_t file_seek_linux(FILE_H *file, int64_t offset, int32_t origin)
{
return fseek((FILE *)file->internal, offset, origin);
return fseeko((FILE *)file->internal, offset, origin);
}
int64_t file_tell_linux(FILE_H *file)
{
return ftell((FILE *)file->internal);
return ftello((FILE *)file->internal);
}
int file_eof_linux(FILE_H *file)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment