diff src/xs_support.c @ 516:c192468eb8ce

Audacious VFS support functions finished.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 06 Feb 2007 02:32:00 +0000
parents d87ac4d5dc52
children fe8b41abd923
line wrap: on
line diff
--- a/src/xs_support.c	Tue Jan 30 10:01:04 2007 +0000
+++ b/src/xs_support.c	Tue Feb 06 02:32:00 2007 +0000
@@ -24,6 +24,7 @@
 #include <ctype.h>
 
 
+#ifndef __AUDACIOUS_NEWVFS__
 /* File handling
  */
 t_xs_file *xs_fopen(const gchar *path, const gchar *mode)
@@ -44,21 +45,6 @@
 }
 
 
-guint16 xs_fread_be16(t_xs_file *f)
-{
-	return (((guint16) fgetc(f)) << 8) | ((guint16) fgetc(f));
-}
-
-
-guint32 xs_fread_be32(t_xs_file *f)
-{
-	return (((guint32) fgetc(f)) << 24) |
-		(((guint32) fgetc(f)) << 16) |
-		(((guint32) fgetc(f)) << 8) |
-		((guint32) fgetc(f));
-}
-
-
 size_t xs_fread(void *p, size_t s, size_t n, t_xs_file *f)
 {
 	return fread(p, s, n, f);
@@ -77,6 +63,28 @@
 }
 
 
+glong xs_ftell(t_xs_file *f)
+{
+	return ftell(f);
+}
+#endif
+
+
+guint16 xs_fread_be16(t_xs_file *f)
+{
+	return (((guint16) xs_fgetc(f)) << 8) | ((guint16) xs_fgetc(f));
+}
+
+
+guint32 xs_fread_be32(t_xs_file *f)
+{
+	return (((guint32) xs_fgetc(f)) << 24) |
+		(((guint32) xs_fgetc(f)) << 16) |
+		(((guint32) xs_fgetc(f)) << 8) |
+		((guint32) xs_fgetc(f));
+}
+
+
 /* Copy a string
  */
 gchar *xs_strncpy(gchar *pDest, gchar *pSource, size_t n)