]> git.saurik.com Git - wxWidgets.git/commitdiff
changed wxMatchWild() 3rd parameter not used under Unix - what is it good for?
authorKarsten Ballüder <ballueder@usa.net>
Sat, 19 Sep 1998 15:13:02 +0000 (15:13 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Sat, 19 Sep 1998 15:13:02 +0000 (15:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filefn.cpp
src/gtk/utilsgtk.cpp
src/gtk1/utilsgtk.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
 
index 4a6dbc728d69963513abe5f763d214c2d9d39fcf..019945847062e454c18c184a9505b266da856485 100644 (file)
@@ -3,7 +3,7 @@
 // Purpose:
 // Author:      Robert Roebling
 // Created:     01/02/97
-// Id:
+// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -28,6 +28,7 @@
 #include <netdb.h>
 #include <signal.h>
 
+
 #ifdef __SVR4__
 #include <sys/systeminfo.h>
 #endif
index 4a6dbc728d69963513abe5f763d214c2d9d39fcf..019945847062e454c18c184a9505b266da856485 100644 (file)
@@ -3,7 +3,7 @@
 // Purpose:
 // Author:      Robert Roebling
 // Created:     01/02/97
-// Id:
+// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -28,6 +28,7 @@
 #include <netdb.h>
 #include <signal.h>
 
+
 #ifdef __SVR4__
 #include <sys/systeminfo.h>
 #endif