Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
89285f006b
1 changed files with 25 additions and 25 deletions
  1. 25 25
      dtool/src/dtoolutil/filename.cxx

+ 25 - 25
dtool/src/dtoolutil/filename.cxx

@@ -32,31 +32,6 @@
 
 #include <direct.h>
 
-static const string & 
-get_panda_root() {
-  static string panda_root;
-  static bool got_panda_root = false;
-  
-  if (!got_panda_root) {
-    const char *envvar = getenv("PANDA_ROOT");
-    if (envvar == (const char *)NULL) {
-      envvar = getenv("CYGWIN_ROOT");
-    }
-    
-    if (envvar != (const char *)NULL) {
-      panda_root = front_to_back_slash(envvar);
-    }
-    
-    if (!panda_root.empty() && panda_root[panda_root.length() - 1] != '\\') {
-      panda_root += '\\';
-    }
-    
-    got_panda_root = true;
-  }
-
-  return panda_root;
-}
-
 static string
 front_to_back_slash(const string &str) {
   string result = str;
@@ -83,6 +58,31 @@ back_to_front_slash(const string &str) {
   return result;
 }
 
+static const string & 
+get_panda_root() {
+  static string panda_root;
+  static bool got_panda_root = false;
+  
+  if (!got_panda_root) {
+    const char *envvar = getenv("PANDA_ROOT");
+    if (envvar == (const char *)NULL) {
+      envvar = getenv("CYGWIN_ROOT");
+    }
+    
+    if (envvar != (const char *)NULL) {
+      panda_root = front_to_back_slash(envvar);
+    }
+    
+    if (!panda_root.empty() && panda_root[panda_root.length() - 1] != '\\') {
+      panda_root += '\\';
+    }
+    
+    got_panda_root = true;
+  }
+
+  return panda_root;
+}
+
 static string
 convert_pathname(const string &unix_style_pathname) {
   if (unix_style_pathname.empty()) {