X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6b9eeef2307dc3d46ec67a9a4ec35a9eba040c5b..f9133b32002a600cb48dd05fbcce1ab3ed684dba:/src/common/filename.cpp diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 6a8814158c..e53a24eafe 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -6,7 +6,7 @@ // Created: 28.12.2000 // RCS-ID: $Id$ // Copyright: (c) 2000 Robert Roebling -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /* @@ -107,10 +107,17 @@ #endif #ifdef __MWERKS__ +#ifdef __MACH__ +#include +#include +#include +#include +#else #include #include #include #endif +#endif #ifdef __WATCOMC__ #include @@ -687,7 +694,7 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp) } #else // !HAVE_MKTEMP (includes __DOS__) // generate the unique file name ourselves - #ifndef __DOS__ + #if !defined(__DOS__) && (!defined(__MWERKS__) || defined(__DARWIN__) ) path << (unsigned int)getpid(); #endif @@ -1133,7 +1140,7 @@ void wxFileName::InsertDir( int before, const wxString &dir ) void wxFileName::RemoveDir( int pos ) { - m_dirs.Remove( (size_t)pos ); + m_dirs.RemoveAt( (size_t)pos ); } // ---------------------------------------------------------------------------- @@ -1784,18 +1791,18 @@ public : } MacDefaultExtensionRecord( const MacDefaultExtensionRecord& from ) { - strcpy( m_ext , from.m_ext ) ; + wxStrcpy( m_ext , from.m_ext ) ; m_type = from.m_type ; m_creator = from.m_creator ; } - MacDefaultExtensionRecord( const char * extension , OSType type , OSType creator ) + MacDefaultExtensionRecord( const wxChar * extension , OSType type , OSType creator ) { - strncpy( m_ext , extension , kMacExtensionMaxLength ) ; + wxStrncpy( m_ext , extension , kMacExtensionMaxLength ) ; m_ext[kMacExtensionMaxLength] = 0 ; m_type = type ; m_creator = creator ; } - char m_ext[kMacExtensionMaxLength] ; + wxChar m_ext[kMacExtensionMaxLength] ; OSType m_type ; OSType m_creator ; } ; @@ -1819,7 +1826,7 @@ static void MacEnsureDefaultExtensionsLoaded() // load the default extensions MacDefaultExtensionRecord defaults[1] = { - MacDefaultExtensionRecord( "txt" , 'TEXT' , 'ttxt' ) , + MacDefaultExtensionRecord( wxT("txt") , 'TEXT' , 'ttxt' ) , } ; // we could load the pc exchange prefs here too @@ -1891,7 +1898,7 @@ void wxFileName::MacRegisterDefaultTypeAndCreator( const wxString& ext , wxUint3 MacDefaultExtensionRecord rec ; rec.m_type = type ; rec.m_creator = creator ; - strncpy( rec.m_ext , ext.Lower().c_str() , kMacExtensionMaxLength ) ; + wxStrncpy( rec.m_ext , ext.Lower().c_str() , kMacExtensionMaxLength ) ; gMacDefaultExtensions.Add( rec ) ; } #endif