Mercurial > audlegacy-plugins
changeset 1936:a55b1c903628
branch merge
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Mon, 01 Oct 2007 15:35:02 -0500 |
parents | c276e2b74646 (diff) c62011e48c61 (current diff) |
children | ac07c60dba5d |
files | src/projectm-1.0/COPYING src/projectm-1.0/main.cxx src/projectm-1.0/sdltoprojectM.h src/projectm-1.0/video_init.cxx src/projectm-1.0/video_init.h |
diffstat | 2 files changed, 2 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/src/stdio/Makefile Mon Oct 01 14:06:03 2007 -0500 +++ b/src/stdio/Makefile Mon Oct 01 15:35:02 2007 -0500 @@ -8,4 +8,4 @@ CPPFLAGS += ${PLUGIN_CPPFLAGS} ${MOWGLI_CFLAGS} ${DBUS_CFLAGS} ${GTK_CFLAGS} ${GLIB_CFLAGS} ${PANGO_CFLAGS} ${ARCH_DEFINES} ${XML_CPPFLAGS} -I../../intl -I../.. CFLAGS += ${PLUGIN_CFLAGS} -LIBS += ${GTK_LIBS} ${GLIB_LIBS} ${PANGO_LIBS} ${XML_LIBS} -lmagic +LIBS += ${GTK_LIBS} ${GLIB_LIBS} ${PANGO_LIBS} ${XML_LIBS}
--- a/src/stdio/stdio.c Mon Oct 01 14:06:03 2007 -0500 +++ b/src/stdio/stdio.c Mon Oct 01 15:35:02 2007 -0500 @@ -27,8 +27,6 @@ #include <string.h> -#include <magic.h> - static gchar * vfs_stdio_urldecode_path(const gchar * encoded_path) { @@ -251,28 +249,6 @@ return s.st_size; } -static magic_t mdb_handle = NULL; - -gchar * -stdio_vfs_metadata_impl(VFSFile *file, const gchar *field) -{ - if (!g_ascii_strcasecmp(field, "content-type")) - { - gchar *decpath; - const gchar *out; - - if (mdb_handle == NULL) - mdb_handle = magic_open(MAGIC_MIME); - - decpath = vfs_stdio_urldecode_path(file->uri); - out = magic_file(mdb_handle, decpath); - - return g_strdup(out); - } - - return NULL; -} - VFSConstructor file_const = { "file://", stdio_vfs_fopen_impl, @@ -286,8 +262,7 @@ stdio_vfs_ftell_impl, stdio_vfs_feof_impl, stdio_vfs_truncate_impl, - stdio_vfs_fsize_impl, - stdio_vfs_metadata_impl + stdio_vfs_fsize_impl }; static void init(void)