]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/utils.cpp
corrections for path handling under Mac OS X
[wxWidgets.git] / src / mac / utils.cpp
index f234da74566aafab7c5d7154d2e14f432e5ca34a..95efb40dbbc4e9ab71977b0219cb46454c643006 100644 (file)
@@ -11,7 +11,6 @@
 
 #ifdef __GNUG__
 // Note: this is done in utilscmn.cpp now.
-// #pragma implementation
 // #pragma implementation "utils.h"
 #endif
 
 #include <string.h>
 #include <stdarg.h>
 
-#ifndef __DARWIN__
-#  include "morefile.h"
-#  include "moreextr.h"
-#endif
+#include "MoreFiles.h"
+#include "MoreFilesExtras.h"
 
 #ifndef __DARWIN__
 // defined in unix/utilsunx.cpp for Mac OS X
@@ -132,11 +129,11 @@ long wxGetFreeMemory()
 
 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)
@@ -320,10 +317,9 @@ bool wxIsBusy()
   return (wxBusyCursorCount > 0);
 }
 
-#ifndef __DARWIN__
-wxString wxMacFindFolder( short                                        vol,
-                                                                OSType                                 folderType,
-                                                                Boolean                                createFolder)
+wxString wxMacFindFolder( short        vol,
+                         OSType       folderType,
+                         Boolean      createFolder)
 {
        short           vRefNum  ;
        long            dirID ;
@@ -334,12 +330,11 @@ wxString wxMacFindFolder( short                                   vol,
                FSSpec file ;
                if ( FSMakeFSSpec( vRefNum , dirID , "\p" , &file ) == noErr )
                {
-                       strDir = wxMacFSSpec2MacFilename( &file ) + ":" ;
+                       strDir = wxMacFSSpec2MacFilename( &file ) + wxFILE_SEP_PATH ;
                }
        }
        return strDir ;
 }
-#endif
 
 #ifndef __DARWIN__
 char *wxGetUserHome (const wxString& user)
@@ -347,9 +342,7 @@ char *wxGetUserHome (const wxString& user)
     // TODO
     return NULL;
 }
-#endif
 
-#ifndef __DARWIN__
 bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
 {
     if ( path.empty() )