+static wxString ParseWildCard( const wxString& wild )
+{
+#ifdef __WXDEBUG__
+ static const wxChar* msg =
+ _T("Motif file dialog does not understand this ")
+ _T("wildcard syntax");
+#endif
+
+ wxStringTokenizer tok( wild, _T("|") );
+
+ wxCHECK_MSG( tok.CountTokens() <= 2, _T("*.*"), msg );
+
+ if( tok.CountTokens() == 1 ) return wild;
+
+ // CountTokens == 2
+ tok.GetNextToken();
+ wxStringTokenizer tok2( tok.GetNextToken(), _T(";") );
+
+ wxCHECK_MSG( tok2.CountTokens() == 1, tok2.GetNextToken(), msg );
+ return tok2.GetNextToken();
+}
+