diff liboctave/oct-env.cc @ 4101:ea537559ab07

[project @ 2002-10-11 20:57:21 by jwe]
author jwe
date Fri, 11 Oct 2002 20:57:21 +0000
parents 3add04256a60
children 4c8a2e4e0717
line wrap: on
line diff
--- a/liboctave/oct-env.cc	Fri Oct 11 16:37:45 2002 +0000
+++ b/liboctave/oct-env.cc	Fri Oct 11 20:57:21 2002 +0000
@@ -201,7 +201,7 @@
 {
   program_invocation_name = s;
 
-  size_t pos = program_invocation_name.find_last_of (OCTAVE_DIR_SEP_CHARS);
+  size_t pos = program_invocation_name.find_last_of (file_ops::dir_sep_chars);
 
   program_name = (pos == NPOS)
     ? program_invocation_name : program_invocation_name.substr (pos+1);
@@ -242,7 +242,7 @@
   if (file_ops::is_dir_sep (s[0]))
     return true;
 
-#if defined (__WIN32__) || defined (__CYGWIN__)
+#if defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM)
   if ((len == 2 && isalpha (s[0]) && s[1] == ':')
       || (len > 2 && isalpha (s[0]) && s[1] == ':'
 	  && file_ops::is_dir_sep (s[2])))
@@ -262,7 +262,7 @@
   if (! do_absolute_pathname (s))
     return s;
 
-  size_t pos = s.find_last_of (OCTAVE_DIR_SEP_CHARS);
+  size_t pos = s.find_last_of (file_ops::dir_sep_chars);
 
   if (pos == NPOS)
     return s;
@@ -293,7 +293,7 @@
   size_t pos = current_dir.length () - 1;
 
   if (! file_ops::is_dir_sep (current_dir[pos]))
-    current_dir.append (OCTAVE_DIR_SEP_STR);
+    current_dir.append (file_ops::dir_sep_str);
 
   // XXX FIXME XXX -- this is probably not correct for all systems.
 
@@ -327,7 +327,7 @@
 	    }
 	}
 
-      size_t tmp = s.find_first_of (OCTAVE_DIR_SEP_CHARS, i);
+      size_t tmp = s.find_first_of (file_ops::dir_sep_chars, i);
 
       if (tmp == NPOS)
 	{
@@ -370,7 +370,7 @@
     {
       octave_passwd pw = octave_passwd::getpwuid (octave_syscalls::getuid ());
 
-      hd = pw ? pw.dir () : std::string (OCTAVE_DIR_SEP_STR);
+      hd = pw ? pw.dir () : std::string (file_ops::dir_sep_str);
     }
 
   return hd;