Browse Source

Revert stupid commit of mine

rdb 16 years ago
parent
commit
823069d4a6
1 changed files with 22 additions and 0 deletions
  1. 22 0
      direct/src/plugin/mkdir_complete.cxx

+ 22 - 0
direct/src/plugin/mkdir_complete.cxx

@@ -23,6 +23,26 @@
 #endif
 #endif
 
 
 
 
+
+////////////////////////////////////////////////////////////////////
+//     Function: is_pathsep
+//  Description: Returns true if the indicated character is a path
+//               separator character (e.g. slash or backslash), false
+//               otherwise.
+////////////////////////////////////////////////////////////////////
+static inline bool
+is_pathsep(char ch) {
+  if (ch == '/') {
+    return true;
+  }
+#ifdef _WIN32
+  if (ch == '\\') {
+    return true;
+  }
+#endif
+  return false;
+}
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: get_dirname
 //     Function: get_dirname
 //  Description: Returns the directory component of the indicated
 //  Description: Returns the directory component of the indicated
@@ -42,6 +62,8 @@ get_dirname(const string &filename) {
   return string();
   return string();
 }
 }
 
 
+
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: mkdir_complete
 //     Function: mkdir_complete
 //  Description: Creates a new directory, with normal access
 //  Description: Creates a new directory, with normal access