# HG changeset patch # User ertzing # Date 1177077015 25200 # Node ID f1642ee1115cbad94e735d3d2b8714b812748130 # Parent 368f8ee0a95f54a84f5c833041fb78b78422e4a3 [svn] - Implement vfs_fsize() for stdio - Implement dummys for curl/mms/smb diff -r 368f8ee0a95f -r f1642ee1115c ChangeLog --- a/ChangeLog Wed Apr 18 07:38:58 2007 -0700 +++ b/ChangeLog Fri Apr 20 06:50:15 2007 -0700 @@ -1,3 +1,18 @@ +2007-04-18 14:38:58 +0000 Tony Vroon + revision [2068] + Sync with upstream. Subsong improvements for ADL, new JBM player. + trunk/src/adplug/core/Makefile | 5 + trunk/src/adplug/core/adl.cxx | 11 + + trunk/src/adplug/core/adl.h | 19 ++ + trunk/src/adplug/core/adplug.cxx | 2 + trunk/src/adplug/core/d00.cxx | 3 + trunk/src/adplug/core/d00.h | 2 + trunk/src/adplug/core/jbm.cxx | 294 +++++++++++++++++++++++++++++++++++++++ + trunk/src/adplug/core/jbm.h | 80 ++++++++++ + trunk/src/adplug/core/player.h | 2 + 9 files changed, 410 insertions(+), 8 deletions(-) + + 2007-04-17 21:45:19 +0000 Tony Vroon revision [2066] Warning fixes from SuSe. diff -r 368f8ee0a95f -r f1642ee1115c src/curl/curl.c --- a/src/curl/curl.c Wed Apr 18 07:38:58 2007 -0700 +++ b/src/curl/curl.c Fri Apr 20 06:50:15 2007 -0700 @@ -938,6 +938,12 @@ return -1; } +off_t +curl_vfs_fsize_impl(VFSFile * file) +{ + return -1; +} + gchar * curl_vfs_metadata_impl(VFSFile * file, const gchar * field) { @@ -964,6 +970,7 @@ curl_vfs_ftell_impl, curl_vfs_feof_impl, curl_vfs_truncate_impl, + curl_vfs_fsize_impl, curl_vfs_metadata_impl }; @@ -980,6 +987,7 @@ curl_vfs_ftell_impl, curl_vfs_feof_impl, curl_vfs_truncate_impl, + curl_vfs_fsize_impl, curl_vfs_metadata_impl }; diff -r 368f8ee0a95f -r f1642ee1115c src/mms/mms.c --- a/src/mms/mms.c Wed Apr 18 07:38:58 2007 -0700 +++ b/src/mms/mms.c Fri Apr 20 06:50:15 2007 -0700 @@ -196,6 +196,12 @@ return -1; } +off_t +mms_vfs_fsize_impl(VFSFile * file) +{ + return -1; +} + VFSConstructor mms_const = { "mms://", mms_vfs_fopen_impl, @@ -208,7 +214,8 @@ mms_vfs_rewind_impl, mms_vfs_ftell_impl, mms_vfs_feof_impl, - mms_vfs_truncate_impl + mms_vfs_truncate_impl, + mms_vfs_fsize_impl }; static void init(void) diff -r 368f8ee0a95f -r f1642ee1115c src/smb/smb.c --- a/src/smb/smb.c Wed Apr 18 07:38:58 2007 -0700 +++ b/src/smb/smb.c Fri Apr 20 06:50:15 2007 -0700 @@ -175,6 +175,12 @@ return -1; } +off_t +smb_vfs_fsize_impl(VFSFile * file) +{ + return -1; +} + VFSConstructor smb_const = { "smb://", smb_vfs_fopen_impl, @@ -187,7 +193,8 @@ smb_vfs_rewind_impl, smb_vfs_ftell_impl, smb_vfs_feof_impl, - smb_vfs_truncate_impl + smb_vfs_truncate_impl, + smb_vfs_fsize_impl }; static void init(void) diff -r 368f8ee0a95f -r f1642ee1115c src/stdio/stdio.c --- a/src/stdio/stdio.c Wed Apr 18 07:38:58 2007 -0700 +++ b/src/stdio/stdio.c Fri Apr 20 06:50:15 2007 -0700 @@ -230,6 +230,23 @@ return ftruncate(fileno(handle), size); } +off_t +stdio_vfs_fsize_impl(VFSFile * file) +{ + FILE *handle; + struct stat s; + + if (file == NULL) + return -1; + + handle = (FILE *) file->handle; + + if (-1 == fstat(fileno(handle), &s)) + return -1; + + return s.st_size; +} + VFSConstructor file_const = { "file://", stdio_vfs_fopen_impl, @@ -242,7 +259,8 @@ stdio_vfs_rewind_impl, stdio_vfs_ftell_impl, stdio_vfs_feof_impl, - stdio_vfs_truncate_impl + stdio_vfs_truncate_impl, + stdio_vfs_fsize_impl }; VFSConstructor default_const = { @@ -257,7 +275,8 @@ stdio_vfs_rewind_impl, stdio_vfs_ftell_impl, stdio_vfs_feof_impl, - stdio_vfs_truncate_impl + stdio_vfs_truncate_impl, + stdio_vfs_fsize_impl }; static void init(void)