]> git.saurik.com Git - wxWidgets.git/commitdiff
Now dot_special argument in wxMatchWild() is honoured. :-)
authorKarsten Ballüder <ballueder@usa.net>
Sun, 20 Sep 1998 19:44:41 +0000 (19:44 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Sun, 20 Sep 1998 19:44:41 +0000 (19:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filefn.cpp

index 64391f01e312c53db41de9c9d57c41deccded241..9f61baf66d5c7d2b395cb8cda97c72e36415e0a0 100644 (file)
@@ -1397,11 +1397,13 @@ bool wxIsWild( const wxString& pattern )
     return FALSE;
 };
 
-
+bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
 #ifdef HAVE_FNMATCH_H
 {
-   // dot_special: what is it supposed to do?
-   return fnmatch(pat.c_str(), text.c_str(), FNM_PERIOD) == 0;
+   if(dot_special)
+      return fnmatch(pat.c_str(), text.c_str(), FNM_PERIOD) == 0;
+   else
+      return fnmatch(pat.c_str(), text.c_str(), 0) == 0;
 }
 #else
 
@@ -1409,7 +1411,6 @@ bool wxIsWild( const wxString& pattern )
    /*
     * WARNING: this code is broken!
     */
-bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
 {
   wxString tmp1 = pat;
   char *pattern = WXSTRINGCAST(tmp1);