diff src/xs_support.c @ 657:acaba070cf49

Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 02 Apr 2008 19:46:59 +0300
parents a50428d6cc49
children b0743dc9165d
line wrap: on
line diff
--- a/src/xs_support.c	Wed Mar 26 08:55:29 2008 +0200
+++ b/src/xs_support.c	Wed Apr 02 19:46:59 2008 +0300
@@ -24,65 +24,13 @@
 #include <ctype.h>
 
 
-#ifndef __AUDACIOUS_NEWVFS__
-/* File handling
- */
-t_xs_file *xs_fopen(const gchar *path, const gchar *mode)
-{
-	return fopen(path, mode);
-}
-
-
-gint xs_fclose(t_xs_file *f)
-{
-	return fclose(f);
-}
-
-
-gint xs_fgetc(t_xs_file *f)
-{
-	return fgetc(f);
-}
-
-
-size_t xs_fread(void *p, size_t s, size_t n, t_xs_file *f)
-{
-	return fread(p, s, n, f);
-}
-
-
-gint xs_feof(t_xs_file *f)
-{
-	return feof(f);
-}
-
-
-gint xs_ferror(t_xs_file *f)
-{
-	return ferror(f);
-}
-
-
-glong xs_ftell(t_xs_file *f)
-{
-	return ftell(f);
-}
-
-
-gint xs_fseek(t_xs_file *f, glong o, gint w)
-{
-	return fseek(f, o, w);
-}
-#endif
-
-
-guint16 xs_fread_be16(t_xs_file *f)
+guint16 xs_fread_be16(xs_file_t *f)
 {
 	return (((guint16) xs_fgetc(f)) << 8) | ((guint16) xs_fgetc(f));
 }
 
 
-guint32 xs_fread_be32(t_xs_file *f)
+guint32 xs_fread_be32(xs_file_t *f)
 {
 	return (((guint32) xs_fgetc(f)) << 24) |
 		(((guint32) xs_fgetc(f)) << 16) |
@@ -93,13 +41,13 @@
 
 /* Load a file to a buffer, return 0 on success, negative value on error
  */
-gint xs_fload_buffer(const gchar *pcFilename, guint8 **buf, size_t *bufSize)
+gint xs_fload_buffer(const gchar *filename, guint8 **buf, size_t *bufSize)
 {
-	t_xs_file *f;
+	xs_file_t *f;
 	glong seekPos;
 	
 	/* Open file, get file size */
-	if ((f = xs_fopen(pcFilename, "rb")) == NULL)
+	if ((f = xs_fopen(filename, "rb")) == NULL)
 		return -1;
 
 	xs_fseek(f, 0, SEEK_END);
@@ -139,9 +87,6 @@
 }
 
 
-
-
-
 /* Copy a string
  */
 gchar *xs_strncpy(gchar *pDest, const gchar *pSource, size_t n)
@@ -298,16 +243,3 @@
 		(*piPos)++;
 }
 
-
-#ifndef HAVE_MEMSET
-void *xs_memset(void *p, int c, size_t n)
-{
-	guint8 *dp;
-
-	dp = (guint8 *) p;
-	while (n--)
-		*(dp++) = c;
-
-	return p;
-}
-#endif