diff src/timidity/src/xmms-timidity.c @ 332:626f9f4d79a8 trunk

[svn] Remove old-style is_our_file() where a new-style is_our_fd() exists
author kiyoshi
date Tue, 05 Dec 2006 01:07:41 -0800
parents 1987fda01d2a
children d124034ebea3
line wrap: on
line diff
--- a/src/timidity/src/xmms-timidity.c	Mon Dec 04 15:26:12 2006 -0800
+++ b/src/timidity/src/xmms-timidity.c	Tue Dec 05 01:07:41 2006 -0800
@@ -43,7 +43,7 @@
 	xmmstimid_init,
 	xmmstimid_about,
 	xmmstimid_configure,
-	xmmstimid_is_our_file,
+	NULL,
 	NULL,
 	xmmstimid_play_file,
 	xmmstimid_stop,
@@ -242,40 +242,6 @@
 	gtk_widget_hide(xmmstimid_conf_wnd);
 }
 
-static gint xmmstimid_is_our_file( gchar * filename )
-{
-	VFSFile * fp;
-	gchar magic_bytes[4];
-
-	fp = vfs_fopen( filename , "rb" );
-
- 	if (fp == NULL)
-		return FALSE;
-
-	vfs_fread( magic_bytes , 1 , 4 , fp );
-
-	if ( !memcmp( magic_bytes , "MThd" , 4 ) )
-	{
-		vfs_fclose( fp );
-		return TRUE;
-	}
-
-	if ( !memcmp( magic_bytes , "RIFF" , 4 ) )
-	{
-		/* skip the four bytes after RIFF,
-		   then read the next four */
-		vfs_fseek( fp , 4 , SEEK_CUR );
-		vfs_fread( magic_bytes , 1 , 4 , fp );
-		if ( !memcmp( magic_bytes , "RMID" , 4 ) )
-		{
-			vfs_fclose( fp );
-			return TRUE;
-		}
-	}
-	vfs_fclose( fp );
-	return FALSE;
-}
-
 static gint xmmstimid_is_our_fd( gchar * filename, VFSFile * fp )
 {
 	gchar magic_bytes[4];