-void ExtendedOpenFile( ConstStr255Param message , ConstStr255Param path , const char *filter , FileFilterYDUPP fileFilter, StandardFileReply *theSFR)
+void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
+{
+ myData->currentfilter = 0 ;
+
+ if ( filter && filter[0] )
+ {
+ wxString filter2(filter) ;
+ int filterIndex = 0;
+ bool isName = true ;
+ wxString current ;
+ for( unsigned int i = 0; i < filter2.Len(); i++ )
+ {
+ if( filter2.GetChar(i) == wxT('|') )
+ {
+ if( isName ) {
+ myData->name[filterIndex] = current ;
+ }
+ else {
+ myData->extensions[filterIndex] = current.MakeUpper() ;
+ ++filterIndex ;
+ }
+ isName = !isName ;
+ current = "" ;
+ }
+ else
+ {
+ current += filter2.GetChar(i) ;
+ }
+ }
+ if ( filterIndex > 0 )
+ {
+ wxASSERT_MSG( !isName , "incorrect format of format string" ) ;
+ myData->extensions[filterIndex] = current.MakeUpper() ;
+ ++filterIndex ;
+ }
+
+ myData->numfilters = filterIndex ;
+ for ( int i = 0 ; i < myData->numfilters ; i++ )
+ {
+ int j ;
+ for ( j = 0 ; gfilters[j] ; j++ )
+ {
+ if ( strcmp( myData->extensions[i] , gfilters[j] ) == 0 )
+ {
+ myData->filtermactypes[i] = gfiltersmac[j] ;
+ break ;
+ }
+ }
+ if( gfilters[j] == NULL )
+ {
+ myData->filtermactypes[i] = '****' ;
+ }
+ }
+ }
+ else
+ {
+ myData->numfilters = 0 ;
+ }
+
+}
+void ExtendedOpenFile( ConstStr255Param message , ConstStr255Param path , const char *filter , FileFilterYDUPP fileFilter, StandardFileReply *theSFR )