]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
Need LINKAGEMODE for Visualage C++ compiles on the static global procs at the top
[wxWidgets.git] / src / common / utilscmn.cpp
index bab380b7a80fd32ed5d02c5e358daf8630cd1ac2..a9fda2f4acc5416af274f405994ddf577124342b 100644 (file)
     #include <clib.h>
 #endif
 
-// Pattern matching code. (FIXME)
-// Yes, this path is deliberate (for Borland compilation)
-#ifdef wx_mac /* MATTHEW: [5] Mac doesn't like paths with "/" */
-#include "glob.inc"
-#else
-#include "../common/glob.inc"
-#endif
-
 #ifdef __WXMSW__
     #include "windows.h"
 #endif
@@ -1041,3 +1033,44 @@ wxString wxGetFullHostName()
     return buf;
 }
 
+wxString wxGetHomeDir()
+{
+    wxString home;
+    wxGetHomeDir(&home);
+
+    return home;
+}
+
+#if 0
+
+wxString wxGetCurrentDir()
+{
+    wxString dir;
+    size_t len = 1024;
+    bool ok;
+    do
+    {
+        ok = getcwd(dir.GetWriteBuf(len + 1), len) != NULL;
+        dir.UngetWriteBuf();
+
+        if ( !ok )
+        {
+            if ( errno != ERANGE )
+            {
+                wxLogSysError(_T("Failed to get current directory"));
+
+                return wxEmptyString;
+            }
+            else
+            {
+                // buffer was too small, retry with a larger one
+                len *= 2;
+            }
+        }
+        //else: ok
+    } while ( !ok );
+
+    return dir;
+}
+
+#endif // 0