diff libinterp/corefcn/load-path.cc @ 27102:84ff9953faa1

where possible, eliminate octave:: namespace qualifier inside octave namespace Affected files: file-editor-tab.cc, file-editor.cc, main-window.cc, octave-cmd.h, octave-qt-link.cc, settings-dialog.cc, call-stack.cc, environment.cc, ft-text-renderer.cc, gl2ps-print.cc, help.cc, input.cc, interpreter-private.cc, interpreter-private.h, interpreter.cc, load-path.cc, oct-hist.cc, oct-process.cc, oct-stream.cc, pager.cc, syminfo.cc, symtab.h, sysdep.cc, text-renderer.cc, utils.cc, gzip.cc, cdef-manager.cc, ov-fcn-handle.cc, ov-java.cc, jit-typeinfo.cc, oct-parse.yy, pt-eval.cc, pt-tm-const.cc, chol.cc, gsvd.cc, oct-rand.cc, oct-rand.h, randmtzig.cc, randpoisson.cc, file-ops.cc, lo-sysdep.cc, file-info.cc, oct-glob.cc, oct-sparse.cc, and url-transfer.cc.
author John W. Eaton <jwe@octave.org>
date Wed, 22 May 2019 13:57:30 +0000
parents 097774bed4ed
children 0040b7668518
line wrap: on
line diff
--- a/libinterp/corefcn/load-path.cc	Tue May 21 19:50:59 2019 +0000
+++ b/libinterp/corefcn/load-path.cc	Wed May 22 13:57:30 2019 +0000
@@ -51,14 +51,14 @@
   static void
   maybe_add_path_elts (std::string& path, const std::string& dir)
   {
-    std::string tpath = octave::genpath (dir);
+    std::string tpath = genpath (dir);
 
     if (! tpath.empty ())
       {
         if (path.empty ())
           path = tpath;
         else
-          path += octave::directory_path::path_sep_str () + tpath;
+          path += directory_path::path_sep_str () + tpath;
       }
   }
 
@@ -68,7 +68,7 @@
     std::list<std::string> retval;
 
     size_t beg = 0;
-    size_t end = p.find (octave::directory_path::path_sep_char ());
+    size_t end = p.find (directory_path::path_sep_char ());
 
     size_t len = p.length ();
 
@@ -84,7 +84,7 @@
         if (beg == len)
           break;
 
-        end = p.find (octave::directory_path::path_sep_char (), beg);
+        end = p.find (directory_path::path_sep_char (), beg);
       }
 
     std::string elt = p.substr (beg);
@@ -104,7 +104,7 @@
 
     size_t k = dir.length ();
 
-    while (k > 1 && octave::sys::file_ops::is_dir_sep (dir[k-1]))
+    while (k > 1 && sys::file_ops::is_dir_sep (dir[k-1]))
       k--;
 
     if (k < dir.length ())
@@ -124,7 +124,7 @@
     // Look in private directory corresponding to current function (if
     // any).
 
-    octave::symbol_scope scope = octave::__get_current_scope__ ("find_private_file");
+    symbol_scope scope = __get_current_scope__ ("find_private_file");
 
     octave_user_function *curr_fcn = scope ? scope.function () : nullptr;
 
@@ -138,10 +138,10 @@
 
         if (! dir_name.empty ())
           {
-            std::string pfname = dir_name + octave::sys::file_ops::dir_sep_str ()
-              + "private" + octave::sys::file_ops::dir_sep_str () + fname;
-
-            octave::sys::file_stat fs (pfname);
+            std::string pfname = dir_name + sys::file_ops::dir_sep_str ()
+              + "private" + sys::file_ops::dir_sep_str () + fname;
+
+            sys::file_stat fs (pfname);
 
             if (fs.exists () && fs.is_reg ())
               retval = pfname;
@@ -159,7 +159,7 @@
     size_t ps = path.size ();
     size_t pls = path_list.size ();
     size_t pos = path_list.find (path);
-    char psc = octave::directory_path::path_sep_char ();
+    char psc = directory_path::path_sep_char ();
     while (pos != std::string::npos)
       {
         if ((pos == 0 || path_list[pos-1] == psc)
@@ -175,7 +175,7 @@
   static void
   rehash_internal (void)
   {
-    octave::load_path& lp = octave::__get_load_path__ ("rehash_internal");
+    load_path& lp = __get_load_path__ ("rehash_internal");
 
     lp.update ();
 
@@ -846,14 +846,14 @@
     if (! octave_interpreter_ready)
       return;
 
-    octave::unwind_protect frame;
-
-    std::string file = octave::sys::file_ops::concat (dir, script_file);
-
-    octave::sys::file_stat fs (file);
+    unwind_protect frame;
+
+    std::string file = sys::file_ops::concat (dir, script_file);
+
+    sys::file_stat fs (file);
 
     if (fs.exists ())
-      octave::source_file (file, "base");
+      source_file (file, "base");
   }
 
   // FIXME: maybe we should also maintain a map to speed up this method of access.
@@ -1082,7 +1082,7 @@
     string_vector flist;
     std::string msg;
 
-    if (! octave::sys::get_dirlist (d, flist, msg))
+    if (! sys::get_dirlist (d, flist, msg))
       warning ("load_path: %s: %s", d.c_str (), msg.c_str ());
     else
       {