#ifdef __VMS__ // Note if __VMS is defined __UNIX is also defined
strDir = wxT("sys$manager:");
#elif defined(__WXMAC__)
- strDir = wxMacFindFolder( (short) kOnSystemDisk, kPreferencesFolderType, kDontCreateFolder ) ;
+ strDir = wxMacFindFolder( (short) kOnSystemDisk, kPreferencesFolderType, kDontCreateFolder ) ;
#elif defined( __UNIX__ )
strDir = wxT("/etc/");
#elif defined(__WXPM__)
{
wxString strDir;
-#ifndef __WXMAC__
+#if defined(__WXMAC__)
+ // no local dir concept on Mac OS 9
+ return GetGlobalDir() ;
+#else
wxGetHomeDir(&strDir);
-#ifdef __UNIX__
-#ifdef __VMS
- if (strDir.Last() != wxT(']'))
-#endif
- if (strDir.Last() != wxT('/')) strDir << wxT('/');
-#else
+# ifdef __UNIX__
+# ifdef __VMS
+ if (strDir.Last() != wxT(']'))
+# endif
+ if (strDir.Last() != wxT('/')) strDir << wxT('/');
+# else
if (strDir.Last() != wxT('\\')) strDir << wxT('\\');
-#endif
-#else
- // no local dir concept on mac
- return GetGlobalDir() ;
+# endif
#endif
return strDir;
str << szFile;
if ( wxStrchr(szFile, wxT('.')) == NULL )
- #ifdef __UNIX__
- str << wxT(".conf");
- #elif defined( __WXMAC__ )
+ #if defined( __WXMAC__ )
str << " Preferences";
+ #elif defined( __UNIX__ )
+ str << wxT(".conf");
#else // Windows
str << wxT(".ini");
#endif // UNIX/Win
wxString str = GetLocalDir();
#endif
- #if defined( __UNIX__ ) && !defined( __VMS )
+ #if defined( __UNIX__ ) && !defined( __VMS ) && !defined( __WXMAC__ )
str << wxT('.');
#endif
str << wxT(".ini");
#endif
-
#ifdef __WXMAC__
str << " Preferences";
#endif
bool ret = file.Commit();
-#if defined(__WXMAC__) && !defined(__UNIX__)
+#if defined(__WXMAC__)
if ( ret )
{
FSSpec spec ;
FSpSetFInfo( &spec , &finfo ) ;
}
}
-#endif // __WXMAC__ && !__UNIX__
+#endif // __WXMAC__
#ifdef __UNIX__
// restore the old umask if we changed it
#ifdef __GNUG__
// Note: this is done in utilscmn.cpp now.
-// #pragma implementation
// #pragma implementation "utils.h"
#endif
void wxUsleep(unsigned long milliseconds)
{
- clock_t start = clock() ;
- do
- {
- YieldToAnyThread() ;
- } while( clock() - start < milliseconds / CLOCKS_PER_SEC ) ;
+ clock_t start = clock() ;
+ do
+ {
+ YieldToAnyThread() ;
+ } while( clock() - start < milliseconds / CLOCKS_PER_SEC ) ;
}
void wxSleep(int nSecs)
return (wxBusyCursorCount > 0);
}
-wxString wxMacFindFolder( short vol,
- OSType folderType,
- Boolean createFolder)
+wxString wxMacFindFolder( short vol,
+ OSType folderType,
+ Boolean createFolder)
{
short vRefNum ;
long dirID ;
FSSpec file ;
if ( FSMakeFSSpec( vRefNum , dirID , "\p" , &file ) == noErr )
{
- strDir = wxMacFSSpec2MacFilename( &file ) + ":" ;
+ strDir = wxMacFSSpec2MacFilename( &file ) + wxFILE_SEP_PATH ;
}
}
return strDir ;
// TODO
return NULL;
}
-#endif
bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
{
return err == noErr ;
}
+#endif
// Check whether this window wants to process messages, e.g. Stop button
// in long calculations.
#ifdef __GNUG__
// Note: this is done in utilscmn.cpp now.
-// #pragma implementation
// #pragma implementation "utils.h"
#endif
void wxUsleep(unsigned long milliseconds)
{
- clock_t start = clock() ;
- do
- {
- YieldToAnyThread() ;
- } while( clock() - start < milliseconds / CLOCKS_PER_SEC ) ;
+ clock_t start = clock() ;
+ do
+ {
+ YieldToAnyThread() ;
+ } while( clock() - start < milliseconds / CLOCKS_PER_SEC ) ;
}
void wxSleep(int nSecs)
return (wxBusyCursorCount > 0);
}
-wxString wxMacFindFolder( short vol,
- OSType folderType,
- Boolean createFolder)
+wxString wxMacFindFolder( short vol,
+ OSType folderType,
+ Boolean createFolder)
{
short vRefNum ;
long dirID ;
FSSpec file ;
if ( FSMakeFSSpec( vRefNum , dirID , "\p" , &file ) == noErr )
{
- strDir = wxMacFSSpec2MacFilename( &file ) + ":" ;
+ strDir = wxMacFSSpec2MacFilename( &file ) + wxFILE_SEP_PATH ;
}
}
return strDir ;
// TODO
return NULL;
}
-#endif
bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
{
return err == noErr ;
}
+#endif
// Check whether this window wants to process messages, e.g. Stop button
// in long calculations.
return -1;
}
-#ifndef __WXMAC__
bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
{
#if defined(HAVE_STATFS) || defined(HAVE_STATVFS)
return FALSE;
}
-#endif
// ----------------------------------------------------------------------------
// env vars