+2003-06-06 [christoph] 0.9.0claws16
+
+ * configure.ac
+ * src/mimeview.h
+ add check for fnmatch.h and include it when available
+
+ * src/mimeview.[ch]
+ fix wrong case sensitivity of Content-Types
+
+ * src/gtk/Makefile.am
+ need the same include paths in gtk directory as in
+ common directory because .h files in common can
+ include files from these directories, when included
+ in gtk's .h or .c files
+
2003-06-06 [alfons] 0.9.0claws15
* src/mimeview.c
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws15
+EXTRA_VERSION=claws16
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
sys/param.h sys/utsname.h sys/select.h \
- wchar.h wctype.h)
+ wchar.h wctype.h fnmatch.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
prefswindow.c prefswindow.h \
sslcertwindow.c sslcertwindow.h
-INCLUDES = \
+CPPFLAGS = \
-I../common \
-I.. \
$(GTK_CFLAGS)
+ $(OPENSSL_CFLAGS)
libsylpheedgtk_la_LIBADD = \
../common/libsylpheedcommon.la \
#include <gtk/gtkdnd.h>
#include <gtk/gtkselection.h>
#include <stdio.h>
+#ifdef HAVE_FNMATCH_H
+#include <fnmatch.h>
+#endif
#include "intl.h"
#include "main.h"
GSList *cur;
MimeViewerFactory *factory = NULL;
MimeViewer *viewer = NULL;
+
+/*
+ * FNM_CASEFOLD is a GNU extension
+ * if its not defined copy the string to the stack and
+ * convert the copy to lower case
+ */
+#ifndef FNM_CASEFOLD
+#define FNM_CASEFOLD 0
+ Xstrdup_a(content_type, content_type, return NULL);
+ g_strdown((gchar *)content_type);
+#endif
for (cur = mimeviewer_factories; cur != NULL; cur = g_slist_next(cur)) {
MimeViewerFactory *curfactory = cur->data;
while (curfactory->content_types[i] != NULL) {
debug_print("%s\n", curfactory->content_types[i]);
- if(!fnmatch(curfactory->content_types[i], content_type, 0)) {
+ if(!fnmatch(curfactory->content_types[i], content_type, FNM_CASEFOLD)) {
factory = curfactory;
break;
}
struct _MimeViewerFactory
{
+ /**
+ * Array of supported content types.
+ * Must be NULL terminated and lower case
+ */
gchar **content_types;
gint priority;