libbluray | branch: master | hpi1 <[email protected]> | Sun Jan 4 16:28:05 2015 +0200| [1776b5f1e0ed0cb780fa750c4cd9830c4e79ee81] | committer: hpi1
file: comment out unused functions > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=1776b5f1e0ed0cb780fa750c4cd9830c4e79ee81 --- src/file/file.h | 2 +- src/file/file_posix.c | 8 ++++++-- src/file/file_win32.c | 8 ++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/file/file.h b/src/file/file.h index 15a1587..aad29c9 100644 --- a/src/file/file.h +++ b/src/file/file.h @@ -44,7 +44,7 @@ #define file_tell(X) X->tell(X) //#define file_eof(X) X->eof(X) #define file_read(X,Y,Z) (size_t)X->read(X,Y,Z) -#define file_write(X,Y,Z) (size_t)X->write(X,Y,Z) +//#define file_write(X,Y,Z) (size_t)X->write(X,Y,Z) BD_PRIVATE int64_t file_size(BD_FILE_H *fp); BD_PRIVATE extern BD_FILE_H* (*file_open)(const char* filename, const char *mode); diff --git a/src/file/file_posix.c b/src/file/file_posix.c index 6d4d4b5..82e27ab 100644 --- a/src/file/file_posix.c +++ b/src/file/file_posix.c @@ -51,10 +51,12 @@ static int64_t file_tell_linux(BD_FILE_H *file) return ftello((FILE *)file->internal); } +#if 0 static int file_eof_linux(BD_FILE_H *file) { return feof((FILE *)file->internal); } +#endif static int64_t file_read_linux(BD_FILE_H *file, uint8_t *buf, int64_t size) { @@ -66,6 +68,7 @@ static int64_t file_read_linux(BD_FILE_H *file, uint8_t *buf, int64_t size) return 0; } +#if 0 static int64_t file_write_linux(BD_FILE_H *file, const uint8_t *buf, int64_t size) { if (size > 0 && size < BD_MAX_SSIZE) { @@ -75,6 +78,7 @@ static int64_t file_write_linux(BD_FILE_H *file, const uint8_t *buf, int64_t siz BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid write of size %"PRId64" (%p)\n", size, (void*)file); return 0; } +#endif static BD_FILE_H *file_open_linux(const char* filename, const char *mode) { @@ -85,9 +89,9 @@ static BD_FILE_H *file_open_linux(const char* filename, const char *mode) file->close = file_close_linux; file->seek = file_seek_linux; file->read = file_read_linux; - file->write = file_write_linux; + //file->write = file_write_linux; file->tell = file_tell_linux; - file->eof = file_eof_linux; + //file->eof = file_eof_linux; if ((fp = fopen(filename, mode))) { file->internal = fp; diff --git a/src/file/file_win32.c b/src/file/file_win32.c index 42a3fa8..a60538a 100644 --- a/src/file/file_win32.c +++ b/src/file/file_win32.c @@ -66,10 +66,12 @@ static int64_t _file_tell(BD_FILE_H *file) #endif } +#if 0 static int _file_eof(BD_FILE_H *file) { return feof((FILE *)file->internal); } +#endif static int64_t _file_read(BD_FILE_H *file, uint8_t *buf, int64_t size) { @@ -81,6 +83,7 @@ static int64_t _file_read(BD_FILE_H *file, uint8_t *buf, int64_t size) return 0; } +#if 0 static int64_t _file_write(BD_FILE_H *file, const uint8_t *buf, int64_t size) { if (size > 0 && size < BD_MAX_SSIZE) { @@ -90,6 +93,7 @@ static int64_t _file_write(BD_FILE_H *file, const uint8_t *buf, int64_t size) BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid write of size %"PRId64" (%p)\n", size, (void*)file); return 0; } +#endif static BD_FILE_H *_file_open(const char* filename, const char *mode) { @@ -105,9 +109,9 @@ static BD_FILE_H *_file_open(const char* filename, const char *mode) file->close = _file_close; file->seek = _file_seek; file->read = _file_read; - file->write = _file_write; + //file->write = _file_write; file->tell = _file_tell; - file->eof = _file_eof; + //file->eof = _file_eof; BD_DEBUG(DBG_FILE, "Opened WIN32 file %s (%p)\n", filename, (void*)file); return file; _______________________________________________ libbluray-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libbluray-devel
