filename workaround CW bug in debug builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1689,29 +1689,52 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
|
|||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
|
|
||||||
const short kMacExtensionMaxLength = 16 ;
|
const short kMacExtensionMaxLength = 16 ;
|
||||||
typedef struct
|
class MacDefaultExtensionRecord
|
||||||
{
|
{
|
||||||
|
public :
|
||||||
|
MacDefaultExtensionRecord()
|
||||||
|
{
|
||||||
|
m_ext[0] = 0 ;
|
||||||
|
m_type = m_creator = NULL ;
|
||||||
|
}
|
||||||
|
MacDefaultExtensionRecord( const MacDefaultExtensionRecord& from )
|
||||||
|
{
|
||||||
|
strcpy( m_ext , from.m_ext ) ;
|
||||||
|
m_type = from.m_type ;
|
||||||
|
m_creator = from.m_creator ;
|
||||||
|
}
|
||||||
|
MacDefaultExtensionRecord( char * extension , OSType type , OSType creator )
|
||||||
|
{
|
||||||
|
strncpy( m_ext , extension , kMacExtensionMaxLength ) ;
|
||||||
|
m_ext[kMacExtensionMaxLength] = 0 ;
|
||||||
|
m_type = type ;
|
||||||
|
m_creator = creator ;
|
||||||
|
}
|
||||||
char m_ext[kMacExtensionMaxLength] ;
|
char m_ext[kMacExtensionMaxLength] ;
|
||||||
OSType m_type ;
|
OSType m_type ;
|
||||||
OSType m_creator ;
|
OSType m_creator ;
|
||||||
} MacDefaultExtensionRecord ;
|
} ;
|
||||||
|
|
||||||
#include "wx/dynarray.h"
|
#include "wx/dynarray.h"
|
||||||
WX_DECLARE_OBJARRAY(MacDefaultExtensionRecord, MacDefaultExtensionArray) ;
|
WX_DECLARE_OBJARRAY(MacDefaultExtensionRecord, MacDefaultExtensionArray) ;
|
||||||
|
|
||||||
|
bool gMacDefaultExtensionsInited = false ;
|
||||||
|
|
||||||
#include "wx/arrimpl.cpp"
|
#include "wx/arrimpl.cpp"
|
||||||
WX_DEFINE_OBJARRAY(MacDefaultExtensionArray) ;
|
|
||||||
|
WX_DEFINE_EXPORTED_OBJARRAY(MacDefaultExtensionArray) ;
|
||||||
|
|
||||||
MacDefaultExtensionArray gMacDefaultExtensions ;
|
MacDefaultExtensionArray gMacDefaultExtensions ;
|
||||||
bool gMacDefaultExtensionsInited = false ;
|
|
||||||
|
|
||||||
static void MacEnsureDefaultExtensionsLoaded()
|
static void MacEnsureDefaultExtensionsLoaded()
|
||||||
{
|
{
|
||||||
if ( !gMacDefaultExtensionsInited )
|
if ( !gMacDefaultExtensionsInited )
|
||||||
{
|
{
|
||||||
|
|
||||||
// load the default extensions
|
// load the default extensions
|
||||||
MacDefaultExtensionRecord defaults[] =
|
MacDefaultExtensionRecord defaults[1] =
|
||||||
{
|
{
|
||||||
{ "txt" , 'TEXT' , 'ttxt' } ,
|
MacDefaultExtensionRecord( "txt" , 'TEXT' , 'ttxt' ) ,
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
// we could load the pc exchange prefs here too
|
// we could load the pc exchange prefs here too
|
||||||
|
Reference in New Issue
Block a user