From 636baaba0f52b37be2c84926942b751150ba21ab Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 1 Jul 2011 12:18:32 +0200 Subject: [PATCH] more compile fail --- Makefile | 2 +- libs/filematch.h | 9 +++++++++ plugins/vfspk3/vfs.cpp | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1f8b26a9..8f7d036c 100644 --- a/Makefile +++ b/Makefile @@ -695,7 +695,6 @@ $(INSTALLDIR)/radiant.$(EXE): \ radiant/xmlstuff.o \ radiant/xywindow.o \ libcmdlib.$(A) \ - libfilematch.$(A) \ libgtkutil.$(A) \ libl_net.$(A) \ libmathlib.$(A) \ @@ -863,6 +862,7 @@ $(INSTALLDIR)/modules/vfspk3.$(DLL): \ plugins/vfspk3/archive.o \ plugins/vfspk3/vfs.o \ plugins/vfspk3/vfspk3.o \ + libfilematch.$(A) \ $(INSTALLDIR)/plugins/bobtoolz.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK) $(INSTALLDIR)/plugins/bobtoolz.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude diff --git a/libs/filematch.h b/libs/filematch.h index f8018096..f075b75c 100644 --- a/libs/filematch.h +++ b/libs/filematch.h @@ -1,7 +1,16 @@ #if !defined(INCLUDED_FILEMATCH_H) #define INCLUDED_FILEMATCH_H +#ifdef __cplusplus +extern "C" +{ +#endif + int matchpattern(const char *in, const char *pattern, int caseinsensitive); int matchpattern_with_separator(const char *in, const char *pattern, int caseinsensitive, const char *separators, int wildcard_least_one); +#ifdef __cplusplus +} +#endif + #endif diff --git a/plugins/vfspk3/vfs.cpp b/plugins/vfspk3/vfs.cpp index 8890edd2..bea0adb4 100644 --- a/plugins/vfspk3/vfs.cpp +++ b/plugins/vfspk3/vfs.cpp @@ -60,6 +60,7 @@ ArchiveModules& FileSystemQ3API_getArchiveModules(); #include "stream/stringstream.h" #include "os/path.h" #include "moduleobservers.h" +#include "filematch.h" #define VFS_MAXDIRS 64 @@ -316,7 +317,7 @@ void InitDirectory(const char* directory, ArchiveModules& archiveModules) for(j = 0; j < g_numForbiddenDirs; ++j) { const char *p = strrchr(directory, '/'); - p = (p ? (p+1) : path); + p = (p ? (p+1) : directory); if(matchpattern(p, g_strForbiddenDirs[j], TRUE)) break; } -- 2.39.2