]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
Commented out those wretched crt debug thingies yet again. It doesn't compile for
[wxWidgets.git] / src / common / filefn.cpp
index 52af1f7b4cf71e0532cdf18e6379490a71f84c0e..64391f01e312c53db41de9c9d57c41deccded241 100644 (file)
 #include <dir.h>
 #endif
 
+#include "wx/setup.h"
+#ifdef HAVE_FNMATCH_H
+#include   "fnmatch.h"
+#endif
+
 #ifdef __WINDOWS__
 #include "windows.h"
 #endif
@@ -1393,6 +1398,17 @@ bool wxIsWild( const wxString& pattern )
 };
 
 
+#ifdef HAVE_FNMATCH_H
+{
+   // dot_special: what is it supposed to do?
+   return fnmatch(pat.c_str(), text.c_str(), FNM_PERIOD) == 0;
+}
+#else
+
+#pragma error Broken implementation of wxMatchWild() -- needs fixing!
+   /*
+    * WARNING: this code is broken!
+    */
 bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
 {
   wxString tmp1 = pat;
@@ -1527,4 +1543,5 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
        pattern++;
     return ((*str == '\0') && (*pattern == '\0'));
 };
+#endif