cleanup mac

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-11-22 14:21:36 +00:00
parent e0d81eac87
commit 0ad76eea22
8 changed files with 10 additions and 87 deletions

View File

@@ -790,12 +790,6 @@ void wxTrap()
{ {
#if defined(__WXMSW__) && !defined(__WXMICROWIN__) #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
DebugBreak(); DebugBreak();
#elif defined(__WXMAC__) && !defined(__DARWIN__)
#if __powerc
Debugger();
#else
SysBreak();
#endif
#elif defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS #elif defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS
Debugger(); Debugger();
#elif defined(__UNIX__) #elif defined(__UNIX__)

View File

@@ -565,14 +565,8 @@ void wxGUIAppTraitsBase::RemoveFromPendingDelete(wxObject *object)
GSocketGUIFunctionsTable* wxGUIAppTraitsBase::GetSocketGUIFunctionsTable() GSocketGUIFunctionsTable* wxGUIAppTraitsBase::GetSocketGUIFunctionsTable()
{ {
#if defined(__WXMAC__) && !defined(__DARWIN__)
// NB: wxMac CFM does not have any GUI-specific functions in gsocket.c and
// so it doesn't need this table at all
return NULL;
#else // !__WXMAC__ || __DARWIN__
static GSocketGUIFunctionsTableConcrete table; static GSocketGUIFunctionsTableConcrete table;
return &table; return &table;
#endif // !__WXMAC__ || __DARWIN__
} }
#endif #endif

View File

@@ -97,7 +97,7 @@
#endif #endif
#ifdef __WXMAC__ #ifdef __WXMAC__
# include "MoreFilesX.h" // # include "MoreFilesX.h"
#endif #endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -344,20 +344,9 @@ wxIsAbsolutePath (const wxString& filename)
{ {
if (!filename.empty()) if (!filename.empty())
{ {
#if defined(__WXMAC__) && !defined(__DARWIN__)
// Classic or Carbon CodeWarrior like
// Carbon with Apple DevTools is Unix like
// This seems wrong to me, but there is no fix. since
// "MacOS:MyText.txt" is absolute whereas "MyDir:MyText.txt"
// is not. Or maybe ":MyDir:MyText.txt" has to be used? RR.
if (filename.Find(':') != wxNOT_FOUND && filename[0] != ':')
return true ;
#else
// Unix like or Windows // Unix like or Windows
if (filename[0] == wxT('/')) if (filename[0] == wxT('/'))
return true; return true;
#endif
#ifdef __VMS__ #ifdef __VMS__
if ((filename[0] == wxT('[') && filename[1] != wxT('.'))) if ((filename[0] == wxT('[') && filename[1] != wxT('.')))
return true; return true;
@@ -808,22 +797,12 @@ wxPathOnly (wxChar *path)
// Search backward for a backward or forward slash // Search backward for a backward or forward slash
while (i > -1) while (i > -1)
{ {
#if defined(__WXMAC__) && !defined(__DARWIN__)
// Classic or Carbon CodeWarrior like
// Carbon with Apple DevTools is Unix like
if (path[i] == wxT(':') )
{
buf[i] = 0;
return buf;
}
#else
// Unix like or Windows // Unix like or Windows
if (path[i] == wxT('/') || path[i] == wxT('\\')) if (path[i] == wxT('/') || path[i] == wxT('\\'))
{ {
buf[i] = 0; buf[i] = 0;
return buf; return buf;
} }
#endif
#ifdef __VMS__ #ifdef __VMS__
if (path[i] == wxT(']')) if (path[i] == wxT(']'))
{ {
@@ -864,15 +843,6 @@ wxString wxPathOnly (const wxString& path)
// Search backward for a backward or forward slash // Search backward for a backward or forward slash
while (i > -1) while (i > -1)
{ {
#if defined(__WXMAC__) && !defined(__DARWIN__)
// Classic or Carbon CodeWarrior like
// Carbon with Apple DevTools is Unix like
if (path[i] == wxT(':') )
{
buf[i] = 0;
return wxString(buf);
}
#else
// Unix like or Windows // Unix like or Windows
if (path[i] == wxT('/') || path[i] == wxT('\\')) if (path[i] == wxT('/') || path[i] == wxT('\\'))
{ {
@@ -882,7 +852,6 @@ wxString wxPathOnly (const wxString& path)
buf[i] = 0; buf[i] = 0;
return wxString(buf); return wxString(buf);
} }
#endif
#ifdef __VMS__ #ifdef __VMS__
if (path[i] == wxT(']')) if (path[i] == wxT(']'))
{ {
@@ -913,11 +882,7 @@ wxString wxPathOnly (const wxString& path)
#if defined(__WXMAC__) #if defined(__WXMAC__)
#if TARGET_API_MAC_OSX
#define kDefaultPathStyle kCFURLPOSIXPathStyle #define kDefaultPathStyle kCFURLPOSIXPathStyle
#else
#define kDefaultPathStyle kCFURLHFSPathStyle
#endif
wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathComponent ) wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathComponent )
{ {
@@ -983,10 +948,11 @@ wxString wxMacFSSpec2MacFilename( const FSSpec *spec )
void wxMacFilename2FSSpec( const wxString& path , FSSpec *spec ) void wxMacFilename2FSSpec( const wxString& path , FSSpec *spec )
{ {
OSStatus err = noErr ; OSStatus err = noErr;
FSRef fsRef ; FSRef fsRef;
wxMacPathToFSRef( path , &fsRef ) ; wxMacPathToFSRef( path , &fsRef );
err = FSRefMakeFSSpec( &fsRef , spec ) ; err = FSGetCatalogInfo(&fsRef, kFSCatInfoNone, NULL, NULL, spec, NULL);
verify_noerr( err );
} }
#endif #endif
@@ -1542,16 +1508,6 @@ wxChar *wxDoGetCwd(wxChar *buf, int sz)
{ {
#if defined(_MSC_VER) || defined(__MINGW32__) #if defined(_MSC_VER) || defined(__MINGW32__)
ok = _getcwd(cbuf, sz) != NULL; ok = _getcwd(cbuf, sz) != NULL;
#elif defined(__WXMAC__) && !defined(__DARWIN__)
char lbuf[1024] ;
if ( getcwd( lbuf , sizeof( lbuf ) ) )
{
wxString res( lbuf , *wxConvCurrent ) ;
wxStrcpy( buf , res ) ;
ok = true;
}
else
ok = false ;
#elif defined(__OS2__) #elif defined(__OS2__)
APIRET rc; APIRET rc;
ULONG ulDriveNum = 0; ULONG ulDriveNum = 0;
@@ -1574,7 +1530,7 @@ wxChar *wxDoGetCwd(wxChar *buf, int sz)
ok = getcwd(cbuf, sz) != NULL; ok = getcwd(cbuf, sz) != NULL;
#endif // platform #endif // platform
#if wxUSE_UNICODE && !(defined(__WXMAC__) && !defined(__DARWIN__)) #if wxUSE_UNICODE
// finally convert the result to Unicode if needed // finally convert the result to Unicode if needed
wxConvFile.MB2WC(buf, cbuf, sz); wxConvFile.MB2WC(buf, cbuf, sz);
#endif // wxUSE_UNICODE #endif // wxUSE_UNICODE

View File

@@ -28,10 +28,6 @@
#include "wx/log.h" #include "wx/log.h"
#endif #endif
#if !defined(wxMAC_USE_CORE_GRAPHICS_BLEND_MODES)
#define wxMAC_USE_CORE_GRAPHICS_BLEND_MODES 0
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constants // constants
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -169,19 +169,6 @@ void wxMessageOutputDebug::Output(const wxString& str)
out.Replace(wxT("\t"), wxT(" ")); out.Replace(wxT("\t"), wxT(" "));
out.Replace(wxT("\n"), wxT("\r\n")); out.Replace(wxT("\n"), wxT("\r\n"));
::OutputDebugString(out.wx_str()); ::OutputDebugString(out.wx_str());
#elif defined(__WXMAC__) && !defined(__DARWIN__)
if ( wxIsDebuggerRunning() )
{
Str255 pstr;
wxString output = out + wxT(";g") ;
wxMacStringToPascal(output.c_str(), pstr);
#ifdef __powerc
DebugStr(pstr);
#else
SysBreakStr(pstr);
#endif
}
#else #else
wxFputs( out , stderr ) ; wxFputs( out , stderr ) ;
if ( out.Right(1) != wxT("\n") ) if ( out.Right(1) != wxT("\n") )

View File

@@ -42,7 +42,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxIPV4address, wxIPaddress)
#if wxUSE_IPV6 #if wxUSE_IPV6
IMPLEMENT_DYNAMIC_CLASS(wxIPV6address, wxIPaddress) IMPLEMENT_DYNAMIC_CLASS(wxIPV6address, wxIPaddress)
#endif #endif
#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) && (!defined(__WXMAC__) || defined(__DARWIN__)) #if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__)
IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress) IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress)
#endif #endif
@@ -369,7 +369,7 @@ unsigned short wxIPV6address::Service() const
#endif // wxUSE_IPV6 #endif // wxUSE_IPV6
#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) && (!defined(__WXMAC__) || defined(__DARWIN__)) #if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__)
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// wxUNIXaddress // wxUNIXaddress

View File

@@ -86,7 +86,7 @@ static wxSockAddress *
GetAddressFromName(const wxString& serverName, const wxString& host = wxEmptyString) GetAddressFromName(const wxString& serverName, const wxString& host = wxEmptyString)
{ {
// we always use INET sockets under non-Unix systems // we always use INET sockets under non-Unix systems
#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) && (!defined(__WXMAC__) || defined(__DARWIN__)) #if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__)
// under Unix, if the server name looks like a path, create a AF_UNIX // under Unix, if the server name looks like a path, create a AF_UNIX
// socket instead of AF_INET one // socket instead of AF_INET one
if ( serverName.Find(_T('/')) != wxNOT_FOUND ) if ( serverName.Find(_T('/')) != wxNOT_FOUND )

View File

@@ -322,8 +322,6 @@ wxTextOutputStream::wxTextOutputStream(wxOutputStream& s, wxEOL mode)
{ {
#if defined(__WXMSW__) || defined(__WXPM__) #if defined(__WXMSW__) || defined(__WXPM__)
m_mode = wxEOL_DOS; m_mode = wxEOL_DOS;
#elif defined(__WXMAC__) && !defined(__DARWIN__)
m_mode = wxEOL_MAC;
#else #else
m_mode = wxEOL_UNIX; m_mode = wxEOL_UNIX;
#endif #endif
@@ -344,8 +342,6 @@ void wxTextOutputStream::SetMode(wxEOL mode)
{ {
#if defined(__WXMSW__) || defined(__WXPM__) #if defined(__WXMSW__) || defined(__WXPM__)
m_mode = wxEOL_DOS; m_mode = wxEOL_DOS;
#elif defined(__WXMAC__) && !defined(__DARWIN__)
m_mode = wxEOL_MAC;
#else #else
m_mode = wxEOL_UNIX; m_mode = wxEOL_UNIX;
#endif #endif