+ return wxMacFilename2FSSpec( wxMacStringToCString( wxString( path ) ) , spec ) ;
+}
+#endif
+
+#ifndef __DARWIN__
+
+wxString wxMac2UnixFilename (const wxChar *str)
+{
+ wxChar *s = sMacFileNameConversion ;
+ wxStrcpy( s , str ) ;
+ if (s)
+ {
+ memmove( s+1 , s ,wxStrlen( s ) + 1 * sizeof(wxChar)) ;
+ if ( *s == ':' )
+ *s = '.' ;
+ else
+ *s = '/' ;
+
+ while (*s)
+ {
+ if (*s == ':')
+ *s = '/';
+ else
+ *s = wxTolower(*s); // Case INDEPENDENT
+ s++;
+ }
+ }
+ return wxString(sMacFileNameConversion) ;
+}
+
+wxString wxUnix2MacFilename (const wxChar *str)
+{
+ wxChar *s = sMacFileNameConversion ;
+ wxStrcpy( s , str ) ;
+ if (s)
+ {
+ if ( *s == '.' )
+ {
+ // relative path , since it goes on with slash which is translated to a :
+ memmove( s , s+1 ,wxStrlen( s ) * sizeof(wxChar)) ;
+ }
+ else if ( *s == '/' )
+ {
+ // absolute path -> on mac just start with the drive name
+ memmove( s , s+1 ,wxStrlen( s ) * sizeof(wxChar) ) ;
+ }
+ else
+ {
+ wxASSERT_MSG( 1 , wxT("unkown path beginning") ) ;
+ }
+ while (*s)
+ {
+ if (*s == '/' || *s == '\\')
+ {
+ // convert any back-directory situations
+ if ( *(s+1) == '.' && *(s+2) == '.' && ( (*(s+3) == '/' || *(s+3) == '\\') ) )
+ {
+ *s = ':';
+ memmove( s+1 , s+3 ,(wxStrlen( s+3 ) + 1)*sizeof(wxChar) ) ;
+ }
+ else
+ *s = ':';
+ }
+ s++ ;
+ }
+ }
+ return wxString(sMacFileNameConversion) ;
+}
+
+wxString wxMacFSSpec2UnixFilename( const FSSpec *spec )
+{
+ return wxMac2UnixFilename( wxMacFSSpec2MacFilename( spec) ) ;