From dfcb1ae09dd55270d45c66a158d6444421e59679 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karsten=20Ball=C3=BCder?= Date: Sat, 19 Sep 1998 15:13:02 +0000 Subject: [PATCH] changed wxMatchWild() 3rd parameter not used under Unix - what is it good for? git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filefn.cpp | 17 +++++++++++++++++ src/gtk/utilsgtk.cpp | 3 ++- src/gtk1/utilsgtk.cpp | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 52af1f7b4c..64391f01e3 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -70,6 +70,11 @@ #include #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 diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index 4a6dbc728d..0199458470 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -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 #include + #ifdef __SVR4__ #include #endif diff --git a/src/gtk1/utilsgtk.cpp b/src/gtk1/utilsgtk.cpp index 4a6dbc728d..0199458470 100644 --- a/src/gtk1/utilsgtk.cpp +++ b/src/gtk1/utilsgtk.cpp @@ -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 #include + #ifdef __SVR4__ #include #endif -- 2.45.2