changeset 965:f1642ee1115c trunk

[svn] - Implement vfs_fsize() for stdio - Implement dummys for curl/mms/smb
author ertzing
date Fri, 20 Apr 2007 06:50:15 -0700
parents 368f8ee0a95f
children 1f78881a5f3c
files ChangeLog src/curl/curl.c src/mms/mms.c src/smb/smb.c src/stdio/stdio.c
diffstat 5 files changed, 60 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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 <chainsaw@gentoo.org>
+  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 <chainsaw@gentoo.org>
   revision [2066]
   Warning fixes from SuSe.
--- 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
 };
 
--- 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)
--- 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)
--- 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)