changeset 23696:08036a7f3660

remove octave:: namespace tag from symbols used inside octave namespace * octave-gui.cc, dynamic-ld.h, ft-text-renderer.cc, gl-render.cc, gl-render.h, gl2ps-print.cc, input.cc, input.h, interpreter.cc, load-path.cc, load-path.h, oct-stream.cc, sighandlers.cc, symtab.cc, symtab.h, __ode15__.cc, gzip.cc, octave.cc, lex.ll, oct-parse.in.yy, parse.h, pt-arg-list.cc, pt-arg-list.h, pt-array-list.h, pt-classdef.h, pt-decl.h, pt-eval.cc, pt-eval.h, pt-exp.h, pt-fcn-handle.cc, pt-idx.cc, pt-misc.h, pt-select.h, pt-stmt.h, pt-tm-const.cc, pt-tm-const.h, pt.cc, aepbalance.cc, chol.cc, gepbalance.cc, gsvd.cc, hess.cc, lo-mappers.h, lo-specfun.cc, lu.cc, qr.cc, qrp.cc, schur.cc, sparse-chol.cc, sparse-lu.cc, sparse-qr.cc, svd.cc, child-list.cc, dir-ops.cc, file-ops.cc, file-stat.cc, file-stat.h, lo-sysdep.cc, oct-env.cc, oct-syscalls.cc, cmd-edit.cc, cmd-hist.cc, oct-glob.cc, oct-locbuf.cc, oct-mutex.cc, oct-mutex.h, oct-shlib.cc, oct-shlib.h, pathsearch.cc, url-transfer.cc, url-transfer.h: Remove octave:: namespace tag from symbols used inside octave namespace. * oct-conf-post.in.h (OCTAVE_USE_DEPRECATED_FUNCTIONS): Don't define.
author John W. Eaton <jwe@octave.org>
date Mon, 26 Jun 2017 09:05:37 -0400
parents 47c39af89401
children c68c98d0b09f
files libgui/src/octave-gui.cc libinterp/corefcn/dynamic-ld.h libinterp/corefcn/ft-text-renderer.cc libinterp/corefcn/gl-render.cc libinterp/corefcn/gl-render.h libinterp/corefcn/gl2ps-print.cc libinterp/corefcn/input.cc libinterp/corefcn/input.h libinterp/corefcn/interpreter.cc libinterp/corefcn/load-path.cc libinterp/corefcn/load-path.h libinterp/corefcn/oct-stream.cc libinterp/corefcn/sighandlers.cc libinterp/corefcn/symtab.cc libinterp/corefcn/symtab.h libinterp/dldfcn/__ode15__.cc libinterp/dldfcn/gzip.cc libinterp/octave.cc libinterp/parse-tree/lex.ll libinterp/parse-tree/oct-parse.in.yy libinterp/parse-tree/parse.h libinterp/parse-tree/pt-arg-list.cc libinterp/parse-tree/pt-arg-list.h libinterp/parse-tree/pt-array-list.h libinterp/parse-tree/pt-classdef.h libinterp/parse-tree/pt-decl.h libinterp/parse-tree/pt-eval.cc libinterp/parse-tree/pt-eval.h libinterp/parse-tree/pt-exp.h libinterp/parse-tree/pt-fcn-handle.cc libinterp/parse-tree/pt-idx.cc libinterp/parse-tree/pt-misc.h libinterp/parse-tree/pt-select.h libinterp/parse-tree/pt-stmt.h libinterp/parse-tree/pt-tm-const.cc libinterp/parse-tree/pt-tm-const.h libinterp/parse-tree/pt.cc liboctave/numeric/aepbalance.cc liboctave/numeric/chol.cc liboctave/numeric/gepbalance.cc liboctave/numeric/gsvd.cc liboctave/numeric/hess.cc liboctave/numeric/lo-mappers.h liboctave/numeric/lo-specfun.cc liboctave/numeric/lu.cc liboctave/numeric/qr.cc liboctave/numeric/qrp.cc liboctave/numeric/schur.cc liboctave/numeric/sparse-chol.cc liboctave/numeric/sparse-lu.cc liboctave/numeric/sparse-qr.cc liboctave/numeric/svd.cc liboctave/system/child-list.cc liboctave/system/dir-ops.cc liboctave/system/file-ops.cc liboctave/system/file-stat.cc liboctave/system/file-stat.h liboctave/system/lo-sysdep.cc liboctave/system/oct-env.cc liboctave/system/oct-syscalls.cc liboctave/util/cmd-edit.cc liboctave/util/cmd-hist.cc liboctave/util/oct-glob.cc liboctave/util/oct-locbuf.cc liboctave/util/oct-mutex.cc liboctave/util/oct-mutex.h liboctave/util/oct-shlib.cc liboctave/util/oct-shlib.h liboctave/util/pathsearch.cc liboctave/util/url-transfer.cc liboctave/util/url-transfer.h oct-conf-post.in.h
diffstat 72 files changed, 1230 insertions(+), 1222 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/octave-gui.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libgui/src/octave-gui.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -138,7 +138,7 @@
     set_application_id ();
 
     std::string show_gui_msgs =
-      octave::sys::env::getenv ("OCTAVE_SHOW_GUI_MESSAGES");
+      sys::env::getenv ("OCTAVE_SHOW_GUI_MESSAGES");
 
     // Installing our handler suppresses the messages.
 
@@ -215,9 +215,9 @@
         // TERM is always set appropriately.
 
 #if defined (OCTAVE_USE_WINDOWS_API)
-        octave::sys::env::putenv ("TERM", "cygwin");
+        sys::env::putenv ("TERM", "cygwin");
 #else
-        octave::sys::env::putenv ("TERM", "xterm");
+        sys::env::putenv ("TERM", "xterm");
 #endif
 
         shortcut_manager::init_data ();
--- a/libinterp/corefcn/dynamic-ld.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/dynamic-ld.h	Mon Jun 26 09:05:37 2017 -0400
@@ -46,8 +46,8 @@
     {
     public:
 
-      typedef std::list<octave::dynamic_library>::iterator iterator;
-      typedef std::list<octave::dynamic_library>::const_iterator const_iterator;
+      typedef std::list<dynamic_library>::iterator iterator;
+      typedef std::list<dynamic_library>::const_iterator const_iterator;
 
       shlibs_list (void) : m_lib_list () { }
 
@@ -59,18 +59,18 @@
 
       ~shlibs_list (void) = default;
 
-      void append (const octave::dynamic_library& shl);
+      void append (const dynamic_library& shl);
 
-      std::list<std::string> remove (octave::dynamic_library& shl);
+      std::list<std::string> remove (dynamic_library& shl);
 
-      octave::dynamic_library find_file (const std::string& file_name) const;
+      dynamic_library find_file (const std::string& file_name) const;
 
       void display (void) const;
 
     private:
 
       // List of libraries we have loaded.
-      std::list<octave::dynamic_library> m_lib_list;
+      std::list<dynamic_library> m_lib_list;
     };
 
 
@@ -99,16 +99,16 @@
               bool relative = false);
 
     bool remove_oct (const std::string& fcn_name,
-                            octave::dynamic_library& shl);
+                            dynamic_library& shl);
 
     bool remove_mex (const std::string& fcn_name,
-                            octave::dynamic_library& shl);
+                            dynamic_library& shl);
 
   private:
 
     void clear_function (const std::string& fcn_name);
 
-    void clear (octave::dynamic_library& oct_file);
+    void clear (dynamic_library& oct_file);
 
     interpreter& m_interpreter;
 
--- a/libinterp/corefcn/ft-text-renderer.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/ft-text-renderer.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -615,7 +615,7 @@
               {
                 bbox(1) -= lbox(3);
                 bbox(3) += lbox(3);
-                bbox(2) = octave::math::max (bbox(2), lbox(2));
+                bbox(2) = math::max (bbox(2), lbox(2));
               }
           }
         break;
@@ -817,7 +817,7 @@
                     // glyph.  Then extend the line bounding box if necessary.
 
                     xoffset += (face->glyph->advance.x >> 6);
-                    bb(2) = octave::math::max (bb(2), xoffset);
+                    bb(2) = math::max (bb(2), xoffset);
                   }
                 break;
               }
@@ -1084,7 +1084,7 @@
       {
         xoffset = saved_xoffset;
         txt_elt->accept (*this);
-        max_xoffset = octave::math::max (xoffset, max_xoffset);
+        max_xoffset = math::max (xoffset, max_xoffset);
       }
 
     xoffset = max_xoffset;
--- a/libinterp/corefcn/gl-render.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/gl-render.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -127,7 +127,7 @@
       int tw, th;
       double tx, ty;
       bool valid;
-      octave::refcount<int> count;
+      refcount<int> count;
     };
 
     texture_rep *rep;
@@ -378,7 +378,7 @@
       float specular_color_refl;
 
       // reference counter
-      octave::refcount<int> count;
+      refcount<int> count;
 
       vertex_data_rep (void)
         : coords (), color (), normal (), alpha (),
@@ -1434,7 +1434,7 @@
         string_vector xticklabels = props.get_xticklabel ().string_vector_value ();
         int wmax = 0;
         int hmax = 0;
-        bool tick_along_z = nearhoriz || octave::math::isinf (fy);
+        bool tick_along_z = nearhoriz || math::isinf (fy);
         bool mirror = props.is_box () && xstate != AXE_ANY_DIR;
 
         if (props.xcolormode_is ("manual"))
@@ -1477,7 +1477,7 @@
         double y_axis_pos = 0.;
         if (is_origin)
           {
-            y_axis_pos = octave::math::max (octave::math::min (0., y_max),
+            y_axis_pos = math::max (math::min (0., y_max),
                                             y_min);
             glBegin (GL_LINES);
             set_color (props.get_ycolor_rgb ());
@@ -1494,14 +1494,14 @@
                                 is_origin ? y_axis_pos : ypTick, ypTick,
                                 zpTick, zpTickN, 0., 0.,
                                 (is_origin_low ? -1. : 1.) *
-                                octave::math::signum (zpTick-zpTickN)*fz*xticklen/2,
+                                math::signum (zpTick-zpTickN)*fz*xticklen/2,
                                 0, ! is_origin && mirror);
             else
               render_tickmarks (xmticks, x_min, x_max,
                                 is_origin ? y_axis_pos : ypTick, ypTickN,
                                 zpTick, zpTick, 0.,
                                 (is_origin_low ? -1. : 1.) *
-                                octave::math::signum (ypTick-ypTickN)*fy*xticklen/2,
+                                math::signum (ypTick-ypTickN)*fy*xticklen/2,
                                 0., 0, ! is_origin && mirror);
           }
 
@@ -1511,14 +1511,14 @@
                             is_origin ? y_axis_pos : ypTick, ypTick,
                             zpTick, zpTickN, 0., 0.,
                             (is_origin_low ? -1. : 1.) *
-                            octave::math::signum (zpTick-zpTickN)*fz*xticklen,
+                            math::signum (zpTick-zpTickN)*fz*xticklen,
                             0, ! is_origin && mirror);
         else
           render_tickmarks (xticks, x_min, x_max,
                             is_origin ? y_axis_pos : ypTick, ypTickN,
                             zpTick, zpTick, 0.,
                             (is_origin_low ? -1. : 1.) *
-                            octave::math::signum (ypTick-ypTickN)*fy*xticklen,
+                            math::signum (ypTick-ypTickN)*fy*xticklen,
                             0., 0, ! is_origin && mirror);
 
         // tick texts
@@ -1536,13 +1536,13 @@
                                 is_origin ? y_axis_pos : ypTick,
                                 zpTick +
                                 (is_origin_low ? -1. : 1.) *
-                                octave::math::signum (zpTick-zpTickN)*fz*xtickoffset,
+                                math::signum (zpTick-zpTickN)*fz*xtickoffset,
                                 0, halign, valign, wmax, hmax);
             else
               render_ticktexts (xticks, xticklabels, x_min, x_max,
                                 (is_origin ? y_axis_pos : ypTick) +
                                 (is_origin_low ?  -1. : 1.) *
-                                octave::math::signum (ypTick-ypTickN)*fy*xtickoffset,
+                                math::signum (ypTick-ypTickN)*fy*xtickoffset,
                                 zpTick, 0, halign, valign, wmax, hmax);
           }
 
@@ -1615,7 +1615,7 @@
         string_vector yticklabels = props.get_yticklabel ().string_vector_value ();
         int wmax = 0;
         int hmax = 0;
-        bool tick_along_z = nearhoriz || octave::math::isinf (fx);
+        bool tick_along_z = nearhoriz || math::isinf (fx);
         bool mirror = props.is_box () && ystate != AXE_ANY_DIR
                       && (! props.has_property ("__plotyy_axes__"));
 
@@ -1659,7 +1659,7 @@
         double x_axis_pos = 0.;
         if (is_origin)
           {
-            x_axis_pos = octave::math::max (octave::math::min (0., x_max),
+            x_axis_pos = math::max (math::min (0., x_max),
                                             x_min);
             glBegin (GL_LINES);
             set_color (props.get_ycolor_rgb ());
@@ -1676,14 +1676,14 @@
                                 is_origin ? x_axis_pos : xpTick, xpTick,
                                 zpTick, zpTickN, 0., 0.,
                                 (is_origin_low ? -1. : 1.) *
-                                octave::math::signum (zpTick-zpTickN)*fz*yticklen/2,
+                                math::signum (zpTick-zpTickN)*fz*yticklen/2,
                                 1, ! is_origin && mirror);
             else
               render_tickmarks (ymticks, y_min, y_max,
                                 is_origin ? x_axis_pos : xpTick, xpTickN,
                                 zpTick, zpTick,
                                 (is_origin_low ? -1. : 1.) *
-                                octave::math::signum (xpTick-xpTickN)*fx*yticklen/2,
+                                math::signum (xpTick-xpTickN)*fx*yticklen/2,
                                 0., 0., 1, ! is_origin && mirror);
           }
 
@@ -1693,14 +1693,14 @@
                             is_origin ? x_axis_pos : xpTick, xpTick,
                             zpTick, zpTickN, 0., 0.,
                             (is_origin_low ? -1. : 1.) *
-                            octave::math::signum (zpTick-zpTickN)*fz*yticklen,
+                            math::signum (zpTick-zpTickN)*fz*yticklen,
                             1, ! is_origin && mirror);
         else
           render_tickmarks (yticks, y_min, y_max,
                             is_origin ? x_axis_pos : xpTick, xpTickN,
                             zpTick, zpTick,
                             (is_origin_low ? -1. : 1.) *
-                            octave::math::signum (xPlaneN-xPlane)*fx*yticklen,
+                            math::signum (xPlaneN-xPlane)*fx*yticklen,
                             0., 0., 1, ! is_origin && mirror);
 
         // tick texts
@@ -1718,13 +1718,13 @@
                                 is_origin ? x_axis_pos : xpTick,
                                 zpTick +
                                 (is_origin_low ? -1. : 1.) *
-                                octave::math::signum (zpTick-zpTickN)*fz*ytickoffset,
+                                math::signum (zpTick-zpTickN)*fz*ytickoffset,
                                 1, halign, valign, wmax, hmax);
             else
               render_ticktexts (yticks, yticklabels, y_min, y_max,
                                 (is_origin ? x_axis_pos : xpTick) +
                                 (is_origin_low ?  -1. : 1.) *
-                                octave::math::signum (xpTick-xpTickN)*fx*ytickoffset,
+                                math::signum (xpTick-xpTickN)*fx*ytickoffset,
                                 zpTick, 1, halign, valign, wmax, hmax);
           }
 
@@ -1824,28 +1824,28 @@
           {
             if (xySym)
               {
-                if (octave::math::isinf (fy))
+                if (math::isinf (fy))
                   render_tickmarks (zmticks, z_min, z_max, xPlaneN, xPlane,
                                     yPlane, yPlane,
-                                    octave::math::signum (xPlaneN-xPlane)*fx*zticklen/2,
+                                    math::signum (xPlaneN-xPlane)*fx*zticklen/2,
                                     0., 0., 2, mirror);
                 else
                   render_tickmarks (zmticks, z_min, z_max, xPlaneN, xPlaneN,
                                     yPlane, yPlane, 0.,
-                                    octave::math::signum (yPlane-yPlaneN)*fy*zticklen/2,
+                                    math::signum (yPlane-yPlaneN)*fy*zticklen/2,
                                     0., 2, false);
               }
             else
               {
-                if (octave::math::isinf (fx))
+                if (math::isinf (fx))
                   render_tickmarks (zmticks, z_min, z_max, xPlane, xPlane,
                                     yPlaneN, yPlane, 0.,
-                                    octave::math::signum (yPlaneN-yPlane)*fy*zticklen/2,
+                                    math::signum (yPlaneN-yPlane)*fy*zticklen/2,
                                     0., 2, mirror);
                 else
                   render_tickmarks (zmticks, z_min, z_max, xPlane, xPlane,
                                     yPlaneN, yPlaneN,
-                                    octave::math::signum (xPlane-xPlaneN)*fx*zticklen/2,
+                                    math::signum (xPlane-xPlaneN)*fx*zticklen/2,
                                     0., 0., 2, false);
               }
           }
@@ -1853,28 +1853,28 @@
         // tick marks
         if (xySym)
           {
-            if (octave::math::isinf (fy))
+            if (math::isinf (fy))
               render_tickmarks (zticks, z_min, z_max, xPlaneN, xPlane,
                                 yPlane, yPlane,
-                                octave::math::signum (xPlaneN-xPlane)*fx*zticklen,
+                                math::signum (xPlaneN-xPlane)*fx*zticklen,
                                 0., 0., 2, mirror);
             else
               render_tickmarks (zticks, z_min, z_max, xPlaneN, xPlaneN,
                                 yPlane, yPlane, 0.,
-                                octave::math::signum (yPlane-yPlaneN)*fy*zticklen,
+                                math::signum (yPlane-yPlaneN)*fy*zticklen,
                                 0., 2, false);
           }
         else
           {
-            if (octave::math::isinf (fx))
+            if (math::isinf (fx))
               render_tickmarks (zticks, z_min, z_max, xPlaneN, xPlane,
                                 yPlaneN, yPlane, 0.,
-                                octave::math::signum (yPlaneN-yPlane)*fy*zticklen,
+                                math::signum (yPlaneN-yPlane)*fy*zticklen,
                                 0., 2, mirror);
             else
               render_tickmarks (zticks, z_min, z_max, xPlane, xPlane,
                                 yPlaneN, yPlane,
-                                octave::math::signum (xPlane-xPlaneN)*fx*zticklen,
+                                math::signum (xPlane-xPlaneN)*fx*zticklen,
                                 0., 0., 2, false);
           }
 
@@ -1886,24 +1886,24 @@
 
             if (xySym)
               {
-                if (octave::math::isinf (fy))
+                if (math::isinf (fy))
                   render_ticktexts (zticks, zticklabels, z_min, z_max,
-                                    xPlaneN + octave::math::signum (xPlaneN-xPlane)*fx*ztickoffset,
+                                    xPlaneN + math::signum (xPlaneN-xPlane)*fx*ztickoffset,
                                     yPlane, 2, halign, valign, wmax, hmax);
                 else
                   render_ticktexts (zticks, zticklabels, z_min, z_max, xPlaneN,
-                                    yPlane + octave::math::signum (yPlane-yPlaneN)*fy*ztickoffset,
+                                    yPlane + math::signum (yPlane-yPlaneN)*fy*ztickoffset,
                                     2, halign, valign, wmax, hmax);
               }
             else
               {
-                if (octave::math::isinf (fx))
+                if (math::isinf (fx))
                   render_ticktexts (zticks, zticklabels, z_min, z_max, xPlane,
-                                    yPlaneN + octave::math::signum (yPlaneN-yPlane)*fy*ztickoffset,
+                                    yPlaneN + math::signum (yPlaneN-yPlane)*fy*ztickoffset,
                                     2, halign, valign, wmax, hmax);
                 else
                   render_ticktexts (zticks, zticklabels, z_min, z_max,
-                                    xPlane + octave::math::signum (xPlane-xPlaneN)*fx*ztickoffset,
+                                    xPlane + math::signum (xPlane-xPlaneN)*fx*ztickoffset,
                                     yPlaneN, 2, halign, valign, wmax, hmax);
               }
           }
@@ -2420,14 +2420,14 @@
                     if (fc_mode == FLAT)
                       {
                         // "flat" only needs color at lower-left vertex
-                        if (! octave::math::isfinite (c(j-1,i-1)))
+                        if (! math::isfinite (c(j-1,i-1)))
                           continue;
                       }
                     else if (fc_mode == INTERP)
                       {
                         // "interp" needs valid color at all 4 vertices
-                        if (! (octave::math::isfinite (c(j-1, i-1)) && octave::math::isfinite (c(j, i-1))
-                               && octave::math::isfinite (c(j-1, i)) && octave::math::isfinite (c(j, i))))
+                        if (! (math::isfinite (c(j-1, i-1)) && math::isfinite (c(j, i-1))
+                               && math::isfinite (c(j-1, i)) && math::isfinite (c(j, i))))
                           continue;
                       }
 
@@ -2629,13 +2629,13 @@
                         if (ec_mode == FLAT)
                           {
                             // "flat" only needs color at lower-left vertex
-                            if (! octave::math::isfinite (c(j-1,i)))
+                            if (! math::isfinite (c(j-1,i)))
                               continue;
                           }
                         else if (ec_mode == INTERP)
                           {
                             // "interp" needs valid color at both vertices
-                            if (! (octave::math::isfinite (c(j-1, i)) && octave::math::isfinite (c(j, i))))
+                            if (! (math::isfinite (c(j-1, i)) && math::isfinite (c(j, i))))
                               continue;
                           }
 
@@ -2726,13 +2726,13 @@
                         if (ec_mode == FLAT)
                           {
                             // "flat" only needs color at lower-left vertex
-                            if (! octave::math::isfinite (c(j,i-1)))
+                            if (! math::isfinite (c(j,i-1)))
                               continue;
                           }
                         else if (ec_mode == INTERP)
                           {
                             // "interp" needs valid color at both vertices
-                            if (! (octave::math::isfinite (c(j, i-1)) && octave::math::isfinite (c(j, i))))
+                            if (! (math::isfinite (c(j, i-1)) && math::isfinite (c(j, i))))
                               continue;
                           }
 
@@ -2864,7 +2864,7 @@
                 if ((do_edge && mecolor.isempty ())
                     || (do_face && mfcolor.isempty ()))
                   {
-                    if (! octave::math::isfinite (c(j,i)))
+                    if (! math::isfinite (c(j,i)))
                       continue;  // Skip NaNs in color data
 
                     for (int k = 0; k < 3; k++)
@@ -2969,7 +2969,7 @@
         bool fclip = false;
         int count = 0;
 
-        for (int j = 0; j < fcmax && ! octave::math::isnan (f(i,j)); j++, count++)
+        for (int j = 0; j < fcmax && ! math::isnan (f(i,j)); j++, count++)
           fclip = (fclip || clip(int (f(i,j) - 1)));
 
         clip_f(i) = fclip;
@@ -3474,8 +3474,8 @@
     const ColumnVector p0 = xform.transform (x(0), y(0), 0);
     const ColumnVector p1 = xform.transform (x(1), y(1), 0);
 
-    if (octave::math::isnan (p0(0)) || octave::math::isnan (p0(1))
-        || octave::math::isnan (p1(0)) || octave::math::isnan (p1(1)))
+    if (math::isnan (p0(0)) || math::isnan (p0(1))
+        || math::isnan (p1(0)) || math::isnan (p1(1)))
       {
         warning ("opengl_renderer: image X,Y data too large to draw");
         return;
--- a/libinterp/corefcn/gl-render.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/gl-render.h	Mon Jun 26 09:05:37 2017 -0400
@@ -148,10 +148,10 @@
 
     bool is_nan_or_inf (double x, double y, double z) const
     {
-      return (octave::math::isnan (x) || octave::math::isnan (y)
-              || octave::math::isnan (z)
-              || octave::math::isinf (x) || octave::math::isinf (y)
-              || octave::math::isinf (z));
+      return (math::isnan (x) || math::isnan (y)
+              || math::isnan (z)
+              || math::isinf (x) || math::isinf (y)
+              || math::isinf (z));
     }
 
     octave_uint8 clip_code (double x, double y, double z) const
--- a/libinterp/corefcn/gl2ps-print.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/gl2ps-print.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -57,7 +57,7 @@
   public:
 
     gl2ps_renderer (FILE *_fp, const std::string& _term)
-      : octave::opengl_renderer () , fp (_fp), term (_term), fontsize (),
+      : opengl_renderer () , fp (_fp), term (_term), fontsize (),
         fontname (), buffer_overflow (false)
     { }
 
@@ -68,7 +68,7 @@
     // have to do this?  Without the using declaration or a name change,
     // the base class functions will be hidden.  That may be OK, but it
     // can also cause some confusion.
-    using octave::opengl_renderer::draw;
+    using opengl_renderer::draw;
 
     void draw (const graphics_object& go, const std::string& print_cmd);
 
@@ -88,7 +88,7 @@
       gl2psBeginViewport (vp);
 
       // Draw and finish () or there may primitives missing in the gl2ps output.
-      octave::opengl_renderer::draw_axes (props);
+      opengl_renderer::draw_axes (props);
       finish ();
 
       // Finalize viewport
@@ -116,7 +116,7 @@
     void set_linestyle (const std::string& s, bool use_stipple = false,
                         double linewidth = 0.5)
     {
-      octave::opengl_renderer::set_linestyle (s, use_stipple, linewidth);
+      opengl_renderer::set_linestyle (s, use_stipple, linewidth);
 
       if (s == "-" && ! use_stipple)
         gl2psDisable (GL2PS_LINE_STIPPLE);
@@ -126,7 +126,7 @@
 
     void set_linecap (const std::string& s)
       {
-        octave::opengl_renderer::set_linejoin (s);
+        opengl_renderer::set_linejoin (s);
 
 #if defined (HAVE_GL2PSLINEJOIN)
         if (s == "butt")
@@ -140,7 +140,7 @@
 
     void set_linejoin (const std::string& s)
     {
-      octave::opengl_renderer::set_linejoin (s);
+      opengl_renderer::set_linejoin (s);
 
 #if defined (HAVE_GL2PSLINEJOIN)
       if (s == "round")
@@ -156,13 +156,13 @@
     {
       if (on)
         {
-          octave::opengl_renderer::set_polygon_offset (on, offset);
+          opengl_renderer::set_polygon_offset (on, offset);
           gl2psEnable (GL2PS_POLYGON_OFFSET_FILL);
         }
       else
         {
           gl2psDisable (GL2PS_POLYGON_OFFSET_FILL);
-          octave::opengl_renderer::set_polygon_offset (on, offset);
+          opengl_renderer::set_polygon_offset (on, offset);
         }
     }
 
@@ -177,7 +177,7 @@
     // that have been parsed by freetype
     void fix_strlist_position (double x, double y, double z,
                                Matrix box, double rotation,
-                               std::list<octave::text_renderer::string>& lst);
+                               std::list<text_renderer::string>& lst);
 
     int alignment_to_mode (int ha, int va) const;
     FILE *fp;
@@ -196,7 +196,7 @@
 
     if (! in_draw)
       {
-        octave::unwind_protect frame;
+        unwind_protect frame;
 
         frame.protect_var (in_draw);
 
@@ -298,7 +298,7 @@
                 error ("gl2ps_renderer::draw: gl2psBeginPage returned GL2PS_ERROR");
               }
 
-            octave::opengl_renderer::draw (go);
+            opengl_renderer::draw (go);
 
             if (buffer_overflow)
               warning ("gl2ps_renderer::draw: retrying with buffer size: %.1E B\n", double (2*buffsize));
@@ -325,14 +325,14 @@
                 nwrite = std::fwrite (str, 1, nread, fp);
                 if (nwrite != nread)
                   {
-                    octave::signal_handler ();   // Clear SIGPIPE signal
+                    signal_handler ();   // Clear SIGPIPE signal
                     error ("gl2ps_renderer::draw: internal pipe error");
                   }
               }
           }
       }
     else
-      octave::opengl_renderer::draw (go);
+      opengl_renderer::draw (go);
   }
 
   int
@@ -374,7 +374,7 @@
   void
   gl2ps_renderer::fix_strlist_position (double x, double y, double z,
                                         Matrix box, double rotation,
-                                        std::list<octave::text_renderer::string>& lst)
+                                        std::list<text_renderer::string>& lst)
   {
     for (auto& txtobj : lst)
       {
@@ -626,7 +626,7 @@
     // string using freetype
     Matrix bbox;
     std::string str = txt;
-    std::list<octave::text_renderer::string> lst;
+    std::list<text_renderer::string> lst;
 
     text_to_strlist (str, lst, bbox, ha, va, rotation);
 
@@ -639,7 +639,7 @@
         int sz = fontsize;
         if (! lst.empty () && term.find ("tex") == std::string::npos)
           {
-            octave::text_renderer::string s = lst.front ();
+            text_renderer::string s = lst.front ();
             name = select_font (s.get_name (), s.get_weight () == "bold",
                                 s.get_angle () == "italic");
             set_color (s.get_color ());
@@ -711,7 +711,7 @@
   void
   gl2ps_renderer::set_font (const base_properties& props)
   {
-    octave::opengl_renderer::set_font (props);
+    opengl_renderer::set_font (props);
 
     // Set the interpreter so that text_to_pixels can parse strings properly
     if (props.has_property ("interpreter"))
@@ -847,7 +847,7 @@
 
     FILE *fp = nullptr;
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     if (have_cmd)
       {
--- a/libinterp/corefcn/input.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/input.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -151,7 +151,7 @@
   void
   base_reader::do_input_echo (const std::string& input_string) const
   {
-    bool forced_interactive = octave::application::forced_interactive ();
+    bool forced_interactive = application::forced_interactive ();
 
     int do_echo = reading_script_file ()
       ? (Vecho_executing_commands & ECHO_SCRIPTS)
@@ -162,12 +162,12 @@
         if (forced_interactive)
           {
             if (pflag > 0)
-              octave_stdout << octave::command_editor::decode_prompt_string (VPS1);
+              octave_stdout << command_editor::decode_prompt_string (VPS1);
             else
-              octave_stdout << octave::command_editor::decode_prompt_string (VPS2);
+              octave_stdout << command_editor::decode_prompt_string (VPS2);
           }
         else
-          octave_stdout << octave::command_editor::decode_prompt_string (VPS4);
+          octave_stdout << command_editor::decode_prompt_string (VPS4);
 
         if (! input_string.empty ())
           {
@@ -249,7 +249,7 @@
     // Process pre input event hook function prior to flushing output and
     // printing the prompt.
 
-    if (octave::application::interactive ())
+    if (application::interactive ())
       {
         if (! Vdebugging)
           octave_link::exit_debugger_event ();
@@ -263,14 +263,14 @@
 
     std::string ps = (pflag > 0) ? VPS1 : VPS2;
 
-    std::string prompt = octave::command_editor::decode_prompt_string (ps);
+    std::string prompt = command_editor::decode_prompt_string (ps);
 
-    octave::pipe_handler_error_count = 0;
+    pipe_handler_error_count = 0;
 
-    octave::flush_stdout ();
+    flush_stdout ();
 
-    octave::pager_stream::reset ();
-    octave::diary_stream::reset ();
+    pager_stream::reset ();
+    diary_stream::reset ();
 
     octave_diary << prompt;
 
@@ -281,7 +281,7 @@
     if (retval != "\n"
         && retval.find_first_not_of (" \t\n\r") != std::string::npos)
       {
-        load_path& lp = octave::__get_load_path__ ("base_reader::octave_gets");
+        load_path& lp = __get_load_path__ ("base_reader::octave_gets");
 
         lp.update ();
 
@@ -300,7 +300,7 @@
       {
         if (! history_skip_auto_repeated_debugging_command)
           {
-            if (octave::command_history::add (retval))
+            if (command_history::add (retval))
               octave_link::append_history (retval);
           }
 
@@ -317,7 +317,7 @@
     // Process post input event hook function after the internal history
     // list has been updated.
 
-    if (octave::application::interactive ())
+    if (application::interactive ())
       octave_link::post_input_event ();
 
     return retval;
--- a/libinterp/corefcn/input.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/input.h	Mon Jun 26 09:05:37 2017 -0400
@@ -95,7 +95,7 @@
 
     friend class input_reader;
 
-    base_reader (octave::base_lexer *lxr)
+    base_reader (base_lexer *lxr)
       : count (1), pflag (0), lexer (lxr)
     { }
 
@@ -140,11 +140,11 @@
 
   private:
 
-    octave::refcount<int> count;
+    refcount<int> count;
 
     int pflag;
 
-    octave::base_lexer *lexer;
+    base_lexer *lexer;
 
     void do_input_echo (const std::string&) const;
 
@@ -156,7 +156,7 @@
   {
   public:
 
-    terminal_reader (octave::base_lexer *lxr = nullptr)
+    terminal_reader (base_lexer *lxr = nullptr)
       : base_reader (lxr)
     { }
 
@@ -176,7 +176,7 @@
   {
   public:
 
-    file_reader (FILE *f_arg, octave::base_lexer *lxr = nullptr)
+    file_reader (FILE *f_arg, base_lexer *lxr = nullptr)
       : base_reader (lxr), file (f_arg) { }
 
     std::string get_input (bool& eof);
@@ -198,7 +198,7 @@
   public:
 
     eval_string_reader (const std::string& str,
-                               octave::base_lexer *lxr = nullptr)
+                               base_lexer *lxr = nullptr)
       : base_reader (lxr), eval_string (str)
     { }
 
@@ -219,15 +219,15 @@
   input_reader
   {
   public:
-    input_reader (octave::base_lexer *lxr = nullptr)
+    input_reader (base_lexer *lxr = nullptr)
       : rep (new terminal_reader (lxr))
     { }
 
-    input_reader (FILE *file, octave::base_lexer *lxr = nullptr)
+    input_reader (FILE *file, base_lexer *lxr = nullptr)
       : rep (new file_reader (file, lxr))
     { }
 
-    input_reader (const std::string& str, octave::base_lexer *lxr = nullptr)
+    input_reader (const std::string& str, base_lexer *lxr = nullptr)
       : rep (new eval_string_reader (str, lxr))
     { }
 
--- a/libinterp/corefcn/interpreter.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/interpreter.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -396,13 +396,13 @@
     // Matlab uses "C" locale for LC_NUMERIC class regardless of local setting
     setlocale (LC_NUMERIC, "C");
     setlocale (LC_TIME, "C");
-    octave::sys::env::putenv ("LC_NUMERIC", "C");
-    octave::sys::env::putenv ("LC_TIME", "C");
+    sys::env::putenv ("LC_NUMERIC", "C");
+    sys::env::putenv ("LC_TIME", "C");
 
     // Initialize the default floating point unit control state.
     octave_set_default_fpucw ();
 
-    octave::thread::init ();
+    thread::init ();
 
     set_default_prompts ();
 
@@ -417,18 +417,18 @@
 
     // The idea here is to force xerbla to be referenced so that we will link to
     // our own version instead of the one provided by the BLAS library.  But
-    // octave::numeric_limits<double>::NaN () should never be -1, so we
+    // numeric_limits<double>::NaN () should never be -1, so we
     // should never actually call xerbla.  FIXME (again!):  If this
     // becomes a constant expression the test might be optimized away and
     // then the reference to the function might also disappear.
 
-    if (octave::numeric_limits<double>::NaN () == -1)
+    if (numeric_limits<double>::NaN () == -1)
       F77_FUNC (xerbla, XERBLA) ("octave", 13 F77_CHAR_ARG_LEN (6));
 
     initialize_error_handlers ();
 
     if (m_app_context)
-      octave::install_signal_handlers ();
+      install_signal_handlers ();
     else
       quit_allowed = false;
 
@@ -502,7 +502,7 @@
     if (line_editing)
       initialize_command_input ();
     else
-      octave::command_editor::force_default_editor ();
+      command_editor::force_default_editor ();
 
     // These can come after command line args since none of them set any
     // defaults that might be changed by command line options.
@@ -555,7 +555,7 @@
         ::initialize_history (read_history_file);
 
         if (! m_app_context)
-          octave::command_history::ignore_entries ();
+          command_history::ignore_entries ();
 
         m_history_initialized = true;
       }
@@ -586,7 +586,7 @@
         // be evaluated from the normal intepreter loop where exceptions
         // are already handled.
 
-        octave::unwind_protect frame;
+        unwind_protect frame;
 
         frame.add_method (m_load_path, &load_path::set_add_hook,
                           m_load_path.get_add_hook ());
@@ -663,7 +663,7 @@
 
         if (options.forced_interactive ())
           {
-            octave::command_editor::blink_matching_paren (false);
+            command_editor::blink_matching_paren (false);
 
             // FIXME: is this the right thing to do?
             Fecho_executing_commands (octave_value (ECHO_CMD_LINE));
@@ -672,7 +672,7 @@
 
     // Avoid counting commands executed from startup or script files.
 
-    octave::command_editor::reset_current_command_number (1);
+    command_editor::reset_current_command_number (1);
 
     m_initialized = true;
 
@@ -690,7 +690,7 @@
 
         return main_loop ();
       }
-    catch (const octave::exit_exception& ex)
+    catch (const exit_exception& ex)
       {
         return ex.exit_status ();
       }
@@ -768,14 +768,14 @@
 
         bool home_rc_already_executed = false;
 
-        std::string initfile = octave::sys::env::getenv ("OCTAVE_INITFILE");
+        std::string initfile = sys::env::getenv ("OCTAVE_INITFILE");
 
         if (initfile.empty ())
           initfile = ".octaverc";
 
-        std::string home_dir = octave::sys::env::get_home_directory ();
+        std::string home_dir = sys::env::get_home_directory ();
 
-        std::string home_rc = octave::sys::env::make_absolute (initfile, home_dir);
+        std::string home_rc = sys::env::make_absolute (initfile, home_dir);
 
         std::string local_rc;
 
@@ -789,14 +789,14 @@
 
             // Names alone are not enough.
 
-            octave::sys::file_stat fs_home_rc (home_rc);
+            sys::file_stat fs_home_rc (home_rc);
 
             if (fs_home_rc)
               {
                 // We want to check for curr_dir after executing home_rc
                 // because doing that may change the working directory.
 
-                local_rc = octave::sys::env::make_absolute (initfile);
+                local_rc = sys::env::make_absolute (initfile);
 
                 home_rc_already_executed = same_file (home_rc, local_rc);
               }
@@ -805,7 +805,7 @@
         if (! home_rc_already_executed)
           {
             if (local_rc.empty ())
-              local_rc = octave::sys::env::make_absolute (initfile);
+              local_rc = sys::env::make_absolute (initfile);
 
             int status = safe_source_file (local_rc, context, verbose,
                                            require_file);
@@ -829,17 +829,17 @@
 
     std::string code_to_eval = options.code_to_eval ();
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     octave_save_signal_mask ();
 
-    octave::can_interrupt = true;
+    can_interrupt = true;
 
-    octave_signal_hook = octave::signal_handler;
+    octave_signal_hook = signal_handler;
     octave_interrupt_hook = 0;
     octave_bad_alloc_hook = 0;
 
-    octave::catch_interrupts ();
+    catch_interrupts ();
 
     octave_initialized = true;
 
@@ -853,13 +853,13 @@
       {
         eval_string (code_to_eval, false, parse_status, 0);
       }
-    catch (const octave::interrupt_exception&)
+    catch (const interrupt_exception&)
       {
         recover_from_exception ();
 
         return 1;
       }
-    catch (const octave::execution_exception&)
+    catch (const execution_exception&)
       {
         recover_from_exception ();
 
@@ -873,17 +873,17 @@
   {
     const cmdline_options& options = m_app_context->options ();
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     octave_save_signal_mask ();
 
-    octave::can_interrupt = true;
+    can_interrupt = true;
 
-    octave_signal_hook = octave::signal_handler;
+    octave_signal_hook = signal_handler;
     octave_interrupt_hook = 0;
     octave_bad_alloc_hook = 0;
 
-    octave::catch_interrupts ();
+    catch_interrupts ();
 
     octave_initialized = true;
 
@@ -931,23 +931,23 @@
 
     octave_save_signal_mask ();
 
-    octave::can_interrupt = true;
+    can_interrupt = true;
 
-    octave_signal_hook = octave::signal_handler;
+    octave_signal_hook = signal_handler;
     octave_interrupt_hook = 0;
     octave_bad_alloc_hook = 0;
 
-    octave::catch_interrupts ();
+    catch_interrupts ();
 
     octave_initialized = true;
 
     // The big loop.
 
-    octave::lexer *lxr = (octave::application::interactive ()
-                          ? new octave::lexer ()
-                          : new octave::lexer (stdin));
+    lexer *lxr = (application::interactive ()
+                          ? new lexer ()
+                          : new lexer (stdin));
 
-    octave::parser parser (*lxr);
+    parser parser (*lxr);
 
     int retval = 0;
     do
@@ -959,7 +959,7 @@
             parser.reset ();
 
             if (m_symbol_table.at_top_level ())
-              octave::tree_evaluator::reset_debug_state ();
+              tree_evaluator::reset_debug_state ();
 
             retval = parser.run ();
 
@@ -971,7 +971,7 @@
 
                     octave_quit ();
 
-                    if (! octave::application::interactive ())
+                    if (! application::interactive ())
                       {
                         bool quit = (tree_return_command::returning
                                      || tree_break_command::breaking);
@@ -989,7 +989,7 @@
                     if (octave_completion_matches_called)
                       octave_completion_matches_called = false;
                     else
-                      octave::command_editor::increment_current_command_number ();
+                      command_editor::increment_current_command_number ();
                   }
                 else if (parser.m_lexer.end_of_input)
                   {
@@ -998,15 +998,15 @@
                   }
               }
           }
-        catch (const octave::interrupt_exception&)
+        catch (const interrupt_exception&)
           {
             recover_from_exception ();
 
             // Required newline when the user does Ctrl+C at the prompt.
-            if (octave::application::interactive ())
+            if (application::interactive ())
               octave_stdout << "\n";
           }
-        catch (const octave::index_exception& e)
+        catch (const index_exception& e)
           {
             recover_from_exception ();
 
@@ -1014,14 +1014,14 @@
                       << e.message () << " -- trying to return to prompt"
                       << std::endl;
           }
-        catch (const octave::execution_exception& e)
+        catch (const execution_exception& e)
           {
             std::string stack_trace = e.info ();
 
             if (! stack_trace.empty ())
               std::cerr << stack_trace;
 
-            if (octave::application::interactive ())
+            if (application::interactive ())
               recover_from_exception ();
             else
               {
@@ -1050,7 +1050,7 @@
 
     if (retval == EOF)
       {
-        if (octave::application::interactive ())
+        if (application::interactive ())
           octave_stdout << "\n";
 
         retval = 0;
@@ -1076,7 +1076,7 @@
     {                                                                   \
       try                                                               \
         {                                                               \
-          octave::unwind_protect frame;                                 \
+          unwind_protect frame;                                 \
                                                                         \
           frame.protect_var (Vdebug_on_error);                          \
           frame.protect_var (Vdebug_on_warning);                        \
@@ -1086,9 +1086,9 @@
                                                                         \
           F ARGS;                                                       \
         }                                                               \
-      OCTAVE_IGNORE_EXCEPTION (const octave::exit_exception&)           \
-      OCTAVE_IGNORE_EXCEPTION (const octave::interrupt_exception&)      \
-      OCTAVE_IGNORE_EXCEPTION (const octave::execution_exception&)      \
+      OCTAVE_IGNORE_EXCEPTION (const exit_exception&)           \
+      OCTAVE_IGNORE_EXCEPTION (const interrupt_exception&)      \
+      OCTAVE_IGNORE_EXCEPTION (const execution_exception&)      \
       OCTAVE_IGNORE_EXCEPTION (const std::bad_alloc&)                   \
     }                                                                   \
   while (0)
@@ -1111,9 +1111,9 @@
 
         OCTAVE_SAFE_CALL (reset_error_handler, ());
 
-        OCTAVE_SAFE_CALL (octave::feval, (fcn, octave_value_list (), 0));
+        OCTAVE_SAFE_CALL (feval, (fcn, octave_value_list (), 0));
 
-        OCTAVE_SAFE_CALL (octave::flush_stdout, ());
+        OCTAVE_SAFE_CALL (flush_stdout, ());
       }
 
     // Do this explicitly so that destructors for mex file objects
@@ -1121,12 +1121,12 @@
     // called.
     OCTAVE_SAFE_CALL (clear_mex_functions, ());
 
-    OCTAVE_SAFE_CALL (octave::command_editor::restore_terminal_state, ());
+    OCTAVE_SAFE_CALL (command_editor::restore_terminal_state, ());
 
     OCTAVE_SAFE_CALL (octave_history_write_timestamp, ());
 
-    if (! octave::command_history::ignoring_entries ())
-      OCTAVE_SAFE_CALL (octave::command_history::clean_up_and_save, ());
+    if (! command_history::ignoring_entries ())
+      OCTAVE_SAFE_CALL (command_history::clean_up_and_save, ());
 
     OCTAVE_SAFE_CALL (gh_manager::close_all_figures, ());
 
@@ -1145,7 +1145,7 @@
 
     OCTAVE_SAFE_CALL (octave_finalize_hdf5, ());
 
-    OCTAVE_SAFE_CALL (octave::flush_stdout, ());
+    OCTAVE_SAFE_CALL (flush_stdout, ());
 
     // Don't call singleton_cleanup_list::cleanup until we have the
     // problems with registering/unregistering types worked out.  For
@@ -1159,7 +1159,7 @@
     //
     // OCTAVE_SAFE_CALL (singleton_cleanup_list::cleanup, ());
 
-    OCTAVE_SAFE_CALL (octave::chunk_buffer::clear, ());
+    OCTAVE_SAFE_CALL (chunk_buffer::clear, ());
   }
 
   tree_evaluator& interpreter::get_evaluator (void)
@@ -1191,13 +1191,13 @@
 
   void interpreter::recover_from_exception (void)
   {
-    octave::can_interrupt = true;
+    can_interrupt = true;
     octave_interrupt_immediately = 0;
     octave_interrupt_state = 0;
     octave_signal_caught = 0;
     octave_exception_state = octave_no_exception;
     octave_restore_signal_mask ();
-    octave::catch_interrupts ();
+    catch_interrupts ();
   }
 
   // Functions to call when the interpreter exits.
--- a/libinterp/corefcn/load-path.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/load-path.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -226,7 +226,7 @@
     std::string tpath = load_path::m_command_line_path;
 
     if (tpath.empty ())
-      tpath = octave::sys::env::getenv ("OCTAVE_PATH");
+      tpath = sys::env::getenv ("OCTAVE_PATH");
 
     std::string xpath;
 
@@ -235,7 +235,7 @@
         xpath = tpath;
 
         if (! sys_path.empty ())
-          xpath += octave::directory_path::path_sep_str () + sys_path;
+          xpath += directory_path::path_sep_str () + sys_path;
       }
     else
       xpath = sys_path;
@@ -279,7 +279,7 @@
 
     // Temporarily disable add hook.
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
     frame.protect_var (add_hook);
 
     add_hook = 0;
@@ -334,7 +334,7 @@
           }
         else
           {
-            std::string dir = octave::sys::file_ops::tilde_expand (dir_arg);
+            std::string dir = sys::file_ops::tilde_expand (dir_arg);
 
             dir = strip_trailing_separators (dir);
 
@@ -429,10 +429,10 @@
   {
     std::string retval;
 
-    if (octave::sys::env::absolute_pathname (file)
-        || octave::sys::env::rooted_relative_pathname (file))
+    if (sys::env::absolute_pathname (file)
+        || sys::env::rooted_relative_pathname (file))
       {
-        octave::sys::file_stat fs (file);
+        sys::file_stat fs (file);
 
         return fs.exists () ? file : retval;
       }
@@ -444,16 +444,16 @@
           return tfile;
       }
 
-    if (file.find_first_of (octave::sys::file_ops::dir_sep_chars ())
+    if (file.find_first_of (sys::file_ops::dir_sep_chars ())
         != std::string::npos)
       {
         // Given name has a directory separator, so append it to each
         // element of the load path in turn.
         for (const auto& di : dir_info_list)
           {
-            std::string tfile = octave::sys::file_ops::concat (di.dir_name, file);
-
-            octave::sys::file_stat fs (tfile);
+            std::string tfile = sys::file_ops::concat (di.dir_name, file);
+
+            sys::file_stat fs (tfile);
 
             if (fs.exists ())
               return tfile;
@@ -471,7 +471,7 @@
             for (octave_idx_type i = 0; i < len; i++)
               {
                 if (all_files[i] == file)
-                  return octave::sys::file_ops::concat (di.dir_name, file);
+                  return sys::file_ops::concat (di.dir_name, file);
               }
           }
       }
@@ -484,11 +484,11 @@
   {
     std::string retval;
 
-    if (dir.find_first_of (octave::sys::file_ops::dir_sep_chars ()) != std::string::npos
-        && (octave::sys::env::absolute_pathname (dir)
-            || octave::sys::env::rooted_relative_pathname (dir)))
+    if (dir.find_first_of (sys::file_ops::dir_sep_chars ()) != std::string::npos
+        && (sys::env::absolute_pathname (dir)
+            || sys::env::rooted_relative_pathname (dir)))
       {
-        octave::sys::file_stat fs (dir);
+        sys::file_stat fs (dir);
 
         if (fs.exists () && fs.is_dir ())
           return dir;
@@ -497,12 +497,12 @@
       {
         for (const auto& di : dir_info_list)
           {
-            std::string dname = octave::sys::env::make_absolute (di.dir_name);
+            std::string dname = sys::env::make_absolute (di.dir_name);
 
             size_t dname_len = dname.length ();
 
             if (dname.substr (dname_len - 1)
-                == octave::sys::file_ops::dir_sep_str ())
+                == sys::file_ops::dir_sep_str ())
               {
                 dname = dname.substr (0, dname_len - 1);
                 dname_len--;
@@ -511,10 +511,10 @@
             size_t dir_len = dir.length ();
 
             if (dname_len > dir_len
-                && octave::sys::file_ops::is_dir_sep (dname[dname_len - dir_len - 1])
+                && sys::file_ops::is_dir_sep (dname[dname_len - dir_len - 1])
                 && dir == dname.substr (dname_len - dir_len))
               {
-                octave::sys::file_stat fs (di.dir_name);
+                sys::file_stat fs (di.dir_name);
 
                 if (fs.exists () && fs.is_dir ())
                   return di.dir_name;
@@ -530,11 +530,11 @@
   {
     std::list<std::string> retlist;
 
-    if (dir.find_first_of (octave::sys::file_ops::dir_sep_chars ()) != std::string::npos
-        && (octave::sys::env::absolute_pathname (dir)
-            || octave::sys::env::rooted_relative_pathname (dir)))
+    if (dir.find_first_of (sys::file_ops::dir_sep_chars ()) != std::string::npos
+        && (sys::env::absolute_pathname (dir)
+            || sys::env::rooted_relative_pathname (dir)))
       {
-        octave::sys::file_stat fs (dir);
+        sys::file_stat fs (dir);
 
         if (fs.exists () && fs.is_dir ())
           retlist.push_back (dir);
@@ -543,12 +543,12 @@
       {
         for (const auto& di : dir_info_list)
           {
-            std::string dname = octave::sys::env::make_absolute (di.dir_name);
+            std::string dname = sys::env::make_absolute (di.dir_name);
 
             size_t dname_len = dname.length ();
 
             if (dname.substr (dname_len - 1)
-                == octave::sys::file_ops::dir_sep_str ())
+                == sys::file_ops::dir_sep_str ())
               {
                 dname = dname.substr (0, dname_len - 1);
                 dname_len--;
@@ -557,10 +557,10 @@
             size_t dir_len = dir.length ();
 
             if (dname_len > dir_len
-                && octave::sys::file_ops::is_dir_sep (dname[dname_len - dir_len - 1])
+                && sys::file_ops::is_dir_sep (dname[dname_len - dir_len - 1])
                 && dir == dname.substr (dname_len - dir_len))
               {
-                octave::sys::file_stat fs (di.dir_name);
+                sys::file_stat fs (di.dir_name);
 
                 if (fs.exists () && fs.is_dir ())
                   retlist.push_back (di.dir_name);
@@ -588,13 +588,13 @@
       {
         std::string file = flist[i];
 
-        if (file.find_first_of (octave::sys::file_ops::dir_sep_chars ())
+        if (file.find_first_of (sys::file_ops::dir_sep_chars ())
             != std::string::npos)
           {
-            if (octave::sys::env::absolute_pathname (file)
-                || octave::sys::env::rooted_relative_pathname (file))
+            if (sys::env::absolute_pathname (file)
+                || sys::env::rooted_relative_pathname (file))
               {
-                octave::sys::file_stat fs (file);
+                sys::file_stat fs (file);
 
                 if (fs.exists ())
                   return file;
@@ -604,9 +604,9 @@
                 for (const auto& di : dir_info_list)
                   {
                     std::string tfile;
-                    tfile = octave::sys::file_ops::concat (di.dir_name, file);
-
-                    octave::sys::file_stat fs (tfile);
+                    tfile = sys::file_ops::concat (di.dir_name, file);
+
+                    sys::file_stat fs (tfile);
 
                     if (fs.exists ())
                       return tfile;
@@ -643,7 +643,7 @@
   done:
 
     if (! dir_name.empty ())
-      retval = octave::sys::file_ops::concat (dir_name, file_name);
+      retval = sys::file_ops::concat (dir_name, file_name);
 
     return retval;
   }
@@ -665,13 +665,13 @@
       {
         std::string file = flist[i];
 
-        if (file.find_first_of (octave::sys::file_ops::dir_sep_chars ())
+        if (file.find_first_of (sys::file_ops::dir_sep_chars ())
             != std::string::npos)
           {
-            if (octave::sys::env::absolute_pathname (file)
-                || octave::sys::env::rooted_relative_pathname (file))
+            if (sys::env::absolute_pathname (file)
+                || sys::env::rooted_relative_pathname (file))
               {
-                octave::sys::file_stat fs (file);
+                sys::file_stat fs (file);
 
                 if (fs.exists ())
                   retlist.push_back (file);
@@ -681,9 +681,9 @@
                 for (const auto& di : dir_info_list)
                   {
                     std::string tfile;
-                    tfile = octave::sys::file_ops::concat (di.dir_name, file);
-
-                    octave::sys::file_stat fs (tfile);
+                    tfile = sys::file_ops::concat (di.dir_name, file);
+
+                    sys::file_stat fs (tfile);
 
                     if (fs.exists ())
                       retlist.push_back (tfile);
@@ -707,7 +707,7 @@
             for (octave_idx_type j = 0; j < rel_flen; j++)
               {
                 if (all_files[i] == rel_flist[j])
-                  retlist.push_back (octave::sys::file_ops::concat (di.dir_name,
+                  retlist.push_back (sys::file_ops::concat (di.dir_name,
                                                                     rel_flist[j]));
               }
           }
@@ -789,7 +789,7 @@
       xpath = xdirs[0];
 
     for (octave_idx_type i = 1; i < len; i++)
-      xpath += octave::directory_path::path_sep_str () + xdirs[i];
+      xpath += directory_path::path_sep_str () + xdirs[i];
 
     return xpath;
   }
@@ -850,7 +850,7 @@
   load_path::const_dir_info_list_iterator
   load_path::find_dir_info (const std::string& dir_arg) const
   {
-    std::string dir = octave::sys::file_ops::tilde_expand (dir_arg);
+    std::string dir = sys::file_ops::tilde_expand (dir_arg);
 
     const_dir_info_list_iterator retval = dir_info_list.begin ();
 
@@ -868,7 +868,7 @@
   load_path::dir_info_list_iterator
   load_path::find_dir_info (const std::string& dir_arg)
   {
-    std::string dir = octave::sys::file_ops::tilde_expand (dir_arg);
+    std::string dir = sys::file_ops::tilde_expand (dir_arg);
 
     dir_info_list_iterator retval = dir_info_list.begin ();
 
@@ -936,7 +936,7 @@
       warning_with_id ("Octave:recursive-path-search",
                        "trailing '//' is no longer special in search path elements");
 
-    std::string dir = octave::sys::file_ops::tilde_expand (dir_arg);
+    std::string dir = sys::file_ops::tilde_expand (dir_arg);
 
     dir = strip_trailing_separators (dir);
 
@@ -946,7 +946,7 @@
       move (i, at_end);
     else
       {
-        octave::sys::file_stat fs (dir);
+        sys::file_stat fs (dir);
 
         if (fs)
           {
@@ -1068,7 +1068,7 @@
   {
     load_path::dir_info::fcn_file_map_type retval;
 
-    octave::sys::dir_entry dir (d);
+    sys::dir_entry dir (d);
 
     if (dir)
       {
@@ -1116,7 +1116,7 @@
   void
   load_path::dir_info::update (void)
   {
-    octave::sys::file_stat fs (dir_name);
+    sys::file_stat fs (dir_name);
 
     if (! fs)
       {
@@ -1129,7 +1129,7 @@
           {
             try
               {
-                std::string abs_name = octave::sys::env::make_absolute (dir_name);
+                std::string abs_name = sys::env::make_absolute (dir_name);
 
                 const_abs_dir_cache_iterator p = abs_dir_cache.find (abs_name);
 
@@ -1165,11 +1165,11 @@
                     initialize ();
                   }
               }
-            catch (const octave::execution_exception&)
+            catch (const execution_exception&)
               {
                 // Skip updating if we don't know where we are,
                 // but don't treat it as an error.
-                octave::interpreter::recover_from_exception ();
+                interpreter::recover_from_exception ();
               }
           }
         // Absolute path, check timestamp to see whether it requires re-caching
@@ -1202,11 +1202,11 @@
   void
   load_path::dir_info::initialize (void)
   {
-    is_relative = ! octave::sys::env::absolute_pathname (dir_name);
-
-    dir_time_last_checked = octave::sys::time (static_cast<time_t> (0));
-
-    octave::sys::file_stat fs (dir_name);
+    is_relative = ! sys::env::absolute_pathname (dir_name);
+
+    dir_time_last_checked = sys::time (static_cast<time_t> (0));
+
+    sys::file_stat fs (dir_name);
 
     if (fs)
       {
@@ -1214,13 +1214,13 @@
         package_dir_map.clear ();
 
         dir_mtime = fs.mtime ();
-        dir_time_last_checked = octave::sys::time ();
+        dir_time_last_checked = sys::time ();
 
         get_file_list (dir_name);
 
         try
           {
-            std::string abs_name = octave::sys::env::make_absolute (dir_name);
+            std::string abs_name = sys::env::make_absolute (dir_name);
 
             // FIXME: nothing is ever removed from this cache of
             // directory information, so there could be some resource
@@ -1228,12 +1228,12 @@
 
             abs_dir_cache[abs_name] = *this;
           }
-        catch (const octave::execution_exception&)
+        catch (const execution_exception&)
           {
             // Skip updating if we don't know where we are but don't treat
             // it as an error.
 
-            octave::interpreter::recover_from_exception ();
+            interpreter::recover_from_exception ();
           }
       }
     else
@@ -1246,7 +1246,7 @@
   void
   load_path::dir_info::get_file_list (const std::string& d)
   {
-    octave::sys::dir_entry dir (d);
+    sys::dir_entry dir (d);
 
     if (dir)
       {
@@ -1264,9 +1264,9 @@
           {
             std::string fname = flist[i];
 
-            std::string full_name = octave::sys::file_ops::concat (d, fname);
-
-            octave::sys::file_stat fs (full_name);
+            std::string full_name = sys::file_ops::concat (d, fname);
+
+            sys::file_stat fs (full_name);
 
             if (fs)
               {
@@ -1323,9 +1323,9 @@
   {
     method_file_map[class_name].method_file_map = get_fcn_files (d);
 
-    std::string pd = octave::sys::file_ops::concat (d, "private");
-
-    octave::sys::file_stat fs (pd);
+    std::string pd = sys::file_ops::concat (d, "private");
+
+    sys::file_stat fs (pd);
 
     if (fs && fs.is_dir ())
       method_file_map[class_name].private_file_map = get_fcn_files (pd);
@@ -1393,7 +1393,7 @@
     for (const auto& dir_fnlst : private_fcn_map)
       {
         os << "\n*** private functions in "
-           << octave::sys::file_ops::concat (dir_fnlst.first, "private")
+           << sys::file_ops::concat (dir_fnlst.first, "private")
            << ":\n\n";
 
         print_fcn_list (os, dir_fnlst.second);
@@ -1480,7 +1480,7 @@
 
             for (const auto& fi : file_info_list)
               {
-                retval = octave::sys::file_ops::concat (fi.dir_name, fcn);
+                retval = sys::file_ops::concat (fi.dir_name, fcn);
 
                 if (check_file_type (retval, type, fi.types,
                                      fcn, "load_path::find_fcn"))
@@ -1517,7 +1517,7 @@
         if (p != m.end ())
           {
             std::string fname
-              = octave::sys::file_ops::concat (octave::sys::file_ops::concat (dir, "private"), fcn);
+              = sys::file_ops::concat (sys::file_ops::concat (dir, "private"), fcn);
 
             if (check_file_type (fname, type, p->second, fcn,
                                  "load_path::find_private_fcn"))
@@ -1554,7 +1554,7 @@
 
             for (const auto& fi : file_info_list)
               {
-                retval = octave::sys::file_ops::concat (fi.dir_name, meth);
+                retval = sys::file_ops::concat (fi.dir_name, meth);
 
                 bool found = check_file_type (retval, type, fi.types,
                                               meth, "load_path::find_method");
@@ -1683,12 +1683,12 @@
               {
                 if (file_info_list.empty ())
                   {
-                    octave::symbol_table& symtab
-                      = octave::__get_symbol_table__ ("load_path::package_info::add_to_fcn_map");
+                    symbol_table& symtab
+                      = __get_symbol_table__ ("load_path::package_info::add_to_fcn_map");
 
                     if (symtab.is_built_in_function_name (base))
                       {
-                        std::string fcn_path = octave::sys::file_ops::concat (dir_name, fname);
+                        std::string fcn_path = sys::file_ops::concat (dir_name, fname);
 
                         warning_with_id ("Octave:shadowed-function",
                                          "function %s shadows a built-in function",
@@ -1710,7 +1710,7 @@
                         && sys_path.find (old.dir_name) != std::string::npos
                         && in_path_list (sys_path, old.dir_name))
                       {
-                        std::string fcn_path = octave::sys::file_ops::concat (dir_name, fname);
+                        std::string fcn_path = sys::file_ops::concat (dir_name, fname);
 
                         warning_with_id ("Octave:shadowed-function",
                                          "function %s shadows a core library function",
@@ -1759,7 +1759,7 @@
         fcn_map_type& fm = method_map[class_name];
 
         std::string full_dir_name
-          = octave::sys::file_ops::concat (dir_name, "@" + class_name);
+          = sys::file_ops::concat (dir_name, "@" + class_name);
 
         const dir_info::class_info& ci = cls_ci.second;
 
@@ -1867,7 +1867,7 @@
         fcn_map_type& fn_map = cls_fnmap.second;
 
         std::string full_dir_name
-          = octave::sys::file_ops::concat (dir_name, "@" + class_name);
+          = sys::file_ops::concat (dir_name, "@" + class_name);
 
         for (auto& nm_filst : fn_map)
           {
@@ -1958,7 +1958,7 @@
         fcn_map_type& fn_map = cls_fnmap.second;
 
         std::string full_dir_name
-          = octave::sys::file_ops::concat (dir, "@" + class_name);
+          = sys::file_ops::concat (dir, "@" + class_name);
 
         for (auto& nm_filst : fn_map)
           {
@@ -2129,7 +2129,7 @@
   {
     std::string retval;
 
-    octave::sys::dir_entry dir (dirname);
+    sys::dir_entry dir (dirname);
 
     if (dir)
       {
@@ -2157,12 +2157,12 @@
 
                 if (! skip_p)
                   {
-                    std::string nm = octave::sys::file_ops::concat (dirname, elt);
-
-                    octave::sys::file_stat fs (nm);
+                    std::string nm = sys::file_ops::concat (dirname, elt);
+
+                    sys::file_stat fs (nm);
 
                     if (fs && fs.is_dir ())
-                      retval += octave::directory_path::path_sep_str () + genpath (nm, skip);
+                      retval += directory_path::path_sep_str () + genpath (nm, skip);
                   }
               }
           }
--- a/libinterp/corefcn/load-path.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/load-path.h	Mon Jun 26 09:05:37 2017 -0400
@@ -183,7 +183,7 @@
       if (m_command_line_path.empty ())
         m_command_line_path = p;
       else
-        m_command_line_path += octave::directory_path::path_sep_str () + p;
+        m_command_line_path += directory_path::path_sep_str () + p;
     }
 
     std::string get_command_line_path (void) const
@@ -270,8 +270,8 @@
       std::string dir_name;
       std::string abs_dir_name;
       bool is_relative;
-      octave::sys::time dir_mtime;
-      octave::sys::time dir_time_last_checked;
+      sys::time dir_mtime;
+      sys::time dir_time_last_checked;
       string_vector all_files;
       string_vector fcn_files;
       fcn_file_map_type private_file_map;
--- a/libinterp/corefcn/oct-stream.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/oct-stream.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -2545,7 +2545,7 @@
     : who (who_arg), buf (), whitespace_table (), delim_table (),
       delims (), comment_style (), comment_len (0), comment_char (-2),
       buffer_size (0), date_locale (), inf_nan (init_inf_nan ()),
-      empty_value (octave::numeric_limits<double>::NaN ()), exp_chars ("edED"),
+      empty_value (numeric_limits<double>::NaN ()), exp_chars ("edED"),
       header_lines (0), treat_as_empty (), treat_as_empty_len (0),
       whitespace (" \b\t"), eol1 ('\r'), eol2 ('\n'),
       return_on_error (1), collect_output (false),
@@ -2909,12 +2909,12 @@
         int i = lookahead (is, inf_nan, 3, false);   // false -> case insensitive
         if (i == 0)
           {
-            retval = octave::numeric_limits<double>::Inf ();
+            retval = numeric_limits<double>::Inf ();
             valid = true;
           }
         else if (i == 1)
           {
-            retval = octave::numeric_limits<double>::NaN ();
+            retval = numeric_limits<double>::NaN ();
             valid = true;
           }
       }
@@ -2925,12 +2925,12 @@
         int i = lookahead (is, inf_nan, 3, false);   // false -> case insensitive
         if (i == 0)
           {
-            retval = octave::numeric_limits<double>::Inf ();
+            retval = numeric_limits<double>::Inf ();
             valid = true;
           }
         else if (i == 1)
           {
-            retval = octave::numeric_limits<double>::NaN ();
+            retval = numeric_limits<double>::NaN ();
             valid = true;
           }
       }
@@ -2976,8 +2976,8 @@
                 if (ch2 == 'f')
                   {
                     inf = true;
-                    re = (ch == '+' ? octave::numeric_limits<double>::Inf ()
-                                    : -octave::numeric_limits<double>::Inf ());
+                    re = (ch == '+' ? numeric_limits<double>::Inf ()
+                                    : -numeric_limits<double>::Inf ());
                     value = 0;
                   }
                 else
@@ -3002,8 +3002,8 @@
 
         // check for "treat as empty" string
         if (treat_as_empty.numel ()
-            && (is.fail () || octave::math::is_NaN_or_NA (Complex (re))
-                || re == octave::numeric_limits<double>::Inf ()))
+            && (is.fail () || math::is_NaN_or_NA (Complex (re))
+                || re == numeric_limits<double>::Inf ()))
           {
 
             for (int i = 0; i < treat_as_empty.numel (); i++)
@@ -4005,7 +4005,7 @@
   base_stream::do_gets (octave_idx_type max_len, bool& err,
                         bool strip_newline, const std::string& who)
   {
-    if (octave::application::interactive () && file_number () == 0)
+    if (application::interactive () && file_number () == 0)
       ::error ("%s: unable to read from stdin while running interactively",
                who.c_str ());
 
@@ -4116,7 +4116,7 @@
   off_t
   base_stream::skipl (off_t num, bool& err, const std::string& who)
   {
-    if (octave::application::interactive () && file_number () == 0)
+    if (application::interactive () && file_number () == 0)
       ::error ("%s: unable to read from stdin while running interactively",
                who.c_str ());
 
@@ -5714,7 +5714,7 @@
             break;
 
           default:
-            // Note: error is member fcn from octave::base_stream, not ::error.
+            // Note: error is member fcn from base_stream, not ::error.
             // This error does not halt execution so "return ..." must exist.
             error ("%s: invalid format specifier", who.c_str ());
             return -1;
@@ -6051,7 +6051,7 @@
     if (tc_count.is_defined ())
       {
         if (tc_count.is_scalar_type ()
-            && octave::math::isinf (tc_count.scalar_value ()))
+            && math::isinf (tc_count.scalar_value ()))
           count = -1;
         else
           {
@@ -6379,7 +6379,7 @@
                          octave_idx_type nr, octave_idx_type nc,
                          oct_data_conv::data_type input_type,
                          oct_data_conv::data_type output_type,
-                         octave::mach_info::float_format ffmt)
+                         mach_info::float_format ffmt)
   {
     octave_value retval;
 
@@ -6415,13 +6415,13 @@
 
     bool swap = false;
 
-    if (ffmt == octave::mach_info::flt_fmt_unknown)
+    if (ffmt == mach_info::flt_fmt_unknown)
       ffmt = float_format ();
 
-    if (octave::mach_info::words_big_endian ())
-      swap = (ffmt == octave::mach_info::flt_fmt_ieee_little_endian);
+    if (mach_info::words_big_endian ())
+      swap = (ffmt == mach_info::flt_fmt_ieee_little_endian);
     else
-      swap = (ffmt == octave::mach_info::flt_fmt_ieee_big_endian);
+      swap = (ffmt == mach_info::flt_fmt_ieee_big_endian);
 
     bool do_float_fmt_conv = ((input_type == oct_data_conv::dt_double
                                || input_type == oct_data_conv::dt_single)
@@ -6464,7 +6464,7 @@
   stream::read (const Array<double>& size, octave_idx_type block_size,
                 oct_data_conv::data_type input_type,
                 oct_data_conv::data_type output_type,
-                octave_idx_type skip, octave::mach_info::float_format ffmt,
+                octave_idx_type skip, mach_info::float_format ffmt,
                 octave_idx_type& count)
   {
     octave_value retval;
@@ -6492,7 +6492,7 @@
       {
         get_size (size, nr, nc, one_elt_size_spec, "fread");
       }
-    catch (const octave::execution_exception&)
+    catch (const execution_exception&)
       {
         invalid_operation ("fread", "reading");
 
@@ -6660,7 +6660,7 @@
   octave_idx_type
   stream::write (const octave_value& data, octave_idx_type block_size,
                  oct_data_conv::data_type output_type,
-                 octave_idx_type skip, octave::mach_info::float_format flt_fmt)
+                 octave_idx_type skip, mach_info::float_format flt_fmt)
   {
     octave_idx_type retval = -1;
 
@@ -6668,7 +6668,7 @@
       invalid_operation ("fwrite", "writing");
     else
       {
-        if (flt_fmt == octave::mach_info::flt_fmt_unknown)
+        if (flt_fmt == mach_info::flt_fmt_unknown)
           flt_fmt = float_format ();
 
         octave_idx_type status = data.write (*this, block_size, output_type,
@@ -6904,17 +6904,17 @@
   stream::write (const Array<T>& data, octave_idx_type block_size,
                  oct_data_conv::data_type output_type,
                  octave_idx_type skip,
-                 octave::mach_info::float_format flt_fmt)
+                 mach_info::float_format flt_fmt)
   {
     bool swap = false;
 
-    if (octave::mach_info::words_big_endian ())
-      swap = (flt_fmt == octave::mach_info::flt_fmt_ieee_little_endian);
+    if (mach_info::words_big_endian ())
+      swap = (flt_fmt == mach_info::flt_fmt_ieee_little_endian);
     else
-      swap = (flt_fmt == octave::mach_info::flt_fmt_ieee_big_endian);
+      swap = (flt_fmt == mach_info::flt_fmt_ieee_big_endian);
 
     bool do_data_conversion = (swap || ! is_equivalent_type<T> (output_type)
-                               || flt_fmt != octave::mach_info::float_format ());
+                               || flt_fmt != mach_info::float_format ());
 
     octave_idx_type nel = data.numel ();
 
@@ -6977,7 +6977,7 @@
   stream::write (const Array<T>& data, octave_idx_type block_size,      \
                  oct_data_conv::data_type output_type,                  \
                  octave_idx_type skip,                                  \
-                 octave::mach_info::float_format flt_fmt)
+                 mach_info::float_format flt_fmt)
 
     INSTANTIATE_WRITE (octave_int8);
   INSTANTIATE_WRITE (octave_uint8);
@@ -7194,10 +7194,10 @@
     return retval;
   }
 
-  octave::mach_info::float_format
+  mach_info::float_format
   stream::float_format (void) const
   {
-    octave::mach_info::float_format retval = octave::mach_info::flt_fmt_unknown;
+    mach_info::float_format retval = mach_info::flt_fmt_unknown;
 
     if (stream_ok ())
       retval = rep->float_format ();
@@ -7524,7 +7524,7 @@
 
     retval(0) = os.name ();
     retval(1) = stream::mode_as_string (os.mode ());
-    retval(2) = octave::mach_info::float_format_as_string (os.float_format ());
+    retval(2) = mach_info::float_format_as_string (os.float_format ());
 
     return retval;
   }
@@ -7565,7 +7565,7 @@
             << stream::mode_as_string (os.mode ())
             << "  "
             << std::setw (9)
-            << octave::mach_info::float_format_as_string (os.float_format ())
+            << mach_info::float_format_as_string (os.float_format ())
             << "  "
             << os.name () << "\n";
       }
--- a/libinterp/corefcn/sighandlers.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/sighandlers.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -77,7 +77,7 @@
   // Similar to Vsighup_dumps_octave_core, but for SIGTERM signal.
   static bool Vsigterm_dumps_octave_core = true;
 
-  // List of signals we have caught since last call to octave::signal_handler.
+  // List of signals we have caught since last call to signal_handler.
   static bool *signals_caught = nullptr;
 
   // Forward declarations.
@@ -173,11 +173,11 @@
       bool is_interrupt_thread = (GetCurrentThreadId () == thread_id);
 
       if (is_interrupt_thread)
-        octave::user_terminate (sig_number);
+        user_terminate (sig_number);
       else
         {
           SuspendThread (thread);
-          octave::user_terminate (sig_number);
+          user_terminate (sig_number);
           ResumeThread (thread);
         }
     }
@@ -187,11 +187,11 @@
       bool is_interrupt_thread = (GetCurrentThreadId () == thread_id);
 
       if (is_interrupt_thread)
-        octave::user_abort (sig_number);
+        user_abort (sig_number);
       else
         {
           SuspendThread (thread);
-          octave::user_abort (sig_number);
+          user_abort (sig_number);
           ResumeThread (thread);
         }
     }
@@ -246,12 +246,12 @@
 
     void do_user_terminate (int sig_number)
     {
-      octave::user_terminate (sig_number);
+      user_terminate (sig_number);
     }
 
     void do_user_abort (int sig_number)
     {
-      octave::user_abort (sig_number);
+      user_abort (sig_number);
     }
 
     void do_raise_sigint (void)
@@ -349,7 +349,7 @@
 
     sysdep_cleanup ();
 
-    throw octave::exit_exception (1);
+    throw exit_exception (1);
   }
 
   // Called from octave_quit () to actually do something about the signals
@@ -482,7 +482,7 @@
           {
             if (! octave_debug_on_interrupt_state)
               {
-                octave::tree_evaluator::debug_mode = true;
+                tree_evaluator::debug_mode = true;
                 octave_debug_on_interrupt_state = true;
 
                 return;
@@ -491,7 +491,7 @@
               {
                 // Clear the flag and do normal interrupt stuff.
 
-                octave::tree_evaluator::debug_mode
+                tree_evaluator::debug_mode
                   = bp_table::have_breakpoints () || Vdebugging;
                 octave_debug_on_interrupt_state = false;
               }
@@ -519,8 +519,8 @@
             octave_signal_caught = 1;
             octave_interrupt_state++;
 
-            if (octave::application::interactive ()
-                && ! octave::application::forced_interactive ()
+            if (application::interactive ()
+                && ! application::forced_interactive ()
                 && octave_interrupt_state == 2)
               std::cerr << "Press Control-C again to abort." << std::endl;
 
--- a/libinterp/corefcn/symtab.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/symtab.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -81,7 +81,7 @@
   symbol_table::symbol_record::symbol_record_rep::init_persistent (void)
   {
     symbol_table::scope *scope
-      = octave::__require_current_scope__ ("symbol_table::symbol_record::symbol_record_rep::init_persistent");
+      = __require_current_scope__ ("symbol_table::symbol_record::symbol_record_rep::init_persistent");
 
     if (! is_defined ())
       {
@@ -100,7 +100,7 @@
     unmark_persistent ();
 
     symbol_table::scope *scope
-      = octave::__require_current_scope__ ("symbol_table::symbol_record::symbol_record_rep::erase_persistent");
+      = __require_current_scope__ ("symbol_table::symbol_record::symbol_record_rep::erase_persistent");
 
     scope->erase_persistent (name);
   }
@@ -136,7 +136,7 @@
   symbol_table::symbol_record::symbol_record_rep::xglobal_varref (void)
   {
     symbol_table& symtab
-      = octave::__get_symbol_table__ ("symbol_table::symbol_record::symbol_record_rep::xglobal_varref");
+      = __get_symbol_table__ ("symbol_table::symbol_record::symbol_record_rep::xglobal_varref");
 
     symbol_table::global_symbols_iterator p
       = symtab.m_global_symbols.find (name);
@@ -149,7 +149,7 @@
   symbol_table::symbol_record::symbol_record_rep::xpersistent_varref (void)
   {
     symbol_table::scope *scope
-      = octave::__get_current_scope__ ("symbol_table::symbol_record::symbol_record_rep::xpersistent_varref");
+      = __get_current_scope__ ("symbol_table::symbol_record::symbol_record_rep::xpersistent_varref");
 
     return scope ? scope->persistent_varref (name) : dummy_octave_value;
   }
@@ -158,7 +158,7 @@
   symbol_table::symbol_record::symbol_record_rep::xglobal_varval (void) const
   {
     symbol_table& symtab
-      = octave::__get_symbol_table__ ("symbol_table::symbol_record::symbol_record_rep::xglobal_varval");
+      = __get_symbol_table__ ("symbol_table::symbol_record::symbol_record_rep::xglobal_varval");
 
     return symtab.global_varval (name);
   }
@@ -167,13 +167,13 @@
   symbol_table::symbol_record::symbol_record_rep::xpersistent_varval (void) const
   {
     symbol_table::scope *scope
-      = octave::__get_current_scope__ ("symbol_table::symbol_record::symbol_record_rep::xpersistent_varval");
+      = __get_current_scope__ ("symbol_table::symbol_record::symbol_record_rep::xpersistent_varval");
 
     return scope ? scope->persistent_varval (name) : octave_value ();
   }
 
   symbol_table::symbol_record::symbol_record (void)
-    : rep (new symbol_record_rep (octave::__get_current_scope__ ("symbol_record"),
+    : rep (new symbol_record_rep (__get_current_scope__ ("symbol_record"),
                                   "", octave_value (), local))
 
   { }
@@ -184,7 +184,7 @@
     octave_value retval;
 
     symbol_table& symtab
-      = octave::__get_symbol_table__ ("symbol_table::symbol_record::find");
+      = __get_symbol_table__ ("symbol_table::symbol_record::find");
 
     if (is_global ())
       retval = symtab.global_varval (name ());
@@ -223,14 +223,14 @@
   symbol_table::symbol_reference::symbol_reference (const symbol_record& record)
     : m_scope (0), m_context (0),m_sym (record)
   {
-    m_scope = octave::__get_current_scope__ ("symbol_reference");
+    m_scope = __get_current_scope__ ("symbol_reference");
   }
 
   void
   symbol_table::symbol_reference::update (void) const
   {
     symbol_table::scope *curr_scope
-      = octave::__get_current_scope__ ("symbol_reference::update");
+      = __get_current_scope__ ("symbol_reference::update");
 
     if (curr_scope && (m_scope != curr_scope || ! m_sym.is_valid ()))
       {
@@ -318,7 +318,7 @@
 
             if (! ff.empty ())
               {
-                octave::sys::time tc = fcn->time_checked ();
+                sys::time tc = fcn->time_checked ();
 
                 bool relative = check_relative && fcn->is_relative ();
 
@@ -339,7 +339,7 @@
                       {
                         int nm_len = nm.length ();
 
-                        if (octave::sys::env::absolute_pathname (nm)
+                        if (sys::env::absolute_pathname (nm)
                             && ((nm_len > 4
                                  && (nm.substr (nm_len-4) == ".oct"
                                      || nm.substr (nm_len-4) == ".mex"))
@@ -354,7 +354,7 @@
 
                             if (! dispatch_type.empty ())
                               {
-                                octave::load_path& lp = octave::__get_load_path__ ("out_of_date_check");
+                                load_path& lp = __get_load_path__ ("out_of_date_check");
 
                                 file = lp.find_method (dispatch_type, nm,
                                                        dir_name, pack);
@@ -365,7 +365,7 @@
                                     std::string s_pack;
 
                                     symbol_table& symtab
-                                      = octave::__get_symbol_table__ ("out_of_date_check");
+                                      = __get_symbol_table__ ("out_of_date_check");
 
                                     const std::list<std::string>& plist
                                       = symtab.parent_classes (dispatch_type);
@@ -393,11 +393,11 @@
 
                             // Maybe it's an autoload?
                             if (file.empty ())
-                              file = octave::lookup_autoload (nm);
+                              file = lookup_autoload (nm);
 
                             if (file.empty ())
                               {
-                                octave::load_path& lp = octave::__get_load_path__ ("out_of_date_check");
+                                load_path& lp = __get_load_path__ ("out_of_date_check");
                                 file = lp.find_fcn (nm, dir_name, pack);
                               }
                           }
@@ -424,16 +424,16 @@
                       {
                         // Same file.  If it is out of date, then reload it.
 
-                        octave::sys::time ottp = fcn->time_parsed ();
+                        sys::time ottp = fcn->time_parsed ();
                         time_t tp = ottp.unix_time ();
 
-                        fcn->mark_fcn_file_up_to_date (octave::sys::time ());
+                        fcn->mark_fcn_file_up_to_date (sys::time ());
 
                         if (! (Vignore_function_time_stamp == 2
                                || (Vignore_function_time_stamp
                                    && fcn->is_system_fcn_file ())))
                           {
-                            octave::sys::file_stat fs (ff);
+                            sys::file_stat fs (ff);
 
                             if (fs)
                               {
@@ -485,15 +485,15 @@
   {
     octave_value retval;
 
-    octave::load_path& lp
-      = octave::__get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::load_private_function");
+    load_path& lp
+      = __get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::load_private_function");
 
     std::string file_name = lp.find_private_fcn (dir_name, name);
 
     if (file_name.empty ())
       return retval;
 
-    octave_value ov_fcn = octave::load_fcn_from_file (file_name, dir_name);
+    octave_value ov_fcn = load_fcn_from_file (file_name, dir_name);
 
     if (ov_fcn.is_undefined ())
       return retval;
@@ -505,7 +505,7 @@
 
     std::string class_name;
 
-    size_t pos = dir_name.find_last_of (octave::sys::file_ops::dir_sep_chars ());
+    size_t pos = dir_name.find_last_of (sys::file_ops::dir_sep_chars ());
 
     if (pos != std::string::npos)
       {
@@ -529,15 +529,15 @@
 
     std::string dir_name;
 
-    octave::load_path& lp
-      = octave::__get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::load_class_constructor");
+    load_path& lp
+      = __get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::load_class_constructor");
 
     std::string file_name = lp.find_method (name, name, dir_name, package_name);
 
     if (! file_name.empty ())
       {
         octave_value ov_fcn
-          = octave::load_fcn_from_file (file_name, dir_name, name,
+          = load_fcn_from_file (file_name, dir_name, name,
                                         package_name);
 
         if (ov_fcn.is_defined ())
@@ -592,7 +592,7 @@
     else
       {
         cdef_manager& cdm
-          = octave::__get_cdef_manager__ ("symbol_table::fcn_info::fcn_info_rep::load_class_method");
+          = __get_cdef_manager__ ("symbol_table::fcn_info::fcn_info_rep::load_class_method");
 
         octave_function *cm = cdm.find_method_symbol (name, dispatch_type);
 
@@ -603,7 +603,7 @@
           {
             std::string dir_name;
 
-            octave::load_path& lp = octave::__get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::load_class_method");
+            load_path& lp = __get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::load_class_method");
 
             std::string file_name = lp.find_method (dispatch_type, name,
                                                     dir_name);
@@ -611,7 +611,7 @@
             if (! file_name.empty ())
               {
                 octave_value ov_fcn
-                  = octave::load_fcn_from_file (file_name, dir_name,
+                  = load_fcn_from_file (file_name, dir_name,
                                                 dispatch_type);
 
                 if (ov_fcn.is_defined ())
@@ -632,7 +632,7 @@
                 // Search parent classes
 
                 symbol_table& symtab
-                  = octave::__get_symbol_table__ ("symbol_table::fcn_info::fcn_info_rep::load_class_method");
+                  = __get_symbol_table__ ("symbol_table::fcn_info::fcn_info_rep::load_class_method");
 
                 const std::list<std::string>& plist =
                   symtab.parent_classes (dispatch_type);
@@ -741,7 +741,7 @@
             // There's a non-builtin class in the argument list.
             dispatch_type = args(i).class_name ();
 
-            symbol_table& symtab = octave::__get_symbol_table__ ("get_dispatch_type");
+            symbol_table& symtab = __get_symbol_table__ ("get_dispatch_type");
 
             for (int j = i+1; j < n; j++)
               {
@@ -800,7 +800,7 @@
         // the last prompt or chdir, so try updating the load path and
         // searching again.
 
-        octave::load_path& lp = octave::__get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::find");
+        load_path& lp = __get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::find");
 
         lp.update ();
 
@@ -817,7 +817,7 @@
     if (local_funcs)
       {
         symbol_table::scope *scope
-          = octave::__get_current_scope__ ("symbol_table::fcn_info::fcn_info_rep::xfind");
+          = __get_current_scope__ ("symbol_table::fcn_info::fcn_info_rep::xfind");
 
         octave_user_function *current_fcn = scope ? scope->function () : 0;
 
@@ -982,7 +982,7 @@
         // the last prompt or chdir, so try updating the load path and
         // searching again.
 
-        octave::load_path& lp = octave::__get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::builtin_find");
+        load_path& lp = __get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::builtin_find");
 
         lp.update ();
 
@@ -1021,7 +1021,7 @@
     // Private function.
 
     symbol_table::scope *scope
-      = octave::__get_current_scope__ ("symbol_table::fcn_info::fcn_info_rep::x_builtin_find");
+      = __get_current_scope__ ("symbol_table::fcn_info::fcn_info_rep::x_builtin_find");
 
     octave_user_function *current_fcn = scope ? scope->function () : 0;
 
@@ -1086,7 +1086,7 @@
     // from a .m file.
 
     symbol_table::scope *curr_scope
-      = octave::__get_current_scope__ ("symbol_table::fcn_info::fcn_info_rep::x_builtin_find");
+      = __get_current_scope__ ("symbol_table::fcn_info::fcn_info_rep::x_builtin_find");
 
     if (curr_scope)
       {
@@ -1145,16 +1145,16 @@
 
     if (! autoload_function.is_defined ())
       {
-        std::string file_name = octave::lookup_autoload (name);
+        std::string file_name = lookup_autoload (name);
 
         if (! file_name.empty ())
           {
-            size_t pos = file_name.find_last_of (octave::sys::file_ops::dir_sep_chars ());
+            size_t pos = file_name.find_last_of (sys::file_ops::dir_sep_chars ());
 
             std::string dir_name = file_name.substr (0, pos);
 
             octave_value ov_fcn
-              = octave::load_fcn_from_file (file_name, dir_name, "", "",
+              = load_fcn_from_file (file_name, dir_name, "", "",
                                             name, true);
 
             if (ov_fcn.is_defined ())
@@ -1177,7 +1177,7 @@
       {
         std::string dir_name;
 
-        octave::load_path& lp = octave::__get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::find_user_function");
+        load_path& lp = __get_load_path__ ("symbol_table::fcn_info::fcn_info_rep::find_user_function");
 
 
         std::string file_name = lp.find_fcn (name, dir_name, package_name);
@@ -1185,7 +1185,7 @@
         if (! file_name.empty ())
           {
             octave_value ov_fcn
-              = octave::load_fcn_from_file (file_name, dir_name, "",
+              = load_fcn_from_file (file_name, dir_name, "",
                                             package_name);
 
             if (ov_fcn.is_defined ())
@@ -1206,7 +1206,7 @@
     if (package.is_undefined ())
       {
         cdef_manager& cdm
-          = octave::__get_cdef_manager__ ("symbol_table::fcn_info::fcn_info_rep::find_package");
+          = __get_cdef_manager__ ("symbol_table::fcn_info::fcn_info_rep::find_package");
 
         octave_function *fcn = cdm.find_package_symbol (full_name ());
 
@@ -1349,10 +1349,10 @@
       {
         // Look for a class specific function.
         std::string dispatch_type =
-          name.substr (1, name.find_first_of (octave::sys::file_ops::dir_sep_str ()) - 1);
+          name.substr (1, name.find_first_of (sys::file_ops::dir_sep_str ()) - 1);
 
         std::string method;
-        size_t pos = name.find_last_of (octave::sys::file_ops::dir_sep_str ());
+        size_t pos = name.find_last_of (sys::file_ops::dir_sep_str ());
         if (pos != std::string::npos)
           method = name.substr (pos + 1);
 
@@ -1400,7 +1400,7 @@
     octave_value fcn;
 
     std::string full_name = "@" + dispatch_type +
-      octave::sys::file_ops::dir_sep_str () + name;
+      sys::file_ops::dir_sep_str () + name;
     size_t pos = full_name.find_first_of (Vfilemarker);
 
     if (pos != std::string::npos)
@@ -1503,7 +1503,7 @@
     // Variable.
 
     symbol_table& symtab
-      = octave::__get_symbol_table__ ("symbol_table::scope::find");
+      = __get_symbol_table__ ("symbol_table::scope::find");
 
     if (! skip_variables)
       {
@@ -1562,7 +1562,7 @@
     octave_value retval;
 
     symbol_table& symtab
-      = octave::__get_symbol_table__ ("symbol_table::scope::find");
+      = __get_symbol_table__ ("symbol_table::scope::find");
 
     fcn_table_iterator p = symtab.m_fcn_table.find (name);
 
@@ -1620,7 +1620,7 @@
       }
 
     symbol_table& symtab
-      = octave::__get_symbol_table__ ("symbol_table::scope::clear_global");
+      = __get_symbol_table__ ("symbol_table::scope::clear_global");
 
     global_symbols_iterator q = symtab.m_global_symbols.find (name);
 
@@ -1643,7 +1643,7 @@
       }
 
     symbol_table& symtab
-      = octave::__get_symbol_table__ ("symbol_table::scope::clear_global_pattern");
+      = __get_symbol_table__ ("symbol_table::scope::clear_global_pattern");
 
     global_symbols_iterator q = symtab.m_global_symbols.begin ();
 
--- a/libinterp/corefcn/symtab.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/corefcn/symtab.h	Mon Jun 26 09:05:37 2017 -0400
@@ -304,7 +304,7 @@
 
         bool valid;
 
-        octave::refcount<size_t> count;
+        refcount<size_t> count;
 
       private:
 
@@ -737,7 +737,7 @@
 
         octave_value built_in_function;
 
-        octave::refcount<size_t> count;
+        refcount<size_t> count;
 
       private:
 
--- a/libinterp/dldfcn/__ode15__.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/dldfcn/__ode15__.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -654,7 +654,7 @@
 
     if (flag == "init")
       {
-        octave_value_list output = octave::feval (event_fcn, args, 3);
+        octave_value_list output = feval (event_fcn, args, 3);
         oldval = output(0).vector_value ();
         oldisterminal = output(1).vector_value ();
         olddir = output(2).vector_value ();
@@ -662,7 +662,7 @@
     else if (flag == "")
       {
         ColumnVector index (0);
-        octave_value_list output = octave::feval (event_fcn, args, 3);
+        octave_value_list output = feval (event_fcn, args, 3);
         ColumnVector val = output(0).vector_value ();
         ColumnVector isterminal = output(1).vector_value ();
         ColumnVector dir = output(2).vector_value ();
@@ -834,18 +834,18 @@
         toutput(1) = tend;
         output(0) = toutput;
 
-        octave::feval (output_fcn, output, 0);
+        feval (output_fcn, output, 0);
       }
     else if (flag == "")
       {
         output(0) = tsol;
-        octave_value_list val = octave::feval (output_fcn, output, 1);
+        octave_value_list val = feval (output_fcn, output, 1);
         status = val(0).bool_value ();
       }
     else
       {  // Cleanup plotter
         output(0) = tend;
-        octave::feval (output_fcn, output, 0);
+        feval (output_fcn, output, 0);
       }
 
     return status;
@@ -902,9 +902,9 @@
 
     try
       {
-        tmp = octave::feval (ida_fc, ovl (t, x, xdot), 1);
+        tmp = feval (ida_fc, ovl (t, x, xdot), 1);
       }
-    catch (octave::execution_exception& e)
+    catch (execution_exception& e)
       {
         err_user_supplied_eval (e, "__ode15__");
       }
@@ -920,9 +920,9 @@
 
     try
       {
-        tmp = octave::feval (ida_jc, ovl (t, x, xdot), 2);
+        tmp = feval (ida_jc, ovl (t, x, xdot), 2);
       }
-    catch (octave::execution_exception& e)
+    catch (execution_exception& e)
       {
         err_user_supplied_eval (e, "__ode15__");
       }
@@ -938,9 +938,9 @@
 
     try
       {
-        tmp = octave::feval (ida_jc, ovl (t, x, xdot), 2);
+        tmp = feval (ida_jc, ovl (t, x, xdot), 2);
       }
-    catch (octave::execution_exception& e)
+    catch (execution_exception& e)
       {
         err_user_supplied_eval (e, "__ode15__");
       }
--- a/libinterp/dldfcn/gzip.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/dldfcn/gzip.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -284,9 +284,9 @@
       gzip_header (void) = delete;
 
       gzip_header (const std::string& source_path)
-        : m_basename (octave::sys::env::base_pathname (source_path))
+        : m_basename (sys::env::base_pathname (source_path))
       {
-        const octave::sys::file_stat source_stat (source_path);
+        const sys::file_stat source_stat (source_path);
         if (! source_stat)
           throw std::runtime_error ("unable to stat source file");
 
@@ -480,11 +480,11 @@
     std::function<void(const std::string&)> walk;
     walk = [&walk, &mk_dest_path, &dest_paths] (const std::string& path) -> void
     {
-      const octave::sys::file_stat fs (path);
+      const sys::file_stat fs (path);
       // is_dir and is_reg will return false if failed to stat.
       if (fs.is_dir ())
         {
-          octave::sys::dir_entry dir (path);
+          sys::dir_entry dir (path);
           if (dir)
             {
               // Collect the whole list of filenames first, before recursion
@@ -493,7 +493,7 @@
               string_vector dirlist = dir.read ();
               for (octave_idx_type i = 0; i < dirlist.numel (); i++)
                 if (dirlist(i) != "." && dirlist(i) != "..")
-                  walk (octave::sys::file_ops::concat (path, dirlist(i)));
+                  walk (sys::file_ops::concat (path, dirlist(i)));
             }
           // Note that we skip any problem with directories.
         }
@@ -511,7 +511,7 @@
               // in the first place.  Note that it is possible for the file
               // to exist in the first place and for X::zip to not have
               // clobber it yet but we remove it anyway by design.
-              octave::sys::unlink (dest_path);
+              sys::unlink (dest_path);
               return;
             }
           dest_paths.push_front (dest_path);
@@ -522,7 +522,7 @@
 
     for (octave_idx_type i = 0; i < source_patterns.numel (); i++)
       {
-        const glob_match pattern (octave::sys::file_ops::tilde_expand (source_patterns(i)));
+        const glob_match pattern (sys::file_ops::tilde_expand (source_patterns(i)));
         const string_vector filepaths = pattern.glob ();
         for (octave_idx_type j = 0; j < filepaths.numel (); j++)
           walk (filepaths(j));
@@ -552,15 +552,15 @@
     const std::function<std::string(const std::string&)> mk_dest_path
       = [&out_dir, &ext] (const std::string& source_path) -> std::string
       {
-        const std::string basename = octave::sys::env::base_pathname (source_path);
-        return octave::sys::file_ops::concat (out_dir, basename + ext);
+        const std::string basename = sys::env::base_pathname (source_path);
+        return sys::file_ops::concat (out_dir, basename + ext);
       };
 
     // We don't care if mkdir fails.  Maybe it failed because it already
     // exists, or maybe it can't bre created.  If the first, then there's
     // nothing to do, if the later, then it will be handled later.  Any
     // is to be handled by not listing files in the output.
-    octave::sys::mkdir (out_dir, 0777);
+    sys::mkdir (out_dir, 0777);
     return xzip<X> (source_patterns, mk_dest_path);
   }
 
--- a/libinterp/octave.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/octave.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -317,7 +317,7 @@
   {
     m_program_invocation_name = pname;
 
-    size_t pos = pname.find_last_of (octave::sys::file_ops::dir_sep_chars ());
+    size_t pos = pname.find_last_of (sys::file_ops::dir_sep_chars ());
 
     m_program_name = (pos != std::string::npos) ? pname.substr (pos+1) : pname;
   }
--- a/libinterp/parse-tree/lex.ll	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/lex.ll	Mon Jun 26 09:05:37 2017 -0400
@@ -2109,7 +2109,7 @@
     if (empty ())
       {
         symbol_table::scope *scope
-          = octave::__get_current_scope__ ("lexical_feedback::symbol_table_context::curr_scope");
+          = __get_current_scope__ ("lexical_feedback::symbol_table_context::curr_scope");
 
         return scope;
       }
@@ -2381,7 +2381,7 @@
     // Only ask for input from stdin if we are expecting interactive
     // input.
 
-    if (octave::application::interactive ()
+    if (application::interactive ()
         && ! (reading_fcn_file
               || reading_classdef_file
               || reading_script_file
--- a/libinterp/parse-tree/oct-parse.in.yy	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/oct-parse.in.yy	Mon Jun 26 09:05:37 2017 -0400
@@ -2437,7 +2437,7 @@
   {
     tree_expression *retval = nullptr;
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     frame.protect_var (discard_error_messages);
     frame.protect_var (discard_warning_messages);
@@ -2465,7 +2465,7 @@
       {
         try
           {
-            octave::tree_evaluator& tw
+            tree_evaluator& tw
               = __get_evaluator__ ("finish_colon_expression");
 
             octave_value tmp = tw.evaluate (e);
@@ -2485,9 +2485,9 @@
 
             retval = tc_retval;
           }
-        catch (const octave::execution_exception&)
+        catch (const execution_exception&)
           {
-            octave::interpreter::recover_from_exception ();
+            interpreter::recover_from_exception ();
           }
       }
     else
@@ -3215,7 +3215,7 @@
 
     m_lexer.help_text = "";
 
-    octave::sys::time now;
+    sys::time now;
 
     script->stash_fcn_file_time (now);
 
@@ -3305,7 +3305,7 @@
 
         std::string nm = m_lexer.fcn_file_name;
 
-        size_t pos = nm.find_last_of (octave::sys::file_ops::dir_sep_chars ());
+        size_t pos = nm.find_last_of (sys::file_ops::dir_sep_chars ());
 
         if (pos != std::string::npos)
           nm = m_lexer.fcn_file_name.substr (pos+1);
@@ -3323,7 +3323,7 @@
 
     if (m_lexer.reading_fcn_file || m_lexer.reading_classdef_file || m_autoloading)
       {
-        octave::sys::time now;
+        sys::time now;
 
         fcn->stash_fcn_file_name (m_lexer.fcn_file_full_name);
         fcn->stash_fcn_file_time (now);
@@ -3356,7 +3356,7 @@
 
         std::string nm = fcn->fcn_file_name ();
 
-        octave::sys::file_stat fs (nm);
+        sys::file_stat fs (nm);
 
         if (fs && fs.is_newer (now))
           warning_with_id ("Octave:future-time-stamp",
@@ -3415,7 +3415,7 @@
           tmp += ": " + file;
 
         symbol_table& symtab
-          = octave::__get_symbol_table__ ("base_parser::finish_function");
+          = __get_symbol_table__ ("base_parser::finish_function");
 
 
         symbol_table::scope *fcn_scope = fcn->scope ();
@@ -3499,7 +3499,7 @@
     args(0) = method_nm;
 
     symbol_table& symtab
-      = octave::__get_symbol_table__ ("base_parser::make_superclass_ref");
+      = __get_symbol_table__ ("base_parser::make_superclass_ref");
 
     octave_value fcn
       = symtab.find_built_in_function ("__superclass_reference__");
@@ -3515,7 +3515,7 @@
     args(0) = class_nm;
 
     symbol_table& symtab
-      = octave::__get_symbol_table__ ("base_parser::make_meta_class_query");
+      = __get_symbol_table__ ("base_parser::make_meta_class_query");
 
     octave_value fcn
       = symtab.find_built_in_function ("__meta_class_query__");
@@ -3545,7 +3545,7 @@
 
     std::string nm = m_lexer.fcn_file_name;
 
-    size_t pos = nm.find_last_of (octave::sys::file_ops::dir_sep_chars ());
+    size_t pos = nm.find_last_of (sys::file_ops::dir_sep_chars ());
 
     if (pos != std::string::npos)
       nm = m_lexer.fcn_file_name.substr (pos+1);
@@ -4020,7 +4020,7 @@
 
     if (e->is_constant ())
       {
-        octave::tree_evaluator& tw
+        tree_evaluator& tw
           = __get_evaluator__ ("validate_matrix_for_assignment");
 
         octave_value ov = tw.evaluate (e);
@@ -4079,7 +4079,7 @@
   {
     tree_expression *retval = array_list;
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     frame.protect_var (discard_error_messages);
     frame.protect_var (discard_warning_messages);
@@ -4091,7 +4091,7 @@
       {
         try
           {
-            octave::tree_evaluator& tw
+            tree_evaluator& tw
               = __get_evaluator__ ("finish_array_list");
 
             octave_value tmp = tw.evaluate (array_list);
@@ -4112,9 +4112,9 @@
 
             retval = tc_retval;
           }
-        catch (const octave::execution_exception&)
+        catch (const execution_exception&)
           {
-            octave::interpreter::recover_from_exception ();
+            interpreter::recover_from_exception ();
           }
       }
 
@@ -4279,7 +4279,7 @@
       {
         status = octave_pull_parse (pstate, *this);
       }
-    catch (octave::execution_exception& e)
+    catch (execution_exception& e)
       {
         std::string file = m_lexer.fcn_file_full_name;
 
@@ -4288,11 +4288,11 @@
         else
           error (e, "parse error in %s", file.c_str ());
       }
-    catch (const octave::exit_exception&)
+    catch (const exit_exception&)
       {
         throw;
       }
-    catch (octave::interrupt_exception &)
+    catch (interrupt_exception &)
       {
         throw;
       }
@@ -4343,7 +4343,7 @@
           {
             status = octave_push_parse (pstate, token, &lval, *this);
           }
-        catch (octave::execution_exception& e)
+        catch (execution_exception& e)
           {
             std::string file = m_lexer.fcn_file_full_name;
 
@@ -4352,11 +4352,11 @@
             else
               error (e, "parse error in %s", file.c_str ());
           }
-        catch (const octave::exit_exception&)
+        catch (const exit_exception&)
           {
             throw;
           }
-        catch (octave::interrupt_exception &)
+        catch (interrupt_exception &)
           {
             throw;
           }
@@ -4510,10 +4510,10 @@
         || (file_len > 4 && file.substr (file_len-4) == ".mex")
         || (file_len > 2 && file.substr (file_len-2) == ".m"))
       {
-        file = octave::sys::env::base_pathname (file);
+        file = sys::env::base_pathname (file);
         file = file.substr (0, file.find_last_of ('.'));
 
-        size_t pos = file.find_last_of (octave::sys::file_ops::dir_sep_str ());
+        size_t pos = file.find_last_of (sys::file_ops::dir_sep_str ());
         if (pos != std::string::npos)
           file = file.substr (pos+1);
       }
@@ -4556,7 +4556,7 @@
 
     if (p != autoload_map.end ())
       {
-        load_path& lp = octave::__get_load_path__ ("lookup_autoload");
+        load_path& lp = __get_load_path__ ("lookup_autoload");
 
         retval = lp.find_file (p->second);
       }
@@ -4597,7 +4597,7 @@
   {
     octave_value retval;
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     std::string nm = file_name;
 
@@ -4613,21 +4613,21 @@
         || (nm_len > 4 && nm.substr (nm_len-4) == ".mex")
         || (nm_len > 2 && nm.substr (nm_len-2) == ".m"))
       {
-        nm = octave::sys::env::base_pathname (file);
+        nm = sys::env::base_pathname (file);
         nm = nm.substr (0, nm.find_last_of ('.'));
 
-        size_t pos = nm.find_last_of (octave::sys::file_ops::dir_sep_str ());
+        size_t pos = nm.find_last_of (sys::file_ops::dir_sep_str ());
         if (pos != std::string::npos)
           nm = nm.substr (pos+1);
       }
 
-    relative_lookup = ! octave::sys::env::absolute_pathname (file);
-
-    file = octave::sys::env::make_absolute (file);
+    relative_lookup = ! sys::env::absolute_pathname (file);
+
+    file = sys::env::make_absolute (file);
 
     int len = file.length ();
 
-      octave::dynamic_loader& dyn_loader
+      dynamic_loader& dyn_loader
         = __get_dynamic_loader__ ("~octave_mex_function");
 
     if (len > 4 && file.substr (len-4, len-1) == ".oct")
@@ -4846,16 +4846,16 @@
     static std::map<std::string, int> source_call_depth;
 
     std::string file_full_name
-      = octave::sys::file_ops::tilde_expand (file_name);
+      = sys::file_ops::tilde_expand (file_name);
 
     size_t pos
-      = file_full_name.find_last_of (octave::sys::file_ops::dir_sep_str ());
+      = file_full_name.find_last_of (sys::file_ops::dir_sep_str ());
 
     std::string dir_name = file_full_name.substr (0, pos);
 
-    file_full_name = octave::sys::env::make_absolute (file_full_name);
-
-    octave::unwind_protect frame;
+    file_full_name = sys::env::make_absolute (file_full_name);
+
+    unwind_protect frame;
 
     if (source_call_depth.find (file_full_name) == source_call_depth.end ())
       source_call_depth[file_full_name] = -1;
@@ -4869,7 +4869,7 @@
 
     if (! context.empty ())
       {
-        octave::call_stack& cs = octave::__get_call_stack__ ("source_file");
+        call_stack& cs = __get_call_stack__ ("source_file");
 
         if (context == "caller")
           cs.goto_caller_frame ();
@@ -4878,12 +4878,12 @@
         else
           error ("source: context must be \"caller\" or \"base\"");
 
-        frame.add_method (cs, &octave::call_stack::pop);
+        frame.add_method (cs, &call_stack::pop);
       }
 
     // Find symbol name that would be in symbol_table, if it were loaded.
     size_t dir_end
-      = file_name.find_last_of (octave::sys::file_ops::dir_sep_chars ());
+      = file_name.find_last_of (sys::file_ops::dir_sep_chars ());
     dir_end = (dir_end == std::string::npos) ? 0 : dir_end + 1;
 
     size_t extension = file_name.find_last_of ('.');
@@ -4891,10 +4891,10 @@
       extension = file_name.length ();
 
     std::string symbol = file_name.substr (dir_end, extension - dir_end);
-    std::string full_name = octave::sys::canonicalize_file_name (file_name);
+    std::string full_name = sys::canonicalize_file_name (file_name);
 
     // Check if this file is already loaded (or in the path)
-    symbol_table& symtab = octave::__get_symbol_table__ ("source_file");
+    symbol_table& symtab = __get_symbol_table__ ("source_file");
     octave_value ov_code = symtab.find (symbol);
 
     if (ov_code.is_user_script ())
@@ -4902,7 +4902,7 @@
         octave_user_script *script = ov_code.user_script_value ();
 
         if (! script
-            || (octave::sys::canonicalize_file_name (script->fcn_file_name ())
+            || (sys::canonicalize_file_name (script->fcn_file_name ())
                 != full_name))
           {
             // Wrong file, so load it below.
@@ -4926,7 +4926,7 @@
                                       "", "", require_file, true, false,
                                       false, warn_for);
           }
-        catch (octave::execution_exception& e)
+        catch (execution_exception& e)
           {
             error (e, "source: error sourcing file '%s'",
                    file_full_name.c_str ());
@@ -5073,7 +5073,7 @@
   {
     octave_value_list retval;
 
-    symbol_table& symtab = octave::__get_symbol_table__ ("feval");
+    symbol_table& symtab = __get_symbol_table__ ("feval");
 
     octave_value fcn = symtab.find_function (name, args);
 
@@ -5111,7 +5111,7 @@
   {
     if (val.is_function ())
       {
-        return octave::feval (val.function_value (), args, nargout);
+        return feval (val.function_value (), args, nargout);
       }
     else if (val.is_function_handle ())
       {
@@ -5125,7 +5125,7 @@
       }
     else if (val.is_string ())
       {
-        return octave::feval (val.string_value (), args, nargout);
+        return feval (val.string_value (), args, nargout);
       }
     else
       error ("feval: first argument must be a string, inline function, or a function handle");
@@ -5163,7 +5163,7 @@
 
         octave_value_list tmp_args = get_feval_args (args);
 
-        return octave::feval (f_arg, tmp_args, nargout);
+        return feval (f_arg, tmp_args, nargout);
       }
     else
       error ("feval: first argument must be a string, inline function, or a function handle");
@@ -5271,7 +5271,7 @@
   {
     octave_value_list retval;
 
-    octave::parser parser (eval_str);
+    parser parser (eval_str);
 
     do
       {
@@ -5285,7 +5285,7 @@
               {
                 tree_statement *stmt = 0;
 
-                octave::tree_evaluator& tw = __get_evaluator__ ("eval_string");
+                tree_evaluator& tw = __get_evaluator__ ("eval_string");
 
                 if (parser.m_stmt_list->length () == 1
                     && (stmt = parser.m_stmt_list->front ())
--- a/libinterp/parse-tree/parse.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/parse.h	Mon Jun 26 09:05:37 2017 -0400
@@ -483,18 +483,18 @@
   public:
 
     parser (void)
-      : base_parser (*(new octave::lexer ()))
+      : base_parser (*(new lexer ()))
     { }
 
     parser (FILE *file)
-      : base_parser (*(new octave::lexer (file)))
+      : base_parser (*(new lexer (file)))
     { }
 
     parser (const std::string& eval_string)
-      : base_parser (*(new octave::lexer (eval_string)))
+      : base_parser (*(new lexer (eval_string)))
     { }
 
-    parser (octave::lexer& lxr)
+    parser (lexer& lxr)
       : base_parser (lxr)
     { }
 
@@ -514,7 +514,7 @@
   public:
 
     push_parser (void)
-      : base_parser (*(new octave::push_lexer ()))
+      : base_parser (*(new push_lexer ()))
     { }
 
     // No copying!
@@ -583,7 +583,7 @@
   eval_string (const std::string&, bool silent, int& parse_status);
 
   extern OCTINTERP_API void
-  cleanup_statement_list (octave::tree_statement_list **lst);
+  cleanup_statement_list (tree_statement_list **lst);
 }
 
 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
--- a/libinterp/parse-tree/pt-arg-list.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-arg-list.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -74,7 +74,7 @@
   void
   tree_argument_list::append (const element_type& s)
   {
-    octave::base_list<tree_expression *>::append (s);
+    base_list<tree_expression *>::append (s);
 
     if (! list_includes_magic_end && s && s->has_magic_end ())
       list_includes_magic_end = true;
@@ -216,7 +216,7 @@
                          && ! (object->is_function ()
                                || object->is_function_handle ()));
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     if (stash_object)
       {
--- a/libinterp/parse-tree/pt-arg-list.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-arg-list.h	Mon Jun 26 09:05:37 2017 -0400
@@ -43,7 +43,7 @@
   // Argument lists.  Used to hold the list of expressions that are the
   // arguments in a function call or index expression.
 
-  class tree_argument_list : public octave::base_list<tree_expression *>
+  class tree_argument_list : public base_list<tree_expression *>
   {
   public:
 
--- a/libinterp/parse-tree/pt-array-list.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-array-list.h	Mon Jun 26 09:05:37 2017 -0400
@@ -37,17 +37,17 @@
   // Base class for cell arrays and matrices.
 
   class tree_array_list : public tree_expression,
-                          public octave::base_list<tree_argument_list *>
+                          public base_list<tree_argument_list *>
   {
   public:
 
-    typedef octave::base_list<tree_argument_list *>::iterator iterator;
-    typedef octave::base_list<tree_argument_list *>::const_iterator const_iterator;
+    typedef base_list<tree_argument_list *>::iterator iterator;
+    typedef base_list<tree_argument_list *>::const_iterator const_iterator;
 
   protected:
 
     tree_array_list (tree_argument_list *row = nullptr, int l = -1, int c = -1)
-      : tree_expression (l, c), octave::base_list<tree_argument_list *> ()
+      : tree_expression (l, c), base_list<tree_argument_list *> ()
     {
       if (row)
         append (row);
--- a/libinterp/parse-tree/pt-classdef.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-classdef.h	Mon Jun 26 09:05:37 2017 -0400
@@ -81,7 +81,7 @@
     bool neg;
   };
 
-  class tree_classdef_attribute_list : public octave::base_list<tree_classdef_attribute *>
+  class tree_classdef_attribute_list : public base_list<tree_classdef_attribute *>
   {
   public:
 
@@ -89,8 +89,8 @@
 
     tree_classdef_attribute_list (tree_classdef_attribute *a) { append (a); }
 
-    tree_classdef_attribute_list (const octave::base_list<tree_classdef_attribute *>& a)
-      : octave::base_list<tree_classdef_attribute *> (a) { }
+    tree_classdef_attribute_list (const base_list<tree_classdef_attribute *>& a)
+      : base_list<tree_classdef_attribute *> (a) { }
 
     // No copying!
 
@@ -135,7 +135,7 @@
     std::string cls_name;
   };
 
-  class tree_classdef_superclass_list : public octave::base_list<tree_classdef_superclass *>
+  class tree_classdef_superclass_list : public base_list<tree_classdef_superclass *>
   {
   public:
 
@@ -143,8 +143,8 @@
 
     tree_classdef_superclass_list (tree_classdef_superclass *sc) { append (sc); }
 
-    tree_classdef_superclass_list (const octave::base_list<tree_classdef_superclass *>& a)
-      : octave::base_list<tree_classdef_superclass *> (a) { }
+    tree_classdef_superclass_list (const base_list<tree_classdef_superclass *>& a)
+      : base_list<tree_classdef_superclass *> (a) { }
 
     // No copying!
 
@@ -167,7 +167,7 @@
   public:
 
     tree_classdef_element (tree_classdef_attribute_list *a,
-                           octave::base_list<T> *elist,
+                           base_list<T> *elist,
                            octave_comment_list *lc, octave_comment_list *tc,
                            int l = -1, int c = -1)
       : tree (l, c), attr_list (a), elt_list (elist),
@@ -190,7 +190,7 @@
 
     tree_classdef_attribute_list * attribute_list (void) { return attr_list; }
 
-    octave::base_list<T> * element_list (void) { return elt_list; }
+    base_list<T> * element_list (void) { return elt_list; }
 
     octave_comment_list * leading_comment (void) { return lead_comm; }
 
@@ -204,7 +204,7 @@
     tree_classdef_attribute_list *attr_list;
 
     // The list of objects contained in this block.
-    octave::base_list<T> *elt_list;
+    base_list<T> *elt_list;
 
     // Comment preceding the token marking the beginning of the block.
     octave_comment_list *lead_comm;
@@ -247,7 +247,7 @@
     tree_expression *expr;
   };
 
-  class tree_classdef_property_list : public octave::base_list<tree_classdef_property *>
+  class tree_classdef_property_list : public base_list<tree_classdef_property *>
   {
   public:
 
@@ -255,8 +255,8 @@
 
     tree_classdef_property_list (tree_classdef_property *p) { append (p); }
 
-    tree_classdef_property_list (const octave::base_list<tree_classdef_property *>& a)
-      : octave::base_list<tree_classdef_property *> (a) { }
+    tree_classdef_property_list (const base_list<tree_classdef_property *>& a)
+      : base_list<tree_classdef_property *> (a) { }
 
     // No copying!
 
@@ -300,7 +300,7 @@
     }
   };
 
-  class tree_classdef_methods_list : public octave::base_list<octave_value>
+  class tree_classdef_methods_list : public base_list<octave_value>
   {
   public:
 
@@ -308,8 +308,8 @@
 
     tree_classdef_methods_list (const octave_value& f) { append (f); }
 
-    tree_classdef_methods_list (const octave::base_list<octave_value>& a)
-      : octave::base_list<octave_value> (a) { }
+    tree_classdef_methods_list (const base_list<octave_value>& a)
+      : base_list<octave_value> (a) { }
 
     // No copying!
 
@@ -380,7 +380,7 @@
     tree_identifier *id;
   };
 
-  class tree_classdef_events_list : public octave::base_list<tree_classdef_event *>
+  class tree_classdef_events_list : public base_list<tree_classdef_event *>
   {
   public:
 
@@ -388,8 +388,8 @@
 
     tree_classdef_events_list (tree_classdef_event *e) { append (e); }
 
-    tree_classdef_events_list (const octave::base_list<tree_classdef_event *>& a)
-      : octave::base_list<tree_classdef_event *> (a) { }
+    tree_classdef_events_list (const base_list<tree_classdef_event *>& a)
+      : base_list<tree_classdef_event *> (a) { }
 
     // No copying!
 
@@ -468,7 +468,7 @@
     tree_expression *expr;
   };
 
-  class tree_classdef_enum_list : public octave::base_list<tree_classdef_enum *>
+  class tree_classdef_enum_list : public base_list<tree_classdef_enum *>
   {
   public:
 
@@ -476,8 +476,8 @@
 
     tree_classdef_enum_list (tree_classdef_enum *e) { append (e); }
 
-    tree_classdef_enum_list (const octave::base_list<tree_classdef_enum *>& a)
-      : octave::base_list<tree_classdef_enum *> (a) { }
+    tree_classdef_enum_list (const base_list<tree_classdef_enum *>& a)
+      : base_list<tree_classdef_enum *> (a) { }
 
     // No copying!
 
--- a/libinterp/parse-tree/pt-decl.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-decl.h	Mon Jun 26 09:05:37 2017 -0400
@@ -111,7 +111,7 @@
     tree_expression *expr;
   };
 
-  class tree_decl_init_list : public octave::base_list<tree_decl_elt *>
+  class tree_decl_init_list : public base_list<tree_decl_elt *>
   {
   public:
 
--- a/libinterp/parse-tree/pt-eval.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-eval.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -381,7 +381,7 @@
         if (! fcn.is_defined ())
           error ("can not find overloaded colon function");
 
-        octave_value_list tmp2 = octave::feval (fcn, tmp1, 1);
+        octave_value_list tmp2 = feval (fcn, tmp1, 1);
 
         val = tmp2 (0);
       }
@@ -688,7 +688,7 @@
   void
   tree_evaluator::visit_decl_elt (tree_decl_elt& elt)
   {
-    octave::tree_identifier *id = elt.ident ();
+    tree_identifier *id = elt.ident ();
 
     if (id)
       {
@@ -703,7 +703,7 @@
 
         if (ult.is_undefined ())
           {
-            octave::tree_expression *expr = elt.expression ();
+            tree_expression *expr = elt.expression ();
 
             octave_value init_val;
 
@@ -750,7 +750,7 @@
     // FIXME: need to handle PARFOR loops here using cmd.in_parallel ()
     // and cmd.maxproc_expr ();
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     frame.protect_var (in_loop_command);
 
@@ -868,7 +868,7 @@
     if (debug_mode)
       do_breakpoint (cmd.is_breakpoint (true));
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     frame.protect_var (in_loop_command);
 
@@ -1017,11 +1017,11 @@
         else
           {
             if (expr.print_result () && nargout == 0
-                && octave::tree_evaluator::statement_printing_enabled ())
+                && tree_evaluator::statement_printing_enabled ())
               {
                 octave_value_list args = ovl (val);
                 args.stash_name_tags (string_vector (expr.name ()));
-                octave::feval ("display", args);
+                feval ("display", args);
               }
 
             retval = val;
@@ -1249,7 +1249,7 @@
                   {
                     retval = fcn->call (*this, nargout, first_args);
                   }
-                catch (octave::index_exception& e)
+                catch (index_exception& e)
                   {
                     final_index_error (e, expr);
                   }
@@ -1331,7 +1331,7 @@
                           }
                       }
                   }
-                catch (octave::index_exception& e)
+                catch (index_exception& e)
                   {
                     final_index_error (e, expr);
                   }
@@ -1372,7 +1372,7 @@
             beg = n;
             idx.clear ();
           }
-        catch (octave::index_exception& e)  // range problems, bad index type, etc.
+        catch (index_exception& e)  // range problems, bad index type, etc.
           {
             final_index_error (e, expr);
           }
@@ -1804,7 +1804,7 @@
               }
 
             if (expr.print_result ()
-                && octave::tree_evaluator::statement_printing_enabled ())
+                && tree_evaluator::statement_printing_enabled ())
               {
                 // We clear any index here so that we can get
                 // the new value of the referenced object below,
@@ -1817,7 +1817,7 @@
 
                 octave_value_list args = ovl (lhs_val);
                 args.stash_name_tags (string_vector (lhs_elt->name ()));
-                octave::feval ("display", args);
+                feval ("display", args);
               }
           }
 
@@ -1867,7 +1867,7 @@
 
     int nargout = m_nargout_stack.top ();
 
-    retval = octave::feval (fcn.function_value (), args, nargout);
+    retval = feval (fcn.function_value (), args, nargout);
 
     if (retval.length () == 1 && retval(0).is_function ())
       {
@@ -2030,7 +2030,7 @@
 
         try
           {
-            octave::unwind_protect frame;
+            unwind_protect frame;
 
             octave_lvalue ult = lhs->lvalue (this);
 
@@ -2055,7 +2055,7 @@
               val = ult.value ();
 
             if (expr.print_result ()
-                && octave::tree_evaluator::statement_printing_enabled ())
+                && tree_evaluator::statement_printing_enabled ())
               {
                 // We clear any index here so that we can
                 // get the new value of the referenced
@@ -2069,10 +2069,10 @@
 
                 octave_value_list args = ovl (lhs_val);
                 args.stash_name_tags (string_vector (lhs->name ()));
-                octave::feval ("display", args);
+                feval ("display", args);
               }
           }
-        catch (octave::index_exception& e)
+        catch (index_exception& e)
           {
             e.set_var (lhs->name ());
             std::string msg = e.message ();
@@ -2263,7 +2263,7 @@
 
     {
       // unwind frame before catch block
-      octave::unwind_protect frame;
+      unwind_protect frame;
 
       frame.protect_var (buffer_error_messages);
       frame.protect_var (Vdebug_on_error);
@@ -2286,9 +2286,9 @@
               try_code->accept (*this);
               in_try_catch--;
             }
-          catch (const octave::execution_exception&)
+          catch (const execution_exception&)
             {
-              octave::interpreter::recover_from_exception ();
+              interpreter::recover_from_exception ();
 
               in_try_catch--;          // must be restored before "catch" block
               execution_error = true;
@@ -2330,7 +2330,7 @@
   void
   tree_evaluator::do_unwind_protect_cleanup_code (tree_statement_list *list)
   {
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     frame.protect_var (octave_interrupt_state);
     octave_interrupt_state = 0;
@@ -2338,9 +2338,9 @@
     // We want to preserve the last location info for possible
     // backtracking.
 
-    frame.add_method (m_call_stack, &octave::call_stack::set_line,
+    frame.add_method (m_call_stack, &call_stack::set_line,
                       m_call_stack.current_line ());
-    frame.add_method (m_call_stack, &octave::call_stack::set_column,
+    frame.add_method (m_call_stack, &call_stack::set_column,
                       m_call_stack.current_column ());
 
     // Similarly, if we have seen a return or break statement, allow all
@@ -2359,9 +2359,9 @@
         if (list)
           list->accept (*this);
       }
-    catch (const octave::execution_exception&)
+    catch (const execution_exception&)
       {
-        octave::interpreter::recover_from_exception ();
+        interpreter::recover_from_exception ();
 
         if (tree_break_command::breaking || tree_return_command::returning)
           frame.discard (2);
@@ -2419,13 +2419,13 @@
           {
             unwind_protect_code->accept (*this);
           }
-        catch (const octave::execution_exception&)
+        catch (const execution_exception&)
           {
             // FIXME: Maybe we should be able to temporarily set the
             // interpreter's exception handling state to something "safe"
             // while the cleanup block runs instead of just resetting it
             // here?
-            octave::interpreter::recover_from_exception ();
+            interpreter::recover_from_exception ();
 
             // Run the cleanup code on exceptions, so that it is run even
             // in case of interrupt or out-of-memory.
@@ -2435,10 +2435,10 @@
             // exception will be thrown instead of the original.
             throw;
           }
-        catch (const octave::interrupt_exception&)
+        catch (const interrupt_exception&)
           {
             // The comments above apply here as well.
-            octave::interpreter::recover_from_exception ();
+            interpreter::recover_from_exception ();
             do_unwind_protect_cleanup_code (cleanup_code);
             throw;
           }
@@ -2457,7 +2457,7 @@
       return;
 #endif
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     frame.protect_var (in_loop_command);
 
@@ -2496,7 +2496,7 @@
       return;
 #endif
 
-    octave::unwind_protect frame;
+    unwind_protect frame;
 
     frame.protect_var (in_loop_command);
 
@@ -2648,7 +2648,7 @@
   }
 
   octave_value_list
-  tree_evaluator::make_value_list (octave::tree_argument_list *args,
+  tree_evaluator::make_value_list (tree_argument_list *args,
                                    const string_vector& arg_nm,
                                    const octave_value *object, bool rvalue)
   {
--- a/libinterp/parse-tree/pt-eval.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-eval.h	Mon Jun 26 09:05:37 2017 -0400
@@ -307,7 +307,7 @@
     bool is_logically_true (tree_expression *expr, const char *warn_for);
 
     octave_value_list
-    make_value_list (octave::tree_argument_list *args,
+    make_value_list (tree_argument_list *args,
                      const string_vector& arg_nm,
                      const octave_value *object, bool rvalue = true);
 
--- a/libinterp/parse-tree/pt-exp.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-exp.h	Mon Jun 26 09:05:37 2017 -0400
@@ -94,7 +94,7 @@
 
     // Check if the result of the expression should be printed.
     // Should normally be used in conjunction with
-    // octave::tree_evaluator::statement_printing_enabled.
+    // tree_evaluator::statement_printing_enabled.
     bool print_result (void) const { return print_flag; }
 
     virtual std::string oper (void) const { return "<unknown>"; }
--- a/libinterp/parse-tree/pt-fcn-handle.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-fcn-handle.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -72,7 +72,7 @@
     symbol_table::scope *af_parent_scope = m_parent_scope;
 
     symbol_table& symtab
-      = octave::__get_symbol_table__ ("tree_anon_fcn_handle::dup");
+      = __get_symbol_table__ ("tree_anon_fcn_handle::dup");
 
     symbol_table::scope *new_scope = af_scope ? af_scope->dup () : 0;
 
--- a/libinterp/parse-tree/pt-idx.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-idx.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -265,7 +265,7 @@
               {
                 tmp = tmp.subsref (type.substr (tmpi, i-tmpi), tmpidx, true);
               }
-            catch (octave::index_exception& e)  // problems with range, invalid type etc.
+            catch (index_exception& e)  // problems with range, invalid type etc.
               {
                 final_index_error (e, expr);
               }
--- a/libinterp/parse-tree/pt-misc.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-misc.h	Mon Jun 26 09:05:37 2017 -0400
@@ -39,7 +39,7 @@
   // parameters in a function definition.  Elements are identifiers
   // only.
 
-  class tree_parameter_list : public octave::base_list<tree_decl_elt *>
+  class tree_parameter_list : public base_list<tree_decl_elt *>
   {
   public:
 
@@ -95,7 +95,7 @@
   // Return lists.  Used to hold the right hand sides of multiple
   // assignment expressions.
 
-  class tree_return_list : public octave::base_list<tree_index_expression *>
+  class tree_return_list : public base_list<tree_index_expression *>
   {
   public:
 
--- a/libinterp/parse-tree/pt-select.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-select.h	Mon Jun 26 09:05:37 2017 -0400
@@ -87,7 +87,7 @@
     octave_comment_list *lead_comm;
   };
 
-  class tree_if_command_list : public octave::base_list<tree_if_clause *>
+  class tree_if_command_list : public base_list<tree_if_clause *>
   {
   public:
 
@@ -210,7 +210,7 @@
     octave_comment_list *lead_comm;
   };
 
-  class tree_switch_case_list : public octave::base_list<tree_switch_case *>
+  class tree_switch_case_list : public base_list<tree_switch_case *>
   {
   public:
 
--- a/libinterp/parse-tree/pt-stmt.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-stmt.h	Mon Jun 26 09:05:37 2017 -0400
@@ -128,7 +128,7 @@
 
   // A list of statements to evaluate.
 
-  class tree_statement_list : public octave::base_list<tree_statement *>
+  class tree_statement_list : public base_list<tree_statement *>
   {
   public:
 
--- a/libinterp/parse-tree/pt-tm-const.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-tm-const.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -357,7 +357,7 @@
   template <>
   octave_value
   do_single_type_concat<octave_map> (const dim_vector& dv,
-                                     octave::tm_const& tmp)
+                                     tm_const& tmp)
   {
     octave_map result;
 
@@ -369,14 +369,14 @@
     return result;
   }
 
-  octave_value do_class_concat (octave::tm_const& tmc)
+  octave_value do_class_concat (tm_const& tmc)
   {
     octave_value retval;
 
     octave_value_list rows (tmc.length (), octave_value ());
 
     octave_idx_type j = 0;
-    for (octave::tm_row_const& tmrc : tmc)
+    for (tm_row_const& tmrc : tmc)
       {
         octave_quit ();
 
--- a/libinterp/parse-tree/pt-tm-const.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt-tm-const.h	Mon Jun 26 09:05:37 2017 -0400
@@ -55,7 +55,7 @@
   private:
 
     class
-    tm_row_const_rep : public octave::base_list<octave_value>
+    tm_row_const_rep : public base_list<octave_value>
     {
     public:
 
@@ -78,7 +78,7 @@
 
       ~tm_row_const_rep (void) = default;
 
-      octave::refcount<int> count;
+      refcount<int> count;
 
       dim_vector dv;
 
@@ -193,7 +193,7 @@
   };
 
   class
-  tm_const : public octave::base_list<tm_row_const>
+  tm_const : public base_list<tm_row_const>
   {
   public:
 
@@ -259,12 +259,12 @@
 
   template <typename TYPE, typename T>
   void
-  single_type_concat (Array<T>& result, octave::tm_const& tmp)
+  single_type_concat (Array<T>& result, tm_const& tmp)
   {
     octave_idx_type r = 0;
     octave_idx_type c = 0;
 
-    for (octave::tm_row_const& row : tmp)
+    for (tm_row_const& row : tmp)
       {
         // Skip empty arrays to allow looser rules.
         if (row.dims ().any_zero ())
@@ -294,7 +294,7 @@
   template <typename TYPE, typename T>
   void
   single_type_concat (Array<T>& result, const dim_vector& dv,
-                      octave::tm_const& tmp)
+                      tm_const& tmp)
   {
     if (dv.any_zero ())
       {
@@ -306,7 +306,7 @@
       {
         // If possible, forward the operation to liboctave.
         // Single row.
-        octave::tm_row_const& row = tmp.front ();
+        tm_row_const& row = tmp.front ();
         if (! (equal_types<T, char>::value || equal_types<T, octave_value>::value)
             && row.all_1x1_p ())
           {
@@ -343,7 +343,7 @@
   template <typename TYPE, typename T>
   void
   single_type_concat (Sparse<T>& result, const dim_vector& dv,
-                      octave::tm_const& tmp)
+                      tm_const& tmp)
   {
     if (dv.any_zero ())
       {
@@ -357,7 +357,7 @@
     octave_idx_type nrows = tmp.length ();
     octave_idx_type j = 0;
     OCTAVE_LOCAL_BUFFER (Sparse<T>, sparse_row_list, nrows);
-    for (octave::tm_row_const& row : tmp)
+    for (tm_row_const& row : tmp)
       {
         octave_idx_type ncols = row.length ();
         octave_idx_type i = 0;
@@ -382,7 +382,7 @@
   template <typename MAP>
   void
   single_type_concat (octave_map& result, const dim_vector& dv,
-                      octave::tm_const& tmp)
+                      tm_const& tmp)
   {
     if (dv.any_zero ())
       {
@@ -393,7 +393,7 @@
     octave_idx_type nrows = tmp.length ();
     octave_idx_type j = 0;
     OCTAVE_LOCAL_BUFFER (octave_map, map_row_list, nrows);
-    for (octave::tm_row_const& row : tmp)
+    for (tm_row_const& row : tmp)
       {
         octave_idx_type ncols = row.length ();
         octave_idx_type i = 0;
@@ -417,7 +417,7 @@
 
   template <typename TYPE>
   octave_value
-  do_single_type_concat (const dim_vector& dv, octave::tm_const& tmp)
+  do_single_type_concat (const dim_vector& dv, tm_const& tmp)
   {
     TYPE result;
 
@@ -429,9 +429,9 @@
   template <>
   octave_value
   do_single_type_concat<octave_map> (const dim_vector& dv,
-                                     octave::tm_const& tmp);
+                                     tm_const& tmp);
 
-  extern octave_value do_class_concat (octave::tm_const& tmc);
+  extern octave_value do_class_concat (tm_const& tmc);
 }
 
 #endif
--- a/libinterp/parse-tree/pt.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/libinterp/parse-tree/pt.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -67,7 +67,7 @@
       {
         int parse_status = 0;
 
-        octave::unwind_protect frame;
+        unwind_protect frame;
         frame.protect_var (buffer_error_messages);
         frame.protect_var (Vdebug_on_error);
         frame.protect_var (Vdebug_on_warning);
@@ -91,7 +91,7 @@
             else
               warning ("Error parsing breakpoint condition");
           }
-        catch (const octave::execution_exception& e)
+        catch (const execution_exception& e)
           {
             warning ("Error evaluating breakpoint condition:\n    %s",
                      last_error_message ().c_str ());
--- a/liboctave/numeric/aepbalance.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/aepbalance.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -50,7 +50,7 @@
       : balanced_mat (a), scale (), ilo (), ihi (),
         job (get_job (noperm, noscal))
     {
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT n = to_f77_int (a.cols ());
 
       if (a.rows () != n)
         (*current_liboctave_error_handler)
@@ -73,15 +73,15 @@
     Matrix
     aepbalance<Matrix>::balancing_matrix (void) const
     {
-      F77_INT n = octave::to_f77_int (balanced_mat.rows ());
+      F77_INT n = to_f77_int (balanced_mat.rows ());
 
       Matrix balancing_mat (n, n, 0.0);
       for (F77_INT i = 0; i < n; i++)
         balancing_mat.elem (i ,i) = 1.0;
 
       F77_INT info;
-      F77_INT t_ilo = octave::to_f77_int (ilo);
-      F77_INT t_ihi = octave::to_f77_int (ihi);
+      F77_INT t_ilo = to_f77_int (ilo);
+      F77_INT t_ihi = to_f77_int (ihi);
 
       char side = 'R';
 
@@ -101,7 +101,7 @@
       : balanced_mat (a), scale (), ilo (), ihi (),
         job (get_job (noperm, noscal))
     {
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT n = to_f77_int (a.cols ());
 
       if (a.rows () != n)
         (*current_liboctave_error_handler)
@@ -124,15 +124,15 @@
     FloatMatrix
     aepbalance<FloatMatrix>::balancing_matrix (void) const
     {
-      F77_INT n = octave::to_f77_int (balanced_mat.rows ());
+      F77_INT n = to_f77_int (balanced_mat.rows ());
 
       FloatMatrix balancing_mat (n, n, 0.0);
       for (F77_INT i = 0; i < n; i++)
         balancing_mat.elem (i ,i) = 1.0;
 
       F77_INT info;
-      F77_INT t_ilo = octave::to_f77_int (ilo);
-      F77_INT t_ihi = octave::to_f77_int (ihi);
+      F77_INT t_ilo = to_f77_int (ilo);
+      F77_INT t_ihi = to_f77_int (ihi);
 
       char side = 'R';
 
@@ -152,7 +152,7 @@
       : balanced_mat (a), scale (), ilo (), ihi (),
         job (get_job (noperm, noscal))
     {
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT n = to_f77_int (a.cols ());
 
       if (a.rows () != n)
         (*current_liboctave_error_handler)
@@ -175,15 +175,15 @@
     ComplexMatrix
     aepbalance<ComplexMatrix>::balancing_matrix (void) const
     {
-      F77_INT n = octave::to_f77_int (balanced_mat.rows ());
+      F77_INT n = to_f77_int (balanced_mat.rows ());
 
       ComplexMatrix balancing_mat (n, n, 0.0);
       for (F77_INT i = 0; i < n; i++)
         balancing_mat.elem (i, i) = 1.0;
 
       F77_INT info;
-      F77_INT t_ilo = octave::to_f77_int (ilo);
-      F77_INT t_ihi = octave::to_f77_int (ihi);
+      F77_INT t_ilo = to_f77_int (ilo);
+      F77_INT t_ihi = to_f77_int (ihi);
 
       char side = 'R';
 
@@ -204,7 +204,7 @@
       : balanced_mat (a), scale (), ilo (), ihi (),
         job (get_job (noperm, noscal))
     {
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT n = to_f77_int (a.cols ());
 
       if (a.rows () != n)
         (*current_liboctave_error_handler)
@@ -227,15 +227,15 @@
     FloatComplexMatrix
     aepbalance<FloatComplexMatrix>::balancing_matrix (void) const
     {
-      F77_INT n = octave::to_f77_int (balanced_mat.rows ());
+      F77_INT n = to_f77_int (balanced_mat.rows ());
 
       FloatComplexMatrix balancing_mat (n, n, 0.0);
       for (F77_INT i = 0; i < n; i++)
         balancing_mat.elem (i, i) = 1.0;
 
       F77_INT info;
-      F77_INT t_ilo = octave::to_f77_int (ilo);
-      F77_INT t_ihi = octave::to_f77_int (ihi);
+      F77_INT t_ilo = to_f77_int (ilo);
+      F77_INT t_ihi = to_f77_int (ihi);
 
       char side = 'R';
 
--- a/liboctave/numeric/chol.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/chol.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -333,7 +333,7 @@
 
       if (singular (chol_mat))
         info = 2;
-      else if (octave::math::imag (u(j)) != zero)
+      else if (math::imag (u(j)) != zero)
         info = 3;
       else
         {
@@ -345,7 +345,7 @@
                 if (l == j)
                   a1(k, l) = u(k);
                 else if (k == j)
-                  a1(k, l) = octave::math::conj (u(l));
+                  a1(k, l) = math::conj (u(l));
                 else
                   a1(k, l) = a(k < j ? k : k-1, l < j ? l : l-1);
               }
@@ -415,7 +415,7 @@
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("chol: requires square matrix");
 
-      F77_INT n = octave::to_f77_int (a_nc);
+      F77_INT n = to_f77_int (a_nc);
       F77_INT info;
 
       is_upper = upper;
@@ -484,7 +484,7 @@
     void
     chol<Matrix>::update (const ColumnVector& u)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
+      F77_INT n = to_f77_int (chol_mat.rows ());
 
       if (u.numel () != n)
         (*current_liboctave_error_handler) ("cholupdate: dimension mismatch");
@@ -503,7 +503,7 @@
     {
       F77_INT info = -1;
 
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
+      F77_INT n = to_f77_int (chol_mat.rows ());
 
       if (u.numel () != n)
         (*current_liboctave_error_handler) ("cholupdate: dimension mismatch");
@@ -524,8 +524,8 @@
     {
       F77_INT info = -1;
 
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT j = to_f77_int (j_arg);
 
       if (u.numel () != n + 1)
         (*current_liboctave_error_handler) ("cholinsert: dimension mismatch");
@@ -537,7 +537,7 @@
       OCTAVE_LOCAL_BUFFER (double, w, n);
 
       chol_mat.resize (n+1, n+1);
-      F77_INT ldcm = octave::to_f77_int (chol_mat.rows ());
+      F77_INT ldcm = to_f77_int (chol_mat.rows ());
 
       F77_XFCN (dchinx, DCHINX, (n, chol_mat.fortran_vec (), ldcm,
                                  j + 1, utmp.fortran_vec (), w, info));
@@ -549,8 +549,8 @@
     void
     chol<Matrix>::delete_sym (octave_idx_type j_arg)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT j = to_f77_int (j_arg);
 
       if (j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("choldelete: index out of range");
@@ -566,9 +566,9 @@
     void
     chol<Matrix>::shift_sym (octave_idx_type i_arg, octave_idx_type j_arg)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT i = octave::to_f77_int (i_arg);
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT i = to_f77_int (i_arg);
+      F77_INT j = to_f77_int (j_arg);
 
       if (i < 0 || i > n-1 || j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("cholshift: index out of range");
@@ -591,7 +591,7 @@
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("chol: requires square matrix");
 
-      F77_INT n = octave::to_f77_int (a_nc);
+      F77_INT n = to_f77_int (a_nc);
       F77_INT info;
 
       is_upper = upper;
@@ -660,7 +660,7 @@
     void
     chol<FloatMatrix>::update (const FloatColumnVector& u)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
+      F77_INT n = to_f77_int (chol_mat.rows ());
 
       if (u.numel () != n)
         (*current_liboctave_error_handler) ("cholupdate: dimension mismatch");
@@ -679,7 +679,7 @@
     {
       F77_INT info = -1;
 
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
+      F77_INT n = to_f77_int (chol_mat.rows ());
 
       if (u.numel () != n)
         (*current_liboctave_error_handler) ("cholupdate: dimension mismatch");
@@ -701,8 +701,8 @@
     {
       F77_INT info = -1;
 
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT j = to_f77_int (j_arg);
 
       if (u.numel () != n + 1)
         (*current_liboctave_error_handler) ("cholinsert: dimension mismatch");
@@ -714,7 +714,7 @@
       OCTAVE_LOCAL_BUFFER (float, w, n);
 
       chol_mat.resize (n+1, n+1);
-      F77_INT ldcm = octave::to_f77_int (chol_mat.rows ());
+      F77_INT ldcm = to_f77_int (chol_mat.rows ());
 
       F77_XFCN (schinx, SCHINX, (n, chol_mat.fortran_vec (), ldcm,
                                  j + 1, utmp.fortran_vec (), w, info));
@@ -726,8 +726,8 @@
     void
     chol<FloatMatrix>::delete_sym (octave_idx_type j_arg)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT j = to_f77_int (j_arg);
 
       if (j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("choldelete: index out of range");
@@ -744,9 +744,9 @@
     void
     chol<FloatMatrix>::shift_sym (octave_idx_type i_arg, octave_idx_type j_arg)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT i = octave::to_f77_int (i_arg);
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT i = to_f77_int (i_arg);
+      F77_INT j = to_f77_int (j_arg);
 
       if (i < 0 || i > n-1 || j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("cholshift: index out of range");
@@ -769,7 +769,7 @@
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("chol: requires square matrix");
 
-      F77_INT n = octave::to_f77_int (a_nc);
+      F77_INT n = to_f77_int (a_nc);
       F77_INT info;
 
       is_upper = upper;
@@ -837,7 +837,7 @@
     void
     chol<ComplexMatrix>::update (const ComplexColumnVector& u)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
+      F77_INT n = to_f77_int (chol_mat.rows ());
 
       if (u.numel () != n)
         (*current_liboctave_error_handler) ("cholupdate: dimension mismatch");
@@ -859,7 +859,7 @@
     {
       F77_INT info = -1;
 
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
+      F77_INT n = to_f77_int (chol_mat.rows ());
 
       if (u.numel () != n)
         (*current_liboctave_error_handler) ("cholupdate: dimension mismatch");
@@ -884,8 +884,8 @@
     {
       F77_INT info = -1;
 
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT j = to_f77_int (j_arg);
 
       if (u.numel () != n + 1)
         (*current_liboctave_error_handler) ("cholinsert: dimension mismatch");
@@ -897,7 +897,7 @@
       OCTAVE_LOCAL_BUFFER (double, rw, n);
 
       chol_mat.resize (n+1, n+1);
-      F77_INT ldcm = octave::to_f77_int (chol_mat.rows ());
+      F77_INT ldcm = to_f77_int (chol_mat.rows ());
 
       F77_XFCN (zchinx, ZCHINX, (n,
                                  F77_DBLE_CMPLX_ARG (chol_mat.fortran_vec ()),
@@ -912,8 +912,8 @@
     void
     chol<ComplexMatrix>::delete_sym (octave_idx_type j_arg)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT j = to_f77_int (j_arg);
 
       if (j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("choldelete: index out of range");
@@ -932,9 +932,9 @@
     chol<ComplexMatrix>::shift_sym (octave_idx_type i_arg,
                                     octave_idx_type j_arg)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT i = octave::to_f77_int (i_arg);
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT i = to_f77_int (i_arg);
+      F77_INT j = to_f77_int (j_arg);
 
       if (i < 0 || i > n-1 || j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("cholshift: index out of range");
@@ -961,7 +961,7 @@
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("chol: requires square matrix");
 
-      F77_INT n = octave::to_f77_int (a_nc);
+      F77_INT n = to_f77_int (a_nc);
       F77_INT info;
 
       is_upper = upper;
@@ -1029,7 +1029,7 @@
     void
     chol<FloatComplexMatrix>::update (const FloatComplexColumnVector& u)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
+      F77_INT n = to_f77_int (chol_mat.rows ());
 
       if (u.numel () != n)
         (*current_liboctave_error_handler) ("cholupdate: dimension mismatch");
@@ -1048,7 +1048,7 @@
     {
       F77_INT info = -1;
 
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
+      F77_INT n = to_f77_int (chol_mat.rows ());
 
       if (u.numel () != n)
         (*current_liboctave_error_handler) ("cholupdate: dimension mismatch");
@@ -1070,9 +1070,9 @@
                                           octave_idx_type j_arg)
     {
       F77_INT info = -1;
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
+      F77_INT n = to_f77_int (chol_mat.rows ());
 
       if (u.numel () != n + 1)
         (*current_liboctave_error_handler) ("cholinsert: dimension mismatch");
@@ -1084,7 +1084,7 @@
       OCTAVE_LOCAL_BUFFER (float, rw, n);
 
       chol_mat.resize (n+1, n+1);
-      F77_INT ldcm = octave::to_f77_int (chol_mat.rows ());
+      F77_INT ldcm = to_f77_int (chol_mat.rows ());
 
       F77_XFCN (cchinx, CCHINX, (n, F77_CMPLX_ARG (chol_mat.fortran_vec ()),
                                  ldcm, j + 1,
@@ -1098,8 +1098,8 @@
     void
     chol<FloatComplexMatrix>::delete_sym (octave_idx_type j_arg)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT j = to_f77_int (j_arg);
 
       if (j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("choldelete: index out of range");
@@ -1117,9 +1117,9 @@
     chol<FloatComplexMatrix>::shift_sym (octave_idx_type i_arg,
                                          octave_idx_type j_arg)
     {
-      F77_INT n = octave::to_f77_int (chol_mat.rows ());
-      F77_INT i = octave::to_f77_int (i_arg);
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT n = to_f77_int (chol_mat.rows ());
+      F77_INT i = to_f77_int (i_arg);
+      F77_INT j = to_f77_int (j_arg);
 
       if (i < 0 || i > n-1 || j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("cholshift: index out of range");
--- a/liboctave/numeric/gepbalance.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/gepbalance.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -44,14 +44,14 @@
     gepbalance<Matrix>::init (const Matrix& a, const Matrix& b,
                               const std::string& balance_job)
     {
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT n = to_f77_int (a.cols ());
 
       if (a.rows () != n)
         (*current_liboctave_error_handler)
           ("GEPBALANCE requires square matrix");
 
       if (a.dims () != b.dims ())
-        octave::err_nonconformant ("GEPBALANCE", n, n, b.rows(), b.cols());
+        err_nonconformant ("GEPBALANCE", n, n, b.rows(), b.cols());
 
       F77_INT info;
       F77_INT ilo;
@@ -109,14 +109,14 @@
     gepbalance<FloatMatrix>::init (const FloatMatrix& a, const FloatMatrix& b,
                                    const std::string& balance_job)
     {
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT n = to_f77_int (a.cols ());
 
       if (a.rows () != n)
         (*current_liboctave_error_handler)
           ("FloatGEPBALANCE requires square matrix");
 
       if (a.dims () != b.dims ())
-        octave::err_nonconformant ("FloatGEPBALANCE",
+        err_nonconformant ("FloatGEPBALANCE",
                                    n, n, b.rows(), b.cols());
 
       F77_INT info;
@@ -176,14 +176,14 @@
                                      const ComplexMatrix& b,
                                      const std::string& balance_job)
     {
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT n = to_f77_int (a.cols ());
 
       if (a.rows () != n)
         (*current_liboctave_error_handler)
           ("ComplexGEPBALANCE requires square matrix");
 
       if (a.dims () != b.dims ())
-        octave::err_nonconformant ("ComplexGEPBALANCE",
+        err_nonconformant ("ComplexGEPBALANCE",
                                    n, n, b.rows(), b.cols());
 
       F77_INT info;
@@ -244,7 +244,7 @@
                                           const FloatComplexMatrix& b,
                                           const std::string& balance_job)
     {
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT n = to_f77_int (a.cols ());
 
       if (a.rows () != n)
         {
@@ -254,7 +254,7 @@
         }
 
       if (a.dims () != b.dims ())
-        octave::err_nonconformant ("FloatComplexGEPBALANCE",
+        err_nonconformant ("FloatComplexGEPBALANCE",
                                    n, n, b.rows(), b.cols());
 
       F77_INT info;
--- a/liboctave/numeric/gsvd.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/gsvd.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -209,9 +209,9 @@
     {
       F77_INT info;
 
-      F77_INT m = octave::to_f77_int (a.rows ());
-      F77_INT n = octave::to_f77_int (a.cols ());
-      F77_INT p = octave::to_f77_int (b.rows ());
+      F77_INT m = to_f77_int (a.rows ());
+      F77_INT n = to_f77_int (a.cols ());
+      F77_INT p = to_f77_int (b.rows ());
 
       T atmp = a;
       P *tmp_dataA = atmp.fortran_vec ();
--- a/liboctave/numeric/hess.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/hess.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -41,8 +41,8 @@
     octave_idx_type
     hess<Matrix>::init (const Matrix& a)
    {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.cols ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.cols ());
 
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("hess: requires square matrix");
@@ -104,8 +104,8 @@
     octave_idx_type
     hess<FloatMatrix>::init (const FloatMatrix& a)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.cols ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.cols ());
 
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("hess: requires square matrix");
@@ -167,8 +167,8 @@
     octave_idx_type
     hess<ComplexMatrix>::init (const ComplexMatrix& a)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.cols ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.cols ());
 
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("hess: requires square matrix");
@@ -230,8 +230,8 @@
     octave_idx_type
     hess<FloatComplexMatrix>::init (const FloatComplexMatrix& a)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.cols ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.cols ());
 
       if (a_nr != a_nc)
         {
--- a/liboctave/numeric/lo-mappers.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/lo-mappers.h	Mon Jun 26 09:05:37 2017 -0400
@@ -39,20 +39,20 @@
   namespace math
   {
     extern OCTAVE_API bool isna (double x);
-    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isna' instead")
-    inline bool is_NA (double x) { return octave::math::isna (x); }
+    OCTAVE_DEPRECATED (4.4, "use 'math::isna' instead")
+    inline bool is_NA (double x) { return math::isna (x); }
 
     extern OCTAVE_API bool isna (float x);
-    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isna' instead")
-    inline bool is_NA (float x) { return octave::math::isna (x); }
+    OCTAVE_DEPRECATED (4.4, "use 'math::isna' instead")
+    inline bool is_NA (float x) { return math::isna (x); }
 
     extern OCTAVE_API bool isna (const Complex& x);
-    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isna' instead")
-    inline bool is_NA (const Complex& x) { return octave::math::isna (x); }
+    OCTAVE_DEPRECATED (4.4, "use 'math::isna' instead")
+    inline bool is_NA (const Complex& x) { return math::isna (x); }
 
     extern OCTAVE_API bool isna (const FloatComplex& x);
-    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isna' instead")
-    inline bool is_NA (const FloatComplex& x) { return octave::math::isna (x); }
+    OCTAVE_DEPRECATED (4.4, "use 'math::isna' instead")
+    inline bool is_NA (const FloatComplex& x) { return math::isna (x); }
 
     extern OCTAVE_API bool is_NaN_or_NA (const Complex& x);
     extern OCTAVE_API bool is_NaN_or_NA (const FloatComplex& x);
@@ -249,17 +249,17 @@
       return (isfinite (std::real (x)) && isfinite (std::imag (x)));
     }
 
-    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isfinite' instead")
-    inline bool finite (double x) { return octave::math::isfinite (x); }
-    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isfinite' instead")
-    inline bool finite (float x) { return octave::math::isfinite (x); }
+    OCTAVE_DEPRECATED (4.4, "use 'math::isfinite' instead")
+    inline bool finite (double x) { return math::isfinite (x); }
+    OCTAVE_DEPRECATED (4.4, "use 'math::isfinite' instead")
+    inline bool finite (float x) { return math::isfinite (x); }
 
     template <typename T>
-    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isfinite' instead")
+    OCTAVE_DEPRECATED (4.4, "use 'math::isfinite' instead")
     bool
     finite (const std::complex<T>& x)
     {
-      return octave::math::isfinite (x);
+      return math::isfinite (x);
     }
 
     inline bool isinf (double x) { return std::isinf (x); }
@@ -288,7 +288,7 @@
       else if (x > 0.0)
         tmp = 1.0;
 
-      return isnan (x) ? octave::numeric_limits<double>::NaN () : tmp;
+      return isnan (x) ? numeric_limits<double>::NaN () : tmp;
     }
 
     inline float
@@ -301,7 +301,7 @@
       else if (x > 0.0f)
         tmp = 1.0f;
 
-      return isnan (x) ? octave::numeric_limits<float>::NaN () : tmp;
+      return isnan (x) ? numeric_limits<float>::NaN () : tmp;
     }
 
     template <typename T>
@@ -382,7 +382,7 @@
       T retval;
 
       if (y == 0)
-        retval = octave::numeric_limits<T>::NaN ();
+        retval = numeric_limits<T>::NaN ();
       else
         {
           T q = x / y;
--- a/liboctave/numeric/lo-specfun.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/lo-specfun.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -64,12 +64,12 @@
     bessel_return_value (const Complex& val, octave_idx_type ierr)
     {
       static const Complex inf_val
-        = Complex (octave::numeric_limits<double>::Inf (),
-                   octave::numeric_limits<double>::Inf ());
+        = Complex (numeric_limits<double>::Inf (),
+                   numeric_limits<double>::Inf ());
 
       static const Complex nan_val
-        = Complex (octave::numeric_limits<double>::NaN (),
-                   octave::numeric_limits<double>::NaN ());
+        = Complex (numeric_limits<double>::NaN (),
+                   numeric_limits<double>::NaN ());
 
       Complex retval;
 
@@ -96,12 +96,12 @@
     bessel_return_value (const FloatComplex& val, octave_idx_type ierr)
     {
       static const FloatComplex inf_val
-        = FloatComplex (octave::numeric_limits<float>::Inf (),
-                        octave::numeric_limits<float>::Inf ());
+        = FloatComplex (numeric_limits<float>::Inf (),
+                        numeric_limits<float>::Inf ());
 
       static const FloatComplex nan_val
-        = FloatComplex (octave::numeric_limits<float>::NaN (),
-                        octave::numeric_limits<float>::NaN ());
+        = FloatComplex (numeric_limits<float>::NaN (),
+                        numeric_limits<float>::NaN ());
 
       FloatComplex retval;
 
@@ -342,8 +342,8 @@
               retval = bessel_return_value (tmp, ierr);
             }
           else
-            retval = Complex (octave::numeric_limits<double>::NaN (),
-                              octave::numeric_limits<double>::NaN ());
+            retval = Complex (numeric_limits<double>::NaN (),
+                              numeric_limits<double>::NaN ());
         }
 
       return retval;
@@ -370,7 +370,7 @@
 
           if (zr == 0.0 && zi == 0.0)
             {
-              yr = -octave::numeric_limits<double>::Inf ();
+              yr = -numeric_limits<double>::Inf ();
               yi = 0.0;
             }
           else
@@ -415,8 +415,8 @@
               retval = bessel_return_value (tmp, ierr);
             }
           else
-            retval = Complex (octave::numeric_limits<double>::NaN (),
-                              octave::numeric_limits<double>::NaN ());
+            retval = Complex (numeric_limits<double>::NaN (),
+                              numeric_limits<double>::NaN ());
         }
 
       return retval;
@@ -482,8 +482,8 @@
               retval = bessel_return_value (tmp, ierr);
             }
           else
-            retval = Complex (octave::numeric_limits<double>::NaN (),
-                              octave::numeric_limits<double>::NaN ());
+            retval = Complex (numeric_limits<double>::NaN (),
+                              numeric_limits<double>::NaN ());
         }
 
       return retval;
@@ -508,7 +508,7 @@
 
           if (zr == 0.0 && zi == 0.0)
             {
-              yr = octave::numeric_limits<double>::Inf ();
+              yr = numeric_limits<double>::Inf ();
               yi = 0.0;
             }
           else
@@ -962,8 +962,8 @@
               retval = bessel_return_value (tmp, ierr);
             }
           else
-            retval = FloatComplex (octave::numeric_limits<float>::NaN (),
-                                   octave::numeric_limits<float>::NaN ());
+            retval = FloatComplex (numeric_limits<float>::NaN (),
+                                   numeric_limits<float>::NaN ());
         }
 
       return retval;
@@ -986,7 +986,7 @@
 
           if (z.real () == 0.0 && z.imag () == 0.0)
             {
-              y = FloatComplex (-octave::numeric_limits<float>::Inf (), 0.0);
+              y = FloatComplex (-numeric_limits<float>::Inf (), 0.0);
             }
           else
             {
@@ -1032,8 +1032,8 @@
               retval = bessel_return_value (tmp, ierr);
             }
           else
-            retval = FloatComplex (octave::numeric_limits<float>::NaN (),
-                                   octave::numeric_limits<float>::NaN ());
+            retval = FloatComplex (numeric_limits<float>::NaN (),
+                                   numeric_limits<float>::NaN ());
         }
 
       return retval;
@@ -1089,8 +1089,8 @@
               retval = bessel_return_value (tmp, ierr);
             }
           else
-            retval = FloatComplex (octave::numeric_limits<float>::NaN (),
-                                   octave::numeric_limits<float>::NaN ());
+            retval = FloatComplex (numeric_limits<float>::NaN (),
+                                   numeric_limits<float>::NaN ());
         }
 
       return retval;
@@ -1111,7 +1111,7 @@
 
           if (z.real () == 0.0 && z.imag () == 0.0)
             {
-              y = FloatComplex (octave::numeric_limits<float>::Inf (), 0.0);
+              y = FloatComplex (numeric_limits<float>::Inf (), 0.0);
             }
           else
             {
@@ -2600,11 +2600,11 @@
             y = -y;
         }
       else if (x == 0.0)
-        return octave::numeric_limits<double>::Inf ();
+        return numeric_limits<double>::Inf ();
       else if (x == 2.0)
-        return -octave::numeric_limits<double>::Inf ();
+        return -numeric_limits<double>::Inf ();
       else
-        return octave::numeric_limits<double>::NaN ();
+        return numeric_limits<double>::NaN ();
 
       if (refine)
         {
@@ -2718,12 +2718,12 @@
           const double q = std::sqrt (-2*std::log (0.5*(1-ax)));
           const double yn = ((((c[0]*q + c[1])*q + c[2])*q + c[3])*q + c[4])*q + c[5];
           const double yd = (((d[0]*q + d[1])*q + d[2])*q + d[3])*q + 1.0;
-          y = yn / yd * octave::math::signum (-x);
+          y = yn / yd * math::signum (-x);
         }
       else if (ax == 1.0)
-        return octave::numeric_limits<double>::Inf () * octave::math::signum (x);
+        return numeric_limits<double>::Inf () * math::signum (x);
       else
-        return octave::numeric_limits<double>::NaN ();
+        return numeric_limits<double>::NaN ();
 
       if (refine)
         {
@@ -2792,14 +2792,14 @@
       // Matlab does not have -0.
 
       if (x == 0)
-        result = (octave::math::negative_sign (x)
-                  ? -octave::numeric_limits<double>::Inf ()
-                  : octave::numeric_limits<double>::Inf ());
-      else if ((x < 0 && octave::math::x_nint (x) == x)
-               || octave::math::isinf (x))
-        result = octave::numeric_limits<double>::Inf ();
-      else if (octave::math::isnan (x))
-        result = octave::numeric_limits<double>::NaN ();
+        result = (math::negative_sign (x)
+                  ? -numeric_limits<double>::Inf ()
+                  : numeric_limits<double>::Inf ());
+      else if ((x < 0 && math::x_nint (x) == x)
+               || math::isinf (x))
+        result = numeric_limits<double>::Inf ();
+      else if (math::isnan (x))
+        result = numeric_limits<double>::NaN ();
       else
         result = std::tgamma (x);
 
@@ -2815,14 +2815,14 @@
       // Matlab does not have -0.
 
       if (x == 0)
-        result = (octave::math::negative_sign (x)
-                  ? -octave::numeric_limits<float>::Inf ()
-                  : octave::numeric_limits<float>::Inf ());
-      else if ((x < 0 && octave::math::x_nint (x) == x)
-               || octave::math::isinf (x))
-        result = octave::numeric_limits<float>::Inf ();
-      else if (octave::math::isnan (x))
-        result = octave::numeric_limits<float>::NaN ();
+        result = (math::negative_sign (x)
+                  ? -numeric_limits<float>::Inf ()
+                  : numeric_limits<float>::Inf ());
+      else if ((x < 0 && math::x_nint (x) == x)
+               || math::isinf (x))
+        result = numeric_limits<float>::Inf ();
+      else if (math::isnan (x))
+        result = numeric_limits<float>::NaN ();
       else
         result = std::tgammaf (x);
 
@@ -3252,14 +3252,14 @@
       static const double euler_mascheroni =
         0.577215664901532860606512090082402431042;
 
-      const bool is_int = (octave::math::floor (z) == z);
+      const bool is_int = (math::floor (z) == z);
 
       T p = 0;
       if (z <= 0)
         {
           // limits - zeros of the gamma function
           if (is_int)
-            p = -octave::numeric_limits<T>::Inf (); // Matlab returns -Inf for psi (0)
+            p = -numeric_limits<T>::Inf (); // Matlab returns -Inf for psi (0)
           else
             // Abramowitz and Stegun, page 259, eq 6.3.7
             p = psi (1 - z) - (pi / tan (pi * z));
@@ -3271,7 +3271,7 @@
           for (octave_idx_type k = z - 1; k > 0; k--)
             p += 1.0 / k;
         }
-      else if (octave::math::floor (z + 0.5) == z + 0.5)
+      else if (math::floor (z + 0.5) == z + 0.5)
         {
           // Abramowitz and Stegun, page 258, eq 6.3.3 and 6.3.4
           for (octave_idx_type k = z; k > 0; k--)
@@ -3360,7 +3360,7 @@
     fortran_psifn<double> (double z, octave_idx_type n_arg,
                            double& ans, octave_idx_type& ierr)
     {
-      F77_INT n = octave::to_f77_int (n_arg);
+      F77_INT n = to_f77_int (n_arg);
       F77_INT flag = 0;
       F77_INT t_ierr;
       F77_XFCN (dpsifn, DPSIFN, (z, n, 1, 1, ans, flag, t_ierr));
@@ -3372,7 +3372,7 @@
     fortran_psifn<float> (float z, octave_idx_type n_arg,
                           float& ans, octave_idx_type& ierr)
     {
-      F77_INT n = octave::to_f77_int (n_arg);
+      F77_INT n = to_f77_int (n_arg);
       F77_INT flag = 0;
       F77_INT t_ierr;
       F77_XFCN (psifn, PSIFN, (z, n, 1, 1, ans, flag, t_ierr));
@@ -3399,9 +3399,9 @@
             ans = -ans;
         }
       else if (ierr == 2)
-        ans = - octave::numeric_limits<T>::Inf ();
+        ans = - numeric_limits<T>::Inf ();
       else // we probably never get here
-        ans = octave::numeric_limits<T>::NaN ();
+        ans = numeric_limits<T>::NaN ();
 
       return ans;
     }
--- a/liboctave/numeric/lu.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/lu.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -255,8 +255,8 @@
     template <>
     lu<Matrix>::lu (const Matrix& a)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.columns ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.columns ());
       F77_INT mn = (a_nr < a_nc ? a_nr : a_nc);
 
       ipvt.resize (dim_vector (mn, 1));
@@ -285,12 +285,12 @@
       Matrix& l = l_fact;
       Matrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -311,15 +311,15 @@
       Matrix& l = l_fact;
       Matrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nr = octave::to_f77_int (u.rows ());
-      F77_INT u_nc = octave::to_f77_int (u.columns ());
+      F77_INT u_nr = to_f77_int (u.rows ());
+      F77_INT u_nc = to_f77_int (u.columns ());
 
-      F77_INT v_nr = octave::to_f77_int (v.rows ());
-      F77_INT v_nc = octave::to_f77_int (v.columns ());
+      F77_INT v_nr = to_f77_int (v.rows ());
+      F77_INT v_nc = to_f77_int (v.columns ());
 
       if (u_nr != m || v_nr != n || u_nc != v_nc)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -344,12 +344,12 @@
       Matrix& l = l_fact;
       Matrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -375,15 +375,15 @@
       Matrix& l = l_fact;
       Matrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nr = octave::to_f77_int (u.rows ());
-      F77_INT u_nc = octave::to_f77_int (u.columns ());
+      F77_INT u_nr = to_f77_int (u.rows ());
+      F77_INT u_nc = to_f77_int (u.columns ());
 
-      F77_INT v_nr = octave::to_f77_int (v.rows ());
-      F77_INT v_nc = octave::to_f77_int (v.columns ());
+      F77_INT v_nr = to_f77_int (v.rows ());
+      F77_INT v_nc = to_f77_int (v.columns ());
 
       if (u_nr != m || v_nr != n || u_nc != v_nc)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -407,8 +407,8 @@
     template <>
     lu<FloatMatrix>::lu (const FloatMatrix& a)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.columns ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.columns ());
       F77_INT mn = (a_nr < a_nc ? a_nr : a_nc);
 
       ipvt.resize (dim_vector (mn, 1));
@@ -438,12 +438,12 @@
       FloatMatrix& l = l_fact;
       FloatMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -465,15 +465,15 @@
       FloatMatrix& l = l_fact;
       FloatMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nr = octave::to_f77_int (u.rows ());
-      F77_INT u_nc = octave::to_f77_int (u.columns ());
+      F77_INT u_nr = to_f77_int (u.rows ());
+      F77_INT u_nc = to_f77_int (u.columns ());
 
-      F77_INT v_nr = octave::to_f77_int (v.rows ());
-      F77_INT v_nc = octave::to_f77_int (v.columns ());
+      F77_INT v_nr = to_f77_int (v.rows ());
+      F77_INT v_nc = to_f77_int (v.columns ());
 
       if (u_nr != m || v_nr != n || u_nc != v_nc)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -499,12 +499,12 @@
       FloatMatrix& l = l_fact;
       FloatMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -530,15 +530,15 @@
       FloatMatrix& l = l_fact;
       FloatMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nr = octave::to_f77_int (u.rows ());
-      F77_INT u_nc = octave::to_f77_int (u.columns ());
+      F77_INT u_nr = to_f77_int (u.rows ());
+      F77_INT u_nc = to_f77_int (u.columns ());
 
-      F77_INT v_nr = octave::to_f77_int (v.rows ());
-      F77_INT v_nc = octave::to_f77_int (v.columns ());
+      F77_INT v_nr = to_f77_int (v.rows ());
+      F77_INT v_nc = to_f77_int (v.columns ());
 
       if (u_nr != m || v_nr != n || u_nc != v_nc)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -562,8 +562,8 @@
     template <>
     lu<ComplexMatrix>::lu (const ComplexMatrix& a)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.columns ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.columns ());
       F77_INT mn = (a_nr < a_nc ? a_nr : a_nc);
 
       ipvt.resize (dim_vector (mn, 1));
@@ -594,12 +594,12 @@
       ComplexMatrix& l = l_fact;
       ComplexMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -622,15 +622,15 @@
       ComplexMatrix& l = l_fact;
       ComplexMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nr = octave::to_f77_int (u.rows ());
-      F77_INT u_nc = octave::to_f77_int (u.columns ());
+      F77_INT u_nr = to_f77_int (u.rows ());
+      F77_INT u_nc = to_f77_int (u.columns ());
 
-      F77_INT v_nr = octave::to_f77_int (v.rows ());
-      F77_INT v_nc = octave::to_f77_int (v.columns ());
+      F77_INT v_nr = to_f77_int (v.rows ());
+      F77_INT v_nc = to_f77_int (v.columns ());
 
       if (u_nr != m || v_nr != n || u_nc != v_nc)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -659,12 +659,12 @@
       ComplexMatrix& l = l_fact;
       ComplexMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -693,15 +693,15 @@
       ComplexMatrix& l = l_fact;
       ComplexMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nr = octave::to_f77_int (u.rows ());
-      F77_INT u_nc = octave::to_f77_int (u.columns ());
+      F77_INT u_nr = to_f77_int (u.rows ());
+      F77_INT u_nc = to_f77_int (u.columns ());
 
-      F77_INT v_nr = octave::to_f77_int (v.rows ());
-      F77_INT v_nc = octave::to_f77_int (v.columns ());
+      F77_INT v_nr = to_f77_int (v.rows ());
+      F77_INT v_nc = to_f77_int (v.columns ());
 
       if (u_nr != m || v_nr != n || u_nc != v_nc)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -729,8 +729,8 @@
     template <>
     lu<FloatComplexMatrix>::lu (const FloatComplexMatrix& a)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.columns ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.columns ());
       F77_INT mn = (a_nr < a_nc ? a_nr : a_nc);
 
       ipvt.resize (dim_vector (mn, 1));
@@ -761,12 +761,12 @@
       FloatComplexMatrix& l = l_fact;
       FloatComplexMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -790,15 +790,15 @@
       FloatComplexMatrix& l = l_fact;
       FloatComplexMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nr = octave::to_f77_int (u.rows ());
-      F77_INT u_nc = octave::to_f77_int (u.columns ());
+      F77_INT u_nr = to_f77_int (u.rows ());
+      F77_INT u_nc = to_f77_int (u.columns ());
 
-      F77_INT v_nr = octave::to_f77_int (v.rows ());
-      F77_INT v_nc = octave::to_f77_int (v.columns ());
+      F77_INT v_nr = to_f77_int (v.rows ());
+      F77_INT v_nc = to_f77_int (v.columns ());
 
       if (u_nr != m || v_nr != n || u_nc != v_nc)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -825,12 +825,12 @@
       FloatComplexMatrix& l = l_fact;
       FloatComplexMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
@@ -859,15 +859,15 @@
       FloatComplexMatrix& l = l_fact;
       FloatComplexMatrix& r = a_fact;
 
-      F77_INT m = octave::to_f77_int (l.rows ());
-      F77_INT n = octave::to_f77_int (r.columns ());
-      F77_INT k = octave::to_f77_int (l.columns ());
+      F77_INT m = to_f77_int (l.rows ());
+      F77_INT n = to_f77_int (r.columns ());
+      F77_INT k = to_f77_int (l.columns ());
 
-      F77_INT u_nr = octave::to_f77_int (u.rows ());
-      F77_INT u_nc = octave::to_f77_int (u.columns ());
+      F77_INT u_nr = to_f77_int (u.rows ());
+      F77_INT u_nc = to_f77_int (u.columns ());
 
-      F77_INT v_nr = octave::to_f77_int (v.rows ());
-      F77_INT v_nc = octave::to_f77_int (v.columns ());
+      F77_INT v_nr = to_f77_int (v.rows ());
+      F77_INT v_nc = to_f77_int (v.columns ());
 
       if (u_nr != m || v_nr != n || u_nc != v_nc)
         (*current_liboctave_error_handler) ("luupdate: dimensions mismatch");
--- a/liboctave/numeric/qr.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/qr.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -240,7 +240,7 @@
       if (j < 0 || j > n)
         (*current_liboctave_error_handler) ("qrinsert: index out of range");
 
-      init (octave::math::insert_col (q*r, j, u), get_type ());
+      init (math::insert_col (q*r, j, u), get_type ());
     }
 
     template <typename T>
@@ -272,7 +272,7 @@
         {
           T a = q*r;
           for (octave_idx_type i = 0; i < nj; i++)
-            a = octave::math::insert_col (a, js(i), u.column (i));
+            a = math::insert_col (a, js(i), u.column (i));
 
           init (a, get_type ());
         }
@@ -289,7 +289,7 @@
       if (j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("qrdelete: index out of range");
 
-      init (octave::math::delete_col (q*r, j), get_type ());
+      init (math::delete_col (q*r, j), get_type ());
     }
 
     template <typename T>
@@ -317,7 +317,7 @@
         {
           T a = q*r;
           for (octave_idx_type i = 0; i < nj; i++)
-            a = octave::math::delete_col (a, js(i));
+            a = math::delete_col (a, js(i));
 
           init (a, get_type ());
         }
@@ -338,7 +338,7 @@
       if (j < 0 || j > m)
         (*current_liboctave_error_handler) ("qrinsert: index out of range");
 
-      init (octave::math::insert_row (q*r, j, u), get_type ());
+      init (math::insert_row (q*r, j, u), get_type ());
     }
 
     template <typename T>
@@ -355,7 +355,7 @@
       if (j < 0 || j > m-1)
         (*current_liboctave_error_handler) ("qrdelete: index out of range");
 
-      init (octave::math::delete_row (q*r, j), get_type ());
+      init (math::delete_row (q*r, j), get_type ());
     }
 
     template <typename T>
@@ -369,7 +369,7 @@
       if (i < 0 || i > n-1 || j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("qrshift: index out of range");
 
-      init (octave::math::shift_cols (q*r, i, j), get_type ());
+      init (math::shift_cols (q*r, i, j), get_type ());
     }
 
 #endif
@@ -381,8 +381,8 @@
     qr<Matrix>::form (octave_idx_type n_arg, Matrix& afact, double *tau,
                       type qr_type)
     {
-      F77_INT n = octave::to_f77_int (n_arg);
-      F77_INT m = octave::to_f77_int (afact.rows ());
+      F77_INT n = to_f77_int (n_arg);
+      F77_INT m = to_f77_int (afact.rows ());
       F77_INT min_mn = std::min (m, n);
       F77_INT info;
 
@@ -431,7 +431,7 @@
 
           if (m > 0)
             {
-              F77_INT k = octave::to_f77_int (q.cols ());
+              F77_INT k = to_f77_int (q.cols ());
               // workspace query.
               double rlwork;
               F77_XFCN (dorgqr, DORGQR, (m, k, min_mn, q.fortran_vec (), m,
@@ -451,8 +451,8 @@
     void
     qr<Matrix>::init (const Matrix& a, type qr_type)
     {
-      F77_INT m = octave::to_f77_int (a.rows ());
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT m = to_f77_int (a.rows ());
+      F77_INT n = to_f77_int (a.cols ());
 
       F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (double, tau, min_mn);
@@ -487,12 +487,12 @@
     void
     qr<Matrix>::update (const ColumnVector& u, const ColumnVector& v)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
@@ -509,15 +509,15 @@
     void
     qr<Matrix>::update (const Matrix& u, const Matrix& v)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_rows = octave::to_f77_int (u.rows ());
-      F77_INT u_cols = octave::to_f77_int (u.cols ());
+      F77_INT u_rows = to_f77_int (u.rows ());
+      F77_INT u_cols = to_f77_int (u.cols ());
 
-      F77_INT v_rows = octave::to_f77_int (v.rows ());
-      F77_INT v_cols = octave::to_f77_int (v.cols ());
+      F77_INT v_rows = to_f77_int (v.rows ());
+      F77_INT v_cols = to_f77_int (v.cols ());
 
       if (u_rows != m || v_rows != n || u_cols != v_cols)
         (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
@@ -537,13 +537,13 @@
     void
     qr<Matrix>::insert_col (const ColumnVector& u, octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
 
       if (u_nel != m)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
@@ -559,8 +559,8 @@
       else
         r.resize (k, n+1);
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       ColumnVector utmp = u;
       OCTAVE_LOCAL_BUFFER (double, w, k);
@@ -573,13 +573,13 @@
     void
     qr<Matrix>::insert_col (const Matrix& u, const Array<octave_idx_type>& j)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
       Array<octave_idx_type> jsi;
       Array<octave_idx_type> js = j.sort (jsi, 0, ASCENDING);
-      F77_INT nj = octave::to_f77_int (js.numel ());
+      F77_INT nj = to_f77_int (js.numel ());
       bool dups = false;
       for (F77_INT i = 0; i < nj - 1; i++)
         dups = dups && js(i) == js(i+1);
@@ -587,14 +587,14 @@
       if (dups)
         (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT u_cols = octave::to_f77_int (u.cols ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT u_cols = to_f77_int (u.cols ());
 
       if (u_nel != m || u_cols != nj)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
 
-      F77_INT js_beg = octave::to_f77_int (js(0));
-      F77_INT js_end = octave::to_f77_int (js(nj-1));
+      F77_INT js_beg = to_f77_int (js(0));
+      F77_INT js_end = to_f77_int (js(nj-1));
 
       if (nj > 0 && (js_beg < 0 || js_end > n))
         (*current_liboctave_error_handler) ("qrinsert: index out of range");
@@ -610,15 +610,15 @@
           else
             r.resize (k, n + nj);
 
-          F77_INT ldq = octave::to_f77_int (q.rows ());
-          F77_INT ldr = octave::to_f77_int (r.rows ());
+          F77_INT ldq = to_f77_int (q.rows ());
+          F77_INT ldr = to_f77_int (r.rows ());
 
           OCTAVE_LOCAL_BUFFER (double, w, kmax);
           for (volatile F77_INT i = 0; i < nj; i++)
             {
               F77_INT ii = i;
               ColumnVector utmp = u.column (jsi(i));
-              F77_INT js_elt = octave::to_f77_int (js(ii));
+              F77_INT js_elt = to_f77_int (js(ii));
               F77_XFCN (dqrinc, DQRINC, (m, n + ii, std::min (kmax, k + ii),
                                          q.fortran_vec (), ldq,
                                          r.fortran_vec (), ldr, js_elt + 1,
@@ -631,17 +631,17 @@
     void
     qr<Matrix>::delete_col (octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT k = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT k = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("qrdelete: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (double, w, k);
       F77_XFCN (dqrdec, DQRDEC, (m, n, k, q.fortran_vec (), ldq,
@@ -660,13 +660,13 @@
     void
     qr<Matrix>::delete_col (const Array<octave_idx_type>& j)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
       Array<octave_idx_type> jsi;
       Array<octave_idx_type> js = j.sort (jsi, 0, DESCENDING);
-      F77_INT nj = octave::to_f77_int (js.numel ());
+      F77_INT nj = to_f77_int (js.numel ());
       bool dups = false;
       for (F77_INT i = 0; i < nj - 1; i++)
         dups = dups && js(i) == js(i+1);
@@ -674,22 +674,22 @@
       if (dups)
         (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
 
-      F77_INT js_beg = octave::to_f77_int (js(0));
-      F77_INT js_end = octave::to_f77_int (js(nj-1));
+      F77_INT js_beg = to_f77_int (js(0));
+      F77_INT js_end = to_f77_int (js(nj-1));
 
       if (nj > 0 && (js_beg > n-1 || js_end < 0))
         (*current_liboctave_error_handler) ("qrinsert: index out of range");
 
       if (nj > 0)
         {
-          F77_INT ldq = octave::to_f77_int (q.rows ());
-          F77_INT ldr = octave::to_f77_int (r.rows ());
+          F77_INT ldq = to_f77_int (q.rows ());
+          F77_INT ldr = to_f77_int (r.rows ());
 
           OCTAVE_LOCAL_BUFFER (double, w, k);
           for (volatile F77_INT i = 0; i < nj; i++)
             {
               F77_INT ii = i;
-              F77_INT js_elt = octave::to_f77_int (js(ii));
+              F77_INT js_elt = to_f77_int (js(ii));
               F77_XFCN (dqrdec, DQRDEC, (m, n - ii, (k == m ? k : k - ii),
                                          q.fortran_vec (), ldq,
                                          r.fortran_vec (), ldr,
@@ -710,13 +710,13 @@
     void
     qr<Matrix>::insert_row (const RowVector& u, octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
       F77_INT k = std::min (m, n);
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
 
       if (! q.issquare () || u_nel != n)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
@@ -727,8 +727,8 @@
       q.resize (m + 1, m + 1);
       r.resize (m + 1, n);
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       RowVector utmp = u;
       OCTAVE_LOCAL_BUFFER (double, w, k);
@@ -742,10 +742,10 @@
     void
     qr<Matrix>::delete_row (octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (! q.issquare ())
         (*current_liboctave_error_handler) ("qrdelete: dimensions mismatch");
@@ -753,8 +753,8 @@
       if (j < 0 || j > m-1)
         (*current_liboctave_error_handler) ("qrdelete: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (double, w, 2*m);
       F77_XFCN (dqrder, DQRDER, (m, n, q.fortran_vec (), ldq,
@@ -768,18 +768,18 @@
     void
     qr<Matrix>::shift_cols (octave_idx_type i_arg, octave_idx_type j_arg)
     {
-      F77_INT i = octave::to_f77_int (i_arg);
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT i = to_f77_int (i_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT k = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT k = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (i < 0 || i > n-1 || j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("qrshift: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (double, w, 2*k);
       F77_XFCN (dqrshc, DQRSHC, (m, n, k,
@@ -795,8 +795,8 @@
     qr<FloatMatrix>::form (octave_idx_type n_arg, FloatMatrix& afact,
                            float *tau, type qr_type)
     {
-      F77_INT n = octave::to_f77_int (n_arg);
-      F77_INT m = octave::to_f77_int (afact.rows ());
+      F77_INT n = to_f77_int (n_arg);
+      F77_INT m = to_f77_int (afact.rows ());
       F77_INT min_mn = std::min (m, n);
       F77_INT info;
 
@@ -845,7 +845,7 @@
 
           if (m > 0)
             {
-              F77_INT k = octave::to_f77_int (q.cols ());
+              F77_INT k = to_f77_int (q.cols ());
               // workspace query.
               float rlwork;
               F77_XFCN (sorgqr, SORGQR, (m, k, min_mn, q.fortran_vec (), m,
@@ -865,8 +865,8 @@
     void
     qr<FloatMatrix>::init (const FloatMatrix& a, type qr_type)
     {
-      F77_INT m = octave::to_f77_int (a.rows ());
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT m = to_f77_int (a.rows ());
+      F77_INT n = to_f77_int (a.cols ());
 
       F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (float, tau, min_mn);
@@ -901,12 +901,12 @@
     void
     qr<FloatMatrix>::update (const FloatColumnVector& u, const FloatColumnVector& v)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
@@ -923,15 +923,15 @@
     void
     qr<FloatMatrix>::update (const FloatMatrix& u, const FloatMatrix& v)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_rows = octave::to_f77_int (u.rows ());
-      F77_INT u_cols = octave::to_f77_int (u.cols ());
+      F77_INT u_rows = to_f77_int (u.rows ());
+      F77_INT u_cols = to_f77_int (u.cols ());
 
-      F77_INT v_rows = octave::to_f77_int (v.rows ());
-      F77_INT v_cols = octave::to_f77_int (v.cols ());
+      F77_INT v_rows = to_f77_int (v.rows ());
+      F77_INT v_cols = to_f77_int (v.cols ());
 
       if (u_rows != m || v_rows != n || u_cols != v_cols)
         (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
@@ -952,13 +952,13 @@
     qr<FloatMatrix>::insert_col (const FloatColumnVector& u,
                                  octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
 
       if (u_nel != m)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
@@ -974,8 +974,8 @@
       else
         r.resize (k, n+1);
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       FloatColumnVector utmp = u;
       OCTAVE_LOCAL_BUFFER (float, w, k);
@@ -989,13 +989,13 @@
     qr<FloatMatrix>::insert_col (const FloatMatrix& u,
                                  const Array<octave_idx_type>& j)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
       Array<octave_idx_type> jsi;
       Array<octave_idx_type> js = j.sort (jsi, 0, ASCENDING);
-      F77_INT nj = octave::to_f77_int (js.numel ());
+      F77_INT nj = to_f77_int (js.numel ());
       bool dups = false;
       for (F77_INT i = 0; i < nj - 1; i++)
         dups = dups && js(i) == js(i+1);
@@ -1003,14 +1003,14 @@
       if (dups)
         (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT u_cols = octave::to_f77_int (u.cols ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT u_cols = to_f77_int (u.cols ());
 
       if (u_nel != m || u_cols != nj)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
 
-      F77_INT js_beg = octave::to_f77_int (js(0));
-      F77_INT js_end = octave::to_f77_int (js(nj-1));
+      F77_INT js_beg = to_f77_int (js(0));
+      F77_INT js_end = to_f77_int (js(nj-1));
 
       if (nj > 0 && (js_beg < 0 || js_end > n))
         (*current_liboctave_error_handler) ("qrinsert: index out of range");
@@ -1026,15 +1026,15 @@
           else
             r.resize (k, n + nj);
 
-          F77_INT ldq = octave::to_f77_int (q.rows ());
-          F77_INT ldr = octave::to_f77_int (r.rows ());
+          F77_INT ldq = to_f77_int (q.rows ());
+          F77_INT ldr = to_f77_int (r.rows ());
 
           OCTAVE_LOCAL_BUFFER (float, w, kmax);
           for (volatile F77_INT i = 0; i < nj; i++)
             {
               F77_INT ii = i;
               FloatColumnVector utmp = u.column (jsi(i));
-              F77_INT js_elt = octave::to_f77_int (js(ii));
+              F77_INT js_elt = to_f77_int (js(ii));
               F77_XFCN (sqrinc, SQRINC, (m, n + ii, std::min (kmax, k + ii),
                                          q.fortran_vec (), ldq,
                                          r.fortran_vec (), ldr, js_elt + 1,
@@ -1047,17 +1047,17 @@
     void
     qr<FloatMatrix>::delete_col (octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT k = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT k = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("qrdelete: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (float, w, k);
       F77_XFCN (sqrdec, SQRDEC, (m, n, k, q.fortran_vec (), ldq,
@@ -1076,13 +1076,13 @@
     void
     qr<FloatMatrix>::delete_col (const Array<octave_idx_type>& j)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
       Array<octave_idx_type> jsi;
       Array<octave_idx_type> js = j.sort (jsi, 0, DESCENDING);
-      F77_INT nj = octave::to_f77_int (js.numel ());
+      F77_INT nj = to_f77_int (js.numel ());
       bool dups = false;
       for (F77_INT i = 0; i < nj - 1; i++)
         dups = dups && js(i) == js(i+1);
@@ -1090,22 +1090,22 @@
       if (dups)
         (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
 
-      F77_INT js_beg = octave::to_f77_int (js(0));
-      F77_INT js_end = octave::to_f77_int (js(nj-1));
+      F77_INT js_beg = to_f77_int (js(0));
+      F77_INT js_end = to_f77_int (js(nj-1));
 
       if (nj > 0 && (js_beg > n-1 || js_end < 0))
         (*current_liboctave_error_handler) ("qrinsert: index out of range");
 
       if (nj > 0)
         {
-          F77_INT ldq = octave::to_f77_int (q.rows ());
-          F77_INT ldr = octave::to_f77_int (r.rows ());
+          F77_INT ldq = to_f77_int (q.rows ());
+          F77_INT ldr = to_f77_int (r.rows ());
 
           OCTAVE_LOCAL_BUFFER (float, w, k);
           for (volatile F77_INT i = 0; i < nj; i++)
             {
               F77_INT ii = i;
-              F77_INT js_elt = octave::to_f77_int (js(ii));
+              F77_INT js_elt = to_f77_int (js(ii));
               F77_XFCN (sqrdec, SQRDEC, (m, n - ii, (k == m ? k : k - ii),
                                          q.fortran_vec (), ldq,
                                          r.fortran_vec (), ldr,
@@ -1127,13 +1127,13 @@
     qr<FloatMatrix>::insert_row (const FloatRowVector& u,
                                  octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
       F77_INT k = std::min (m, n);
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
 
       if (! q.issquare () || u_nel != n)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
@@ -1144,8 +1144,8 @@
       q.resize (m + 1, m + 1);
       r.resize (m + 1, n);
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       FloatRowVector utmp = u;
       OCTAVE_LOCAL_BUFFER (float, w, k);
@@ -1159,10 +1159,10 @@
     void
     qr<FloatMatrix>::delete_row (octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (! q.issquare ())
         (*current_liboctave_error_handler) ("qrdelete: dimensions mismatch");
@@ -1170,8 +1170,8 @@
       if (j < 0 || j > m-1)
         (*current_liboctave_error_handler) ("qrdelete: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (float, w, 2*m);
       F77_XFCN (sqrder, SQRDER, (m, n, q.fortran_vec (), ldq,
@@ -1186,18 +1186,18 @@
     void
     qr<FloatMatrix>::shift_cols (octave_idx_type i_arg, octave_idx_type j_arg)
     {
-      F77_INT i = octave::to_f77_int (i_arg);
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT i = to_f77_int (i_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT k = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT k = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (i < 0 || i > n-1 || j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("qrshift: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (float, w, 2*k);
       F77_XFCN (sqrshc, SQRSHC, (m, n, k,
@@ -1213,8 +1213,8 @@
     qr<ComplexMatrix>::form (octave_idx_type n_arg, ComplexMatrix& afact,
                              Complex *tau, type qr_type)
     {
-      F77_INT n = octave::to_f77_int (n_arg);
-      F77_INT m = octave::to_f77_int (afact.rows ());
+      F77_INT n = to_f77_int (n_arg);
+      F77_INT m = to_f77_int (afact.rows ());
       F77_INT min_mn = std::min (m, n);
       F77_INT info;
 
@@ -1263,7 +1263,7 @@
 
           if (m > 0)
             {
-              F77_INT k = octave::to_f77_int (q.cols ());
+              F77_INT k = to_f77_int (q.cols ());
               // workspace query.
               Complex clwork;
               F77_XFCN (zungqr, ZUNGQR, (m, k, min_mn,
@@ -1289,8 +1289,8 @@
     void
     qr<ComplexMatrix>::init (const ComplexMatrix& a, type qr_type)
     {
-      F77_INT m = octave::to_f77_int (a.rows ());
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT m = to_f77_int (a.rows ());
+      F77_INT n = to_f77_int (a.cols ());
 
       F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (Complex, tau, min_mn);
@@ -1330,12 +1330,12 @@
     qr<ComplexMatrix>::update (const ComplexColumnVector& u,
                                const ComplexColumnVector& v)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
@@ -1355,15 +1355,15 @@
     void
     qr<ComplexMatrix>::update (const ComplexMatrix& u, const ComplexMatrix& v)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_rows = octave::to_f77_int (u.rows ());
-      F77_INT u_cols = octave::to_f77_int (u.cols ());
+      F77_INT u_rows = to_f77_int (u.rows ());
+      F77_INT u_cols = to_f77_int (u.cols ());
 
-      F77_INT v_rows = octave::to_f77_int (v.rows ());
-      F77_INT v_cols = octave::to_f77_int (v.cols ());
+      F77_INT v_rows = to_f77_int (v.rows ());
+      F77_INT v_cols = to_f77_int (v.cols ());
 
       if (u_rows != m || v_rows != n || u_cols != v_cols)
         (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
@@ -1388,13 +1388,13 @@
     qr<ComplexMatrix>::insert_col (const ComplexColumnVector& u,
                                    octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
 
       if (u_nel != m)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
@@ -1410,8 +1410,8 @@
       else
         r.resize (k, n+1);
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       ComplexColumnVector utmp = u;
       OCTAVE_LOCAL_BUFFER (double, rw, k);
@@ -1426,13 +1426,13 @@
     qr<ComplexMatrix>::insert_col (const ComplexMatrix& u,
                                    const Array<octave_idx_type>& j)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
       Array<octave_idx_type> jsi;
       Array<octave_idx_type> js = j.sort (jsi, 0, ASCENDING);
-      F77_INT nj = octave::to_f77_int (js.numel ());
+      F77_INT nj = to_f77_int (js.numel ());
       bool dups = false;
       for (F77_INT i = 0; i < nj - 1; i++)
         dups = dups && js(i) == js(i+1);
@@ -1440,14 +1440,14 @@
       if (dups)
         (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT u_cols = octave::to_f77_int (u.cols ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT u_cols = to_f77_int (u.cols ());
 
       if (u_nel != m || u_cols != nj)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
 
-      F77_INT js_beg = octave::to_f77_int (js(0));
-      F77_INT js_end = octave::to_f77_int (js(nj-1));
+      F77_INT js_beg = to_f77_int (js(0));
+      F77_INT js_end = to_f77_int (js(nj-1));
 
       if (nj > 0 && (js_beg < 0 || js_end > n))
         (*current_liboctave_error_handler) ("qrinsert: index out of range");
@@ -1463,15 +1463,15 @@
           else
             r.resize (k, n + nj);
 
-          F77_INT ldq = octave::to_f77_int (q.rows ());
-          F77_INT ldr = octave::to_f77_int (r.rows ());
+          F77_INT ldq = to_f77_int (q.rows ());
+          F77_INT ldr = to_f77_int (r.rows ());
 
           OCTAVE_LOCAL_BUFFER (double, rw, kmax);
           for (volatile F77_INT i = 0; i < nj; i++)
             {
               F77_INT ii = i;
               ComplexColumnVector utmp = u.column (jsi(i));
-              F77_INT js_elt = octave::to_f77_int (js(ii));
+              F77_INT js_elt = to_f77_int (js(ii));
               F77_XFCN (zqrinc, ZQRINC, (m, n + ii, std::min (kmax, k + ii),
                                          F77_DBLE_CMPLX_ARG (q.fortran_vec ()),
                                          ldq,
@@ -1487,17 +1487,17 @@
     void
     qr<ComplexMatrix>::delete_col (octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT k = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT k = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("qrdelete: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (double, rw, k);
       F77_XFCN (zqrdec, ZQRDEC, (m, n, k, F77_DBLE_CMPLX_ARG (q.fortran_vec ()),
@@ -1517,13 +1517,13 @@
     void
     qr<ComplexMatrix>::delete_col (const Array<octave_idx_type>& j)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
       Array<octave_idx_type> jsi;
       Array<octave_idx_type> js = j.sort (jsi, 0, DESCENDING);
-      F77_INT nj = octave::to_f77_int (js.numel ());
+      F77_INT nj = to_f77_int (js.numel ());
       bool dups = false;
       for (F77_INT i = 0; i < nj - 1; i++)
         dups = dups && js(i) == js(i+1);
@@ -1531,22 +1531,22 @@
       if (dups)
         (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
 
-      F77_INT js_beg = octave::to_f77_int (js(0));
-      F77_INT js_end = octave::to_f77_int (js(nj-1));
+      F77_INT js_beg = to_f77_int (js(0));
+      F77_INT js_end = to_f77_int (js(nj-1));
 
       if (nj > 0 && (js_beg > n-1 || js_end < 0))
         (*current_liboctave_error_handler) ("qrinsert: index out of range");
 
       if (nj > 0)
         {
-          F77_INT ldq = octave::to_f77_int (q.rows ());
-          F77_INT ldr = octave::to_f77_int (r.rows ());
+          F77_INT ldq = to_f77_int (q.rows ());
+          F77_INT ldr = to_f77_int (r.rows ());
 
           OCTAVE_LOCAL_BUFFER (double, rw, k);
           for (volatile F77_INT i = 0; i < nj; i++)
             {
               F77_INT ii = i;
-              F77_INT js_elt = octave::to_f77_int (js(ii));
+              F77_INT js_elt = to_f77_int (js(ii));
               F77_XFCN (zqrdec, ZQRDEC, (m, n - ii, (k == m ? k : k - ii),
                                          F77_DBLE_CMPLX_ARG (q.fortran_vec ()),
                                          ldq,
@@ -1569,13 +1569,13 @@
     qr<ComplexMatrix>::insert_row (const ComplexRowVector& u,
                                    octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
       F77_INT k = std::min (m, n);
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
 
       if (! q.issquare () || u_nel != n)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
@@ -1586,8 +1586,8 @@
       q.resize (m + 1, m + 1);
       r.resize (m + 1, n);
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       ComplexRowVector utmp = u;
       OCTAVE_LOCAL_BUFFER (double, rw, k);
@@ -1602,10 +1602,10 @@
     void
     qr<ComplexMatrix>::delete_row (octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (! q.issquare ())
         (*current_liboctave_error_handler) ("qrdelete: dimensions mismatch");
@@ -1613,8 +1613,8 @@
       if (j < 0 || j > m-1)
         (*current_liboctave_error_handler) ("qrdelete: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (Complex, w, m);
       OCTAVE_LOCAL_BUFFER (double, rw, m);
@@ -1631,18 +1631,18 @@
     qr<ComplexMatrix>::shift_cols (octave_idx_type i_arg,
                                    octave_idx_type j_arg)
     {
-      F77_INT i = octave::to_f77_int (i_arg);
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT i = to_f77_int (i_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT k = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT k = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (i < 0 || i > n-1 || j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("qrshift: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (Complex, w, k);
       OCTAVE_LOCAL_BUFFER (double, rw, k);
@@ -1659,8 +1659,8 @@
     qr<FloatComplexMatrix>::form (octave_idx_type n_arg, FloatComplexMatrix& afact,
                                   FloatComplex *tau, type qr_type)
     {
-      F77_INT n = octave::to_f77_int (n_arg);
-      F77_INT m = octave::to_f77_int (afact.rows ());
+      F77_INT n = to_f77_int (n_arg);
+      F77_INT m = to_f77_int (afact.rows ());
       F77_INT min_mn = std::min (m, n);
       F77_INT info;
 
@@ -1709,7 +1709,7 @@
 
           if (m > 0)
             {
-              F77_INT k = octave::to_f77_int (q.cols ());
+              F77_INT k = to_f77_int (q.cols ());
               // workspace query.
               FloatComplex clwork;
               F77_XFCN (cungqr, CUNGQR, (m, k, min_mn,
@@ -1733,8 +1733,8 @@
     void
     qr<FloatComplexMatrix>::init (const FloatComplexMatrix& a, type qr_type)
     {
-      F77_INT m = octave::to_f77_int (a.rows ());
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT m = to_f77_int (a.rows ());
+      F77_INT n = to_f77_int (a.cols ());
 
       F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (FloatComplex, tau, min_mn);
@@ -1772,12 +1772,12 @@
     qr<FloatComplexMatrix>::update (const FloatComplexColumnVector& u,
                                     const FloatComplexColumnVector& v)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT v_nel = octave::to_f77_int (v.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT v_nel = to_f77_int (v.numel ());
 
       if (u_nel != m || v_nel != n)
         (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
@@ -1798,15 +1798,15 @@
     qr<FloatComplexMatrix>::update (const FloatComplexMatrix& u,
                                     const FloatComplexMatrix& v)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_rows = octave::to_f77_int (u.rows ());
-      F77_INT u_cols = octave::to_f77_int (u.cols ());
+      F77_INT u_rows = to_f77_int (u.rows ());
+      F77_INT u_cols = to_f77_int (u.cols ());
 
-      F77_INT v_rows = octave::to_f77_int (v.rows ());
-      F77_INT v_cols = octave::to_f77_int (v.cols ());
+      F77_INT v_rows = to_f77_int (v.rows ());
+      F77_INT v_cols = to_f77_int (v.cols ());
 
       if (u_rows != m || v_rows != n || u_cols != v_cols)
         (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
@@ -1830,13 +1830,13 @@
     qr<FloatComplexMatrix>::insert_col (const FloatComplexColumnVector& u,
                                         octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
 
       if (u_nel != m)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
@@ -1852,8 +1852,8 @@
       else
         r.resize (k, n+1);
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       FloatComplexColumnVector utmp = u;
       OCTAVE_LOCAL_BUFFER (float, rw, k);
@@ -1867,13 +1867,13 @@
     qr<FloatComplexMatrix>::insert_col (const FloatComplexMatrix& u,
                                         const Array<octave_idx_type>& j)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
       Array<octave_idx_type> jsi;
       Array<octave_idx_type> js = j.sort (jsi, 0, ASCENDING);
-      F77_INT nj = octave::to_f77_int (js.numel ());
+      F77_INT nj = to_f77_int (js.numel ());
       bool dups = false;
       for (F77_INT i = 0; i < nj - 1; i++)
         dups = dups && js(i) == js(i+1);
@@ -1881,14 +1881,14 @@
       if (dups)
         (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
-      F77_INT u_cols = octave::to_f77_int (u.cols ());
+      F77_INT u_nel = to_f77_int (u.numel ());
+      F77_INT u_cols = to_f77_int (u.cols ());
 
       if (u_nel != m || u_cols != nj)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
 
-      F77_INT js_beg = octave::to_f77_int (js(0));
-      F77_INT js_end = octave::to_f77_int (js(nj-1));
+      F77_INT js_beg = to_f77_int (js(0));
+      F77_INT js_end = to_f77_int (js(nj-1));
 
       if (nj > 0 && (js_beg < 0 || js_end > n))
         (*current_liboctave_error_handler) ("qrinsert: index out of range");
@@ -1904,14 +1904,14 @@
           else
             r.resize (k, n + nj);
 
-          F77_INT ldq = octave::to_f77_int (q.rows ());
-          F77_INT ldr = octave::to_f77_int (r.rows ());
+          F77_INT ldq = to_f77_int (q.rows ());
+          F77_INT ldr = to_f77_int (r.rows ());
 
           OCTAVE_LOCAL_BUFFER (float, rw, kmax);
           for (volatile F77_INT i = 0; i < nj; i++)
             {
               F77_INT ii = i;
-              F77_INT js_elt = octave::to_f77_int (js(ii));
+              F77_INT js_elt = to_f77_int (js(ii));
               F77_XFCN (cqrinc, CQRINC, (m, n + ii, std::min (kmax, k + ii),
                                          F77_CMPLX_ARG (q.fortran_vec ()), ldq,
                                          F77_CMPLX_ARG (r.fortran_vec ()), ldr,
@@ -1926,17 +1926,17 @@
     void
     qr<FloatComplexMatrix>::delete_col (octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT k = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT k = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("qrdelete: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (float, rw, k);
       F77_XFCN (cqrdec, CQRDEC, (m, n, k, F77_CMPLX_ARG (q.fortran_vec ()), ldq,
@@ -1956,13 +1956,13 @@
     void
     qr<FloatComplexMatrix>::delete_col (const Array<octave_idx_type>& j)
     {
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
-      F77_INT k = octave::to_f77_int (q.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT n = to_f77_int (r.cols ());
+      F77_INT k = to_f77_int (q.cols ());
 
       Array<octave_idx_type> jsi;
       Array<octave_idx_type> js = j.sort (jsi, 0, DESCENDING);
-      F77_INT nj = octave::to_f77_int (js.numel ());
+      F77_INT nj = to_f77_int (js.numel ());
       bool dups = false;
       for (F77_INT i = 0; i < nj - 1; i++)
         dups = dups && js(i) == js(i+1);
@@ -1970,22 +1970,22 @@
       if (dups)
         (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
 
-      F77_INT js_beg = octave::to_f77_int (js(0));
-      F77_INT js_end = octave::to_f77_int (js(nj-1));
+      F77_INT js_beg = to_f77_int (js(0));
+      F77_INT js_end = to_f77_int (js(nj-1));
 
       if (nj > 0 && (js_beg > n-1 || js_end < 0))
         (*current_liboctave_error_handler) ("qrinsert: index out of range");
 
       if (nj > 0)
         {
-          F77_INT ldq = octave::to_f77_int (q.rows ());
-          F77_INT ldr = octave::to_f77_int (r.rows ());
+          F77_INT ldq = to_f77_int (q.rows ());
+          F77_INT ldr = to_f77_int (r.rows ());
 
           OCTAVE_LOCAL_BUFFER (float, rw, k);
           for (volatile F77_INT i = 0; i < nj; i++)
             {
               F77_INT ii = i;
-              F77_INT js_elt = octave::to_f77_int (js(ii));
+              F77_INT js_elt = to_f77_int (js(ii));
               F77_XFCN (cqrdec, CQRDEC, (m, n - ii, (k == m ? k : k - ii),
                                          F77_CMPLX_ARG (q.fortran_vec ()), ldq,
                                          F77_CMPLX_ARG (r.fortran_vec ()), ldr,
@@ -2007,13 +2007,13 @@
     qr<FloatComplexMatrix>::insert_row (const FloatComplexRowVector& u,
                                         octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
       F77_INT k = std::min (m, n);
 
-      F77_INT u_nel = octave::to_f77_int (u.numel ());
+      F77_INT u_nel = to_f77_int (u.numel ());
 
       if (! q.issquare () || u_nel != n)
         (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
@@ -2024,8 +2024,8 @@
       q.resize (m + 1, m + 1);
       r.resize (m + 1, n);
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       FloatComplexRowVector utmp = u;
       OCTAVE_LOCAL_BUFFER (float, rw, k);
@@ -2040,10 +2040,10 @@
     void
     qr<FloatComplexMatrix>::delete_row (octave_idx_type j_arg)
     {
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (! q.issquare ())
         (*current_liboctave_error_handler) ("qrdelete: dimensions mismatch");
@@ -2051,8 +2051,8 @@
       if (j < 0 || j > m-1)
         (*current_liboctave_error_handler) ("qrdelete: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (FloatComplex, w, m);
       OCTAVE_LOCAL_BUFFER (float, rw, m);
@@ -2069,18 +2069,18 @@
     qr<FloatComplexMatrix>::shift_cols (octave_idx_type i_arg,
                                         octave_idx_type j_arg)
     {
-      F77_INT i = octave::to_f77_int (i_arg);
-      F77_INT j = octave::to_f77_int (j_arg);
+      F77_INT i = to_f77_int (i_arg);
+      F77_INT j = to_f77_int (j_arg);
 
-      F77_INT m = octave::to_f77_int (q.rows ());
-      F77_INT k = octave::to_f77_int (r.rows ());
-      F77_INT n = octave::to_f77_int (r.cols ());
+      F77_INT m = to_f77_int (q.rows ());
+      F77_INT k = to_f77_int (r.rows ());
+      F77_INT n = to_f77_int (r.cols ());
 
       if (i < 0 || i > n-1 || j < 0 || j > n-1)
         (*current_liboctave_error_handler) ("qrshift: index out of range");
 
-      F77_INT ldq = octave::to_f77_int (q.rows ());
-      F77_INT ldr = octave::to_f77_int (r.rows ());
+      F77_INT ldq = to_f77_int (q.rows ());
+      F77_INT ldr = to_f77_int (r.rows ());
 
       OCTAVE_LOCAL_BUFFER (FloatComplex, w, k);
       OCTAVE_LOCAL_BUFFER (float, rw, k);
--- a/liboctave/numeric/qrp.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/qrp.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -53,8 +53,8 @@
     {
       assert (qr_type != qr<Matrix>::raw);
 
-      F77_INT m = octave::to_f77_int (a.rows ());
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT m = to_f77_int (a.rows ());
+      F77_INT n = to_f77_int (a.cols ());
 
       F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (double, tau, min_mn);
@@ -121,8 +121,8 @@
     {
       assert (qr_type != qr<FloatMatrix>::raw);
 
-      F77_INT m = octave::to_f77_int (a.rows ());
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT m = to_f77_int (a.rows ());
+      F77_INT n = to_f77_int (a.cols ());
 
       F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (float, tau, min_mn);
@@ -189,8 +189,8 @@
     {
       assert (qr_type != qr<ComplexMatrix>::raw);
 
-      F77_INT m = octave::to_f77_int (a.rows ());
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT m = to_f77_int (a.rows ());
+      F77_INT n = to_f77_int (a.cols ());
 
       F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (Complex, tau, min_mn);
@@ -265,8 +265,8 @@
     {
       assert (qr_type != qr<FloatComplexMatrix>::raw);
 
-      F77_INT m = octave::to_f77_int (a.rows ());
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT m = to_f77_int (a.rows ());
+      F77_INT n = to_f77_int (a.cols ());
 
       F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (FloatComplex, tau, min_mn);
--- a/liboctave/numeric/schur.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/schur.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -98,8 +98,8 @@
     F77_INT
     schur<Matrix>::init (const Matrix& a, const std::string& ord, bool calc_unitary)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.cols ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.cols ());
 
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("schur: requires square matrix");
@@ -185,8 +185,8 @@
     schur<FloatMatrix>::init (const FloatMatrix& a, const std::string& ord,
                               bool calc_unitary)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.cols ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.cols ());
 
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("SCHUR requires square matrix");
@@ -272,8 +272,8 @@
     schur<ComplexMatrix>::init (const ComplexMatrix& a, const std::string& ord,
                                 bool calc_unitary)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.cols ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.cols ());
 
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("SCHUR requires square matrix");
@@ -357,7 +357,7 @@
       ComplexMatrix s (s_arg);
       ComplexMatrix u (u_arg);
 
-      F77_INT n = octave::to_f77_int (s.rows ());
+      F77_INT n = to_f77_int (s.rows ());
 
       if (s.columns () != n || u.rows () != n || u.columns () != n)
         (*current_liboctave_error_handler)
@@ -380,8 +380,8 @@
     schur<FloatComplexMatrix>::init (const FloatComplexMatrix& a,
                                      const std::string& ord, bool calc_unitary)
     {
-      F77_INT a_nr = octave::to_f77_int (a.rows ());
-      F77_INT a_nc = octave::to_f77_int (a.cols ());
+      F77_INT a_nr = to_f77_int (a.rows ());
+      F77_INT a_nc = to_f77_int (a.cols ());
 
       if (a_nr != a_nc)
         (*current_liboctave_error_handler) ("SCHUR requires square matrix");
@@ -466,7 +466,7 @@
       FloatComplexMatrix s (s_arg);
       FloatComplexMatrix u (u_arg);
 
-      F77_INT n = octave::to_f77_int (s.rows ());
+      F77_INT n = to_f77_int (s.rows ());
 
       if (s.columns () != n || u.rows () != n || u.columns () != n)
         (*current_liboctave_error_handler)
--- a/liboctave/numeric/sparse-chol.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/sparse-chol.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -117,7 +117,7 @@
 
       double rcond (void) const { return cond; }
 
-      octave::refcount<int> count;
+      refcount<int> count;
 
     private:
 
--- a/liboctave/numeric/sparse-lu.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/sparse-lu.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -418,33 +418,33 @@
       umfpack_defaults<lu_elt_type> (control);
 
       double tmp = octave_sparse_params::get_key ("spumoni");
-      if (! octave::math::isnan (tmp))
+      if (! math::isnan (tmp))
         Control (UMFPACK_PRL) = tmp;
 
       if (piv_thres.numel () == 2)
         {
           tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0));
-          if (! octave::math::isnan (tmp))
+          if (! math::isnan (tmp))
             Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
 
           tmp = (piv_thres (1) > 1. ? 1. : piv_thres (1));
-          if (! octave::math::isnan (tmp))
+          if (! math::isnan (tmp))
             Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
         }
       else
         {
           tmp = octave_sparse_params::get_key ("piv_tol");
-          if (! octave::math::isnan (tmp))
+          if (! math::isnan (tmp))
             Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
 
           tmp = octave_sparse_params::get_key ("sym_tol");
-          if (! octave::math::isnan (tmp))
+          if (! math::isnan (tmp))
             Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
         }
 
       // Set whether we are allowed to modify Q or not
       tmp = octave_sparse_params::get_key ("autoamd");
-      if (! octave::math::isnan (tmp))
+      if (! math::isnan (tmp))
         Control (UMFPACK_FIXQ) = tmp;
 
       // Turn-off UMFPACK scaling for LU
@@ -636,26 +636,26 @@
       umfpack_defaults<lu_elt_type> (control);
 
       double tmp = octave_sparse_params::get_key ("spumoni");
-      if (! octave::math::isnan (tmp))
+      if (! math::isnan (tmp))
         Control (UMFPACK_PRL) = tmp;
 
       if (piv_thres.numel () == 2)
         {
           tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0));
-          if (! octave::math::isnan (tmp))
+          if (! math::isnan (tmp))
             Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
           tmp = (piv_thres (1) > 1. ? 1. : piv_thres (1));
-          if (! octave::math::isnan (tmp))
+          if (! math::isnan (tmp))
             Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
         }
       else
         {
           tmp = octave_sparse_params::get_key ("piv_tol");
-          if (! octave::math::isnan (tmp))
+          if (! math::isnan (tmp))
             Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
 
           tmp = octave_sparse_params::get_key ("sym_tol");
-          if (! octave::math::isnan (tmp))
+          if (! math::isnan (tmp))
             Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
         }
 
@@ -668,7 +668,7 @@
       else
         {
           tmp = octave_sparse_params::get_key ("autoamd");
-          if (! octave::math::isnan (tmp))
+          if (! math::isnan (tmp))
             Control (UMFPACK_FIXQ) = tmp;
         }
 
--- a/liboctave/numeric/sparse-qr.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/sparse-qr.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -114,7 +114,7 @@
       typename SPARSE_T::dense_matrix_type
       Q (void) const;
 
-      octave::refcount<int> count;
+      refcount<int> count;
 
       octave_idx_type nrows;
       octave_idx_type ncols;
--- a/liboctave/numeric/svd.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/numeric/svd.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -278,8 +278,8 @@
     {
       F77_INT info;
 
-      F77_INT m = octave::to_f77_int (a.rows ());
-      F77_INT n = octave::to_f77_int (a.cols ());
+      F77_INT m = to_f77_int (a.rows ());
+      F77_INT n = to_f77_int (a.cols ());
 
       if (m == 0 || n == 0)
         {
--- a/liboctave/system/child-list.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/system/child-list.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -145,7 +145,7 @@
           {
             int status;
 
-            if (octave::sys::waitpid (pid, &status, octave::sys::wnohang ()) > 0)
+            if (sys::waitpid (pid, &status, sys::wnohang ()) > 0)
               {
                 oc.have_status = 1;
 
--- a/liboctave/system/dir-ops.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/system/dir-ops.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -53,7 +53,7 @@
         {
           close ();
 
-          std::string fullname = octave::sys::file_ops::tilde_expand (name);
+          std::string fullname = sys::file_ops::tilde_expand (name);
 
           dir = octave_opendir_wrapper (fullname.c_str ());
 
--- a/liboctave/system/file-ops.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/system/file-ops.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -55,10 +55,10 @@
 {
   namespace sys
   {
-    file_ops *octave::sys::file_ops::instance = nullptr;
+    file_ops *sys::file_ops::instance = nullptr;
 
     bool
-    octave::sys::file_ops::instance_ok (void)
+    sys::file_ops::instance_ok (void)
     {
       bool retval = true;
 
@@ -111,27 +111,27 @@
     // expansions.  The function is called with the text sans tilde, and
     // returns a malloc()'ed string which is the expansion, or a NULL
     // pointer if the expansion fails.
-    octave::sys::file_ops::tilde_expansion_hook
-      octave::sys::file_ops::tilde_expansion_preexpansion_hook = 0;
+    sys::file_ops::tilde_expansion_hook
+      sys::file_ops::tilde_expansion_preexpansion_hook = 0;
 
     // If non-null, this contains the address of a function to call if the
     // standard meaning for expanding a tilde fails.  The function is
     // called with the text (sans tilde, as in "foo"), and returns a
     // malloc()'ed string which is the expansion, or a NULL pointer if
     // there is no expansion.
-    octave::sys::file_ops::tilde_expansion_hook
-      octave::sys::file_ops::tilde_expansion_failure_hook = 0;
+    sys::file_ops::tilde_expansion_hook
+      sys::file_ops::tilde_expansion_failure_hook = 0;
 
     // When non-null, this is a NULL terminated array of strings which are
     // duplicates for a tilde prefix.  Bash uses this to expand '=~' and
     // ':~'.
-    string_vector octave::sys::file_ops::tilde_additional_prefixes =
+    string_vector sys::file_ops::tilde_additional_prefixes =
       default_prefixes;
 
     // When non-null, this is a NULL terminated array of strings which
     // match the end of a username, instead of just "/".  Bash sets this
     // to ':' and '=~'.
-    string_vector octave::sys::file_ops::tilde_additional_suffixes =
+    string_vector sys::file_ops::tilde_additional_suffixes =
       default_suffixes;
 
     // Find the start of a tilde expansion in S, and return the index
@@ -149,7 +149,7 @@
       if (s_len == 0 || s[0] == '~')
         return 0;
 
-      string_vector prefixes = octave::sys::file_ops::tilde_additional_prefixes;
+      string_vector prefixes = sys::file_ops::tilde_additional_prefixes;
 
       if (! prefixes.empty ())
         {
@@ -179,13 +179,13 @@
     {
       size_t s_len = s.length ();
 
-      string_vector suffixes = octave::sys::file_ops::tilde_additional_suffixes;
+      string_vector suffixes = sys::file_ops::tilde_additional_suffixes;
 
       size_t i = 0;
 
       for ( ; i < s_len; i++)
         {
-          if (octave::sys::file_ops::is_dir_sep (s[i]))
+          if (sys::file_ops::is_dir_sep (s[i]))
             break;
 
           if (! suffixes.empty ())
@@ -212,7 +212,7 @@
 
       size_t len = 1;
 
-      while (len < f_len && ! octave::sys::file_ops::is_dir_sep (fname[len]))
+      while (len < f_len && ! sys::file_ops::is_dir_sep (fname[len]))
         len++;
 
       return fname.substr (1, len);
@@ -233,8 +233,8 @@
       // of $HOME or the home directory of the current user, regardless of
       // any preexpansion hook.
 
-      if (f_len == 1 || octave::sys::file_ops::is_dir_sep (filename[1]))
-        return octave::sys::env::get_home_directory () + filename.substr (1);
+      if (f_len == 1 || sys::file_ops::is_dir_sep (filename[1]))
+        return sys::env::get_home_directory () + filename.substr (1);
 
       std::string username = isolate_tilde_prefix (filename);
 
@@ -242,10 +242,10 @@
 
       std::string dirname;
 
-      if (octave::sys::file_ops::tilde_expansion_preexpansion_hook)
+      if (sys::file_ops::tilde_expansion_preexpansion_hook)
         {
           std::string expansion
-            = octave::sys::file_ops::tilde_expansion_preexpansion_hook (username);
+            = sys::file_ops::tilde_expansion_preexpansion_hook (username);
 
           if (! expansion.empty ())
             return expansion + filename.substr (user_len+1);
@@ -254,17 +254,17 @@
       // No preexpansion hook, or the preexpansion hook failed.  Look in the
       // password database.
 
-      octave::sys::password pw = octave::sys::password::getpwnam (username);
+      sys::password pw = sys::password::getpwnam (username);
 
       if (! pw)
         {
           // If the calling program has a special syntax for expanding tildes,
           // and we couldn't find a standard expansion, then let them try.
 
-          if (octave::sys::file_ops::tilde_expansion_failure_hook)
+          if (sys::file_ops::tilde_expansion_failure_hook)
             {
               std::string expansion
-                = octave::sys::file_ops::tilde_expansion_failure_hook (username);
+                = sys::file_ops::tilde_expansion_failure_hook (username);
 
               if (! expansion.empty ())
                 dirname = expansion + filename.substr (user_len+1);
@@ -283,7 +283,7 @@
     }
 
     bool
-    octave::sys::file_ops::is_dev_sep (char c)
+    sys::file_ops::is_dev_sep (char c)
     {
 #if (defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM))
       return c == dev_sep_char ();
@@ -298,7 +298,7 @@
     // user's home directory.  If no ~, or no <pwd.h>, just return NAME.
 
     std::string
-    octave::sys::file_ops::tilde_expand (const std::string& name)
+    sys::file_ops::tilde_expand (const std::string& name)
     {
       if (name.find ('~') == std::string::npos)
         return std::string (name);
@@ -357,7 +357,7 @@
     // A vector version of the above.
 
     string_vector
-    octave::sys::file_ops::tilde_expand (const string_vector& names)
+    sys::file_ops::tilde_expand (const string_vector& names)
     {
       string_vector retval;
 
@@ -372,7 +372,7 @@
     }
 
     std::string
-    octave::sys::file_ops::concat (const std::string& dir, const std::string& file)
+    sys::file_ops::concat (const std::string& dir, const std::string& file)
     {
       return dir.empty ()
              ? file
@@ -382,7 +382,7 @@
     }
 
     std::string
-    octave::sys::file_ops::native_separator_path (const std::string& path)
+    sys::file_ops::native_separator_path (const std::string& path)
     {
       std::string retval;
 
@@ -407,7 +407,7 @@
     mkdir (const std::string& nm, mode_t md)
     {
       std::string msg;
-      return octave::sys::mkdir (nm, md, msg);
+      return sys::mkdir (nm, md, msg);
     }
 
     int
@@ -577,7 +577,7 @@
 
       int status = 0;
 
-      octave::sys::dir_entry dir (name);
+      sys::dir_entry dir (name);
 
       if (dir)
         {
@@ -593,10 +593,10 @@
               if (nm == "." || nm == "..")
                 continue;
 
-              std::string fullnm = name + octave::sys::file_ops::dir_sep_str () + nm;
+              std::string fullnm = name + sys::file_ops::dir_sep_str () + nm;
 
               // Get info about the file.  Don't follow links.
-              octave::sys::file_stat fs (fullnm, false);
+              sys::file_stat fs (fullnm, false);
 
               if (fs)
                 {
@@ -684,15 +684,15 @@
       // get dir path to use for template
       std::string templatename;
       if (dir.empty ())
-        templatename = octave::sys::env::get_temp_directory ();
-      else if (! octave::sys::file_stat (dir, false).is_dir ())
-        templatename = octave::sys::env::get_temp_directory ();
+        templatename = sys::env::get_temp_directory ();
+      else if (! sys::file_stat (dir, false).is_dir ())
+        templatename = sys::env::get_temp_directory ();
       else
         templatename = dir;
 
       // add dir sep char if it is not there
-      if (*templatename.rbegin () != octave::sys::file_ops::dir_sep_char ())
-        templatename += octave::sys::file_ops::dir_sep_char ();
+      if (*templatename.rbegin () != sys::file_ops::dir_sep_char ())
+        templatename += sys::file_ops::dir_sep_char ();
 
       if (pfx.empty ())
         templatename += "file";
--- a/liboctave/system/file-stat.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/system/file-stat.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -158,7 +158,7 @@
 
     int
     base_file_stat::is_newer (const std::string& file,
-                              const octave::sys::time& time)
+                              const sys::time& time)
     {
       file_stat fs (file);
 
@@ -184,11 +184,11 @@
           initialized = false;
           fail = false;
 
-          std::string full_file_name = octave::sys::file_ops::tilde_expand (file_name);
+          std::string full_file_name = sys::file_ops::tilde_expand (file_name);
 
 #if defined (__WIN32__)
           // Remove trailing slash.
-          if (octave::sys::file_ops::is_dir_sep (full_file_name[full_file_name.length () - 1])
+          if (sys::file_ops::is_dir_sep (full_file_name[full_file_name.length () - 1])
               && full_file_name.length () != 1
               && ! (full_file_name.length () == 3 && full_file_name[1] == ':'))
             full_file_name.resize (full_file_name.length () - 1);
@@ -216,9 +216,9 @@
             }
           else
             {
-              m_atime = octave::sys::time (sys_atime);
-              m_mtime = octave::sys::time (sys_mtime);
-              m_ctime = octave::sys::time (sys_ctime);
+              m_atime = sys::time (sys_atime);
+              m_mtime = sys::time (sys_mtime);
+              m_ctime = sys::time (sys_ctime);
             }
 
           initialized = true;
@@ -248,9 +248,9 @@
             }
           else
             {
-              m_atime = octave::sys::time (sys_atime);
-              m_mtime = octave::sys::time (sys_mtime);
-              m_ctime = octave::sys::time (sys_ctime);
+              m_atime = sys::time (sys_atime);
+              m_mtime = sys::time (sys_mtime);
+              m_ctime = sys::time (sys_ctime);
             }
 
           initialized = true;
--- a/liboctave/system/file-stat.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/system/file-stat.h	Mon Jun 26 09:05:37 2017 -0400
@@ -83,9 +83,9 @@
       // The minimum difference in file time stamp values.
       // FIXME: This value should come from the filesystem itself.
       //        How can we get that info?
-      octave::sys::time time_resolution (void) const
+      sys::time time_resolution (void) const
       {
-        static octave::sys::time resolution (1.0);
+        static sys::time resolution (1.0);
         return resolution;
       }
 
@@ -124,9 +124,9 @@
 
       off_t size (void) const { return m_size; }
 
-      octave::sys::time atime (void) const { return m_atime; }
-      octave::sys::time mtime (void) const { return m_mtime; }
-      octave::sys::time ctime (void) const { return m_ctime; }
+      sys::time atime (void) const { return m_atime; }
+      sys::time mtime (void) const { return m_mtime; }
+      sys::time ctime (void) const { return m_ctime; }
 
       dev_t rdev (void) const { return m_rdev; }
 
@@ -146,11 +146,11 @@
       std::string error (void) const { return ok () ? "" : errmsg; }
 
       // Has the file referenced by this object been modified since TIME?
-      bool is_newer (const octave::sys::time& time) const { return m_mtime > time; }
+      bool is_newer (const sys::time& time) const { return m_mtime > time; }
 
       // It's nice to be able to hide the file_stat object if we don't
       // really care about it.
-      static int is_newer (const std::string&, const octave::sys::time&);
+      static int is_newer (const std::string&, const sys::time&);
 
     protected:
 
@@ -187,13 +187,13 @@
       off_t m_size;
 
       // time of last access
-      octave::sys::time m_atime;
+      sys::time m_atime;
 
       // time of last modification
-      octave::sys::time m_mtime;
+      sys::time m_mtime;
 
       // time of last file status change
-      octave::sys::time m_ctime;
+      sys::time m_ctime;
 
       // device number for special files
       dev_t m_rdev;
--- a/liboctave/system/lo-sysdep.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/system/lo-sysdep.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -58,7 +58,7 @@
     int
     chdir (const std::string& path_arg)
     {
-      std::string path = octave::sys::file_ops::tilde_expand (path_arg);
+      std::string path = sys::file_ops::tilde_expand (path_arg);
 
 #if defined (OCTAVE_USE_WINDOWS_API)
       if (path.length () == 2 && path[1] == ':')
--- a/liboctave/system/oct-env.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/system/oct-env.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -279,7 +279,7 @@
             = octave_set_program_name_wrapper (strsave (s.c_str ()));
 
           size_t pos
-            = prog_invocation_name.find_last_of (octave::sys::file_ops::dir_sep_chars ());
+            = prog_invocation_name.find_last_of (sys::file_ops::dir_sep_chars ());
 
           // Also keep a shortened version of the program name.
           prog_name = (pos == std::string::npos
@@ -303,7 +303,7 @@
       size_t len = home_dir.length ();
 
       if (len > 1 && home_dir == name.substr (0, len)
-          && (name.length () == len || octave::sys::file_ops::is_dir_sep (name[len])))
+          && (name.length () == len || sys::file_ops::is_dir_sep (name[len])))
         {
           retval = "~";
           retval.append (name.substr (len));
@@ -322,13 +322,13 @@
       if (len == 0)
         return false;
 
-      if (octave::sys::file_ops::is_dir_sep (s[0]))
+      if (sys::file_ops::is_dir_sep (s[0]))
         return true;
 
 #if defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM)
       if ((len == 2 && isalpha (s[0]) && s[1] == ':')
           || (len > 2 && isalpha (s[0]) && s[1] == ':'
-              && octave::sys::file_ops::is_dir_sep (s[2])))
+              && sys::file_ops::is_dir_sep (s[2])))
         return true;
 #endif
 
@@ -346,14 +346,14 @@
       if (len == 1 && s[0] == '.')
         return true;
 
-      if (len > 1 && s[0] == '.' && octave::sys::file_ops::is_dir_sep (s[1]))
+      if (len > 1 && s[0] == '.' && sys::file_ops::is_dir_sep (s[1]))
         return true;
 
       if (len == 2 && s[0] == '.' && s[1] == '.')
         return true;
 
       if (len > 2 && s[0] == '.' && s[1] == '.'
-          && octave::sys::file_ops::is_dir_sep (s[2]))
+          && sys::file_ops::is_dir_sep (s[2]))
         return true;
 
       return false;
@@ -369,7 +369,7 @@
       if (! (do_absolute_pathname (s) || do_rooted_relative_pathname (s)))
         return s;
 
-      size_t pos = s.find_last_of (octave::sys::file_ops::dir_sep_chars ());
+      size_t pos = s.find_last_of (sys::file_ops::dir_sep_chars ());
 
       if (pos == std::string::npos)
         return s;
@@ -394,8 +394,8 @@
 
       std::string current_dir = dot_path;
 
-      if (! octave::sys::file_ops::is_dir_sep (current_dir.back ()))
-        current_dir.append (octave::sys::file_ops::dir_sep_str ());
+      if (! sys::file_ops::is_dir_sep (current_dir.back ()))
+        current_dir.append (sys::file_ops::dir_sep_str ());
 
       size_t i = 0;
       size_t slen = s.length ();
@@ -407,7 +407,7 @@
               if (i + 1 == slen)
                 break;
 
-              if (octave::sys::file_ops::is_dir_sep (s[i+1]))
+              if (sys::file_ops::is_dir_sep (s[i+1]))
                 {
                   i += 2;
                   continue;
@@ -415,7 +415,7 @@
 
               if (s[i+1] == '.'
                   && (i + 2 == slen
-                      || octave::sys::file_ops::is_dir_sep (s[i+2])))
+                      || sys::file_ops::is_dir_sep (s[i+2])))
                 {
                   i += 2;
                   if (i != slen)
@@ -428,7 +428,7 @@
             }
 
           size_t sep_pos;
-          sep_pos = s.find_first_of (octave::sys::file_ops::dir_sep_chars (), i);
+          sep_pos = s.find_first_of (sys::file_ops::dir_sep_chars (), i);
 
           if (sep_pos == std::string::npos)
             {
@@ -448,7 +448,7 @@
         }
 
       // Strip any trailing directory separator
-      if (octave::sys::file_ops::is_dir_sep (current_dir.back ()))
+      if (sys::file_ops::is_dir_sep (current_dir.back ()))
         current_dir.pop_back ();
 
       return current_dir;
@@ -463,7 +463,7 @@
         current_directory = "";
 
       if (verbatim_pwd || current_directory.empty ())
-        current_directory = octave::sys::getcwd ();
+        current_directory = sys::getcwd ();
 
       return current_directory;
     }
@@ -490,10 +490,10 @@
 
       if (hd.empty ())
         {
-          octave::sys::password pw = octave::sys::password::getpwuid (
-                                       octave::sys::getuid ());
+          sys::password pw = sys::password::getpwuid (
+                                       sys::getuid ());
 
-          hd = (pw ? pw.dir () : std::string (octave::sys::file_ops::dir_sep_str ()));
+          hd = (pw ? pw.dir () : std::string (sys::file_ops::dir_sep_str ()));
         }
 
       return hd;
@@ -504,8 +504,8 @@
     {
       if (user_name.empty ())
         {
-          octave::sys::password pw = octave::sys::password::getpwuid (
-                                       octave::sys::getuid ());
+          sys::password pw = sys::password::getpwuid (
+                                       sys::getuid ());
 
           user_name = (pw ? pw.name () : std::string ("unknown"));
         }
@@ -562,18 +562,18 @@
 
           if (len > 1)
             {
-              if (octave::sys::file_ops::is_dir_sep (tmp[--len]))
+              if (sys::file_ops::is_dir_sep (tmp[--len]))
                 tmp.resize (len);
             }
 
-          if (! octave::sys::chdir (tmp))
+          if (! sys::chdir (tmp))
             {
               current_directory = tmp;
               retval = true;
             }
         }
       else
-        retval = (! octave::sys::chdir (newdir));
+        retval = (! sys::chdir (newdir));
 
       return retval;
     }
@@ -590,10 +590,10 @@
 
       while (n--)
         {
-          while (octave::sys::file_ops::is_dir_sep (path[i]) && i > 0)
+          while (sys::file_ops::is_dir_sep (path[i]) && i > 0)
             i--;
 
-          while (! octave::sys::file_ops::is_dir_sep (path[i]) && i > 0)
+          while (! sys::file_ops::is_dir_sep (path[i]) && i > 0)
             i--;
 
           i++;
--- a/liboctave/system/oct-syscalls.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/system/oct-syscalls.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -50,7 +50,7 @@
     dup2 (int old_fd, int new_fd)
     {
       std::string msg;
-      return octave::sys::dup2 (old_fd, new_fd, msg);
+      return sys::dup2 (old_fd, new_fd, msg);
     }
 
     int
@@ -72,7 +72,7 @@
     execvp (const std::string& file, const string_vector& argv)
     {
       std::string msg;
-      return octave::sys::execvp (file, argv, msg);
+      return sys::execvp (file, argv, msg);
     }
 
     int
@@ -183,7 +183,7 @@
     pipe (int *fildes)
     {
       std::string msg;
-      return octave::sys::pipe (fildes, msg);
+      return sys::pipe (fildes, msg);
     }
 
     int
@@ -205,7 +205,7 @@
     waitpid (pid_t pid, int *status, int options)
     {
       std::string msg;
-      return octave::sys::waitpid (pid, status, options, msg);
+      return sys::waitpid (pid, status, options, msg);
     }
 
     pid_t
@@ -293,7 +293,7 @@
     kill (pid_t pid, int sig)
     {
       std::string msg;
-      return octave::sys::kill (pid, sig, msg);
+      return sys::kill (pid, sig, msg);
     }
 
     int
@@ -321,7 +321,7 @@
             bool sync_mode, int *fildes)
     {
       std::string msg;
-      return octave::sys::popen2 (cmd, args, sync_mode, fildes, msg);
+      return sys::popen2 (cmd, args, sync_mode, fildes, msg);
     }
 
     pid_t
@@ -346,7 +346,7 @@
     fcntl (int fd, int cmd, long arg)
     {
       std::string msg;
-      return octave::sys::fcntl (fd, cmd, arg, msg);
+      return sys::fcntl (fd, cmd, arg, msg);
     }
 
     int
--- a/liboctave/util/cmd-edit.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/cmd-edit.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -61,7 +61,7 @@
 
   std::set<command_editor::event_hook_fcn> command_editor::event_hook_set;
 
-  static octave::mutex event_hook_lock;
+  static mutex event_hook_lock;
 
 #if defined (USE_READLINE)
 
@@ -247,7 +247,7 @@
     // FIXME: need interface to rl_add_defun, rl_initialize, and
     // a function to set rl_terminal_name
 
-    std::string term = octave::sys::env::getenv ("TERM");
+    std::string term = sys::env::getenv ("TERM");
 
     octave_rl_set_terminal_name (term.c_str ());
 
@@ -539,7 +539,7 @@
     if (s)
       {
         // Remove incomplete component.
-        const char *f = strrchr (line, octave::sys::file_ops::dir_sep_char ());
+        const char *f = strrchr (line, sys::file_ops::dir_sep_char ());
 
         if (s[1] == '~' || (f && f != s))
           {
@@ -553,9 +553,9 @@
 
             if (candidate_filename[0] == '~')
               candidate_filename
-                = octave::sys::file_ops::tilde_expand (candidate_filename);
+                = sys::file_ops::tilde_expand (candidate_filename);
 
-            octave::sys::file_stat fs (candidate_filename);
+            sys::file_stat fs (candidate_filename);
 
             retval = fs.is_dir ();
           }
@@ -1576,7 +1576,7 @@
   {
     if (instance_ok ())
       {
-        std::string file = octave::sys::file_ops::tilde_expand (file_arg);
+        std::string file = sys::file_ops::tilde_expand (file_arg);
 
         instance->do_read_init_file (file);
       }
@@ -1714,7 +1714,7 @@
               case 'A':
                 // Make the current time/date into a string.
                 {
-                  octave::sys::localtime now;
+                  sys::localtime now;
 
                   if (c == 'd')
                     tmpstr = now.strftime ("%a %b %d");
@@ -1739,7 +1739,7 @@
 
               case 'h':
                 {
-                  tmpstr = octave::sys::env::get_host_name ();
+                  tmpstr = sys::env::get_host_name ();
 
                   size_t pos = tmpstr.find ('.');
 
@@ -1751,7 +1751,7 @@
 
               case 'H':
                 {
-                  tmpstr = octave::sys::env::get_host_name ();
+                  tmpstr = sys::env::get_host_name ();
 
                   break;
                 }
@@ -1772,15 +1772,15 @@
 
               case 's':
                 {
-                  tmpstr = octave::sys::env::get_program_name ();
-                  tmpstr = octave::sys::env::base_pathname (tmpstr);
+                  tmpstr = sys::env::get_program_name ();
+                  tmpstr = sys::env::base_pathname (tmpstr);
 
                   break;
                 }
 
               case 'u':
                 {
-                  tmpstr = octave::sys::env::get_user_name ();
+                  tmpstr = sys::env::get_user_name ();
 
                   break;
                 }
@@ -1790,14 +1790,14 @@
                 {
                   try
                     {
-                      tmpstr = octave::sys::env::get_current_directory ();
+                      tmpstr = sys::env::get_current_directory ();
                     }
-                  catch (const octave::execution_exception&)
+                  catch (const execution_exception&)
                     {
                       tmpstr = "";
                     }
 
-                  std::string home_dir = octave::sys::env::get_home_directory ();
+                  std::string home_dir = sys::env::get_home_directory ();
 
                   if (c == 'W' && (home_dir.empty () || tmpstr != home_dir))
                     {
@@ -1810,7 +1810,7 @@
                         }
                     }
                   else
-                    tmpstr = octave::sys::env::polite_directory_format (tmpstr);
+                    tmpstr = sys::env::polite_directory_format (tmpstr);
 
                   break;
                 }
--- a/liboctave/util/cmd-hist.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/cmd-hist.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -394,7 +394,7 @@
 
                 if (! f.empty ())
                   {
-                    octave::sys::file_stat fs (f);
+                    sys::file_stat fs (f);
 
                     if (! fs)
                       {
@@ -548,7 +548,7 @@
   {
     if (instance_ok ())
       {
-        std::string f = octave::sys::file_ops::tilde_expand (f_arg);
+        std::string f = sys::file_ops::tilde_expand (f_arg);
 
         instance->do_set_file (f);
       }
--- a/liboctave/util/oct-glob.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/oct-glob.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -75,7 +75,7 @@
 
       int k = 0;
 
-      octave::unwind_protect frame;
+      unwind_protect frame;
 
       void *glob_info = octave_create_glob_info_struct ();
 
@@ -151,7 +151,7 @@
 
       int k = 0;
 
-      octave::unwind_protect frame;
+      unwind_protect frame;
 
       void *glob_info = octave_create_glob_info_struct ();
 
--- a/liboctave/util/oct-locbuf.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/oct-locbuf.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -39,7 +39,7 @@
 {
 // Each chunk will be at least this big.
 
-  const size_t octave::chunk_buffer::chunk_size =
+  const size_t chunk_buffer::chunk_size =
     static_cast<size_t> (OCTAVE_LOCBUF_CHUNKSIZE_MB) << 20;
 
   char *chunk_buffer::top = nullptr;
--- a/liboctave/util/oct-mutex.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/oct-mutex.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -162,15 +162,15 @@
 
 #endif
 
-  static octave::base_mutex *
+  static base_mutex *
   init_rep (void)
   {
 #if defined (OCTAVE_USE_WINDOWS_API)
-    return new octave::w32_mutex ();
+    return new w32_mutex ();
 #elif defined (HAVE_PTHREAD_H)
-    return new octave::pthread_mutex ();
+    return new pthread_mutex ();
 #else
-    return new octave::base_mutex ();
+    return new base_mutex ();
 #endif
   }
 
--- a/liboctave/util/oct-mutex.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/oct-mutex.h	Mon Jun 26 09:05:37 2017 -0400
@@ -48,7 +48,7 @@
     virtual bool try_lock (void);
 
   private:
-    octave::refcount<int> count;
+    refcount<int> count;
   };
 
   class
@@ -153,7 +153,7 @@
 
     static bool is_thread (void);
 
-    OCTAVE_DEPRECATED (4.4, "use 'octave::is_thread' instead")
+    OCTAVE_DEPRECATED (4.4, "use 'is_thread' instead")
     static bool is_octave_thread (void) { return is_thread (); }
   };
 }
--- a/liboctave/util/oct-shlib.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/oct-shlib.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -77,7 +77,7 @@
   bool
   dynamic_library::dynlib_rep::is_out_of_date (void) const
   {
-    octave::sys::file_stat fs (file);
+    sys::file_stat fs (file);
     return (fs && fs.is_newer (tm_loaded));
   }
 
@@ -85,7 +85,7 @@
   dynamic_library::dynlib_rep::fake_reload (void)
   {
     // We can't actually reload the library, but we'll pretend we did.
-    octave::sys::file_stat fs (file);
+    sys::file_stat fs (file);
     if (fs && fs.is_newer (tm_loaded))
       {
         tm_loaded = fs.mtime ();
@@ -352,7 +352,7 @@
   octave_w32_shlib::octave_w32_shlib (const std::string& f)
     : dynamic_library::dynlib_rep (f), handle (0)
   {
-    std::string dir = octave::sys::file_ops::dirname (f);
+    std::string dir = sys::file_ops::dirname (f);
 
     set_dll_directory (dir);
 
--- a/liboctave/util/oct-shlib.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/oct-shlib.h	Mon Jun 26 09:05:37 2017 -0400
@@ -74,7 +74,7 @@
 
       static dynlib_rep * get_instance (const std::string& f, bool fake);
 
-      octave::sys::time time_loaded (void) const
+      sys::time time_loaded (void) const
       { return tm_loaded; }
 
       std::string file_name (void) const
@@ -92,14 +92,14 @@
 
     public:
 
-      octave::refcount<int> count;
+      refcount<int> count;
 
     protected:
 
       void fake_reload (void);
 
       std::string file;
-      octave::sys::time tm_loaded;
+      sys::time tm_loaded;
 
       // Set of hooked function names.
       typedef std::map<std::string, size_t>::iterator fcn_names_iterator;
@@ -190,7 +190,7 @@
     std::string file_name (void) const
     { return rep->file_name (); }
 
-    octave::sys::time time_loaded (void) const
+    sys::time time_loaded (void) const
     { return rep->time_loaded (); }
 
   private:
--- a/liboctave/util/pathsearch.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/pathsearch.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -123,7 +123,7 @@
 
     if (! octave_kpse_initialized)
       {
-        std::string val = octave::sys::env::getenv ("KPATHSEA_DEBUG");
+        std::string val = sys::env::getenv ("KPATHSEA_DEBUG");
 
         if (! val.empty ())
           kpse_debug |= atoi (val.c_str ());
--- a/liboctave/util/url-transfer.cc	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/url-transfer.cc	Mon Jun 26 09:05:37 2017 -0400
@@ -50,20 +50,20 @@
   void
   base_url_transfer::delete_file (const std::string& file)
   {
-    octave::sys::unlink (file);
+    sys::unlink (file);
   }
 
   void
   base_url_transfer::mget_directory (const std::string& directory,
                                      const std::string& target)
   {
-    std::string sep = octave::sys::file_ops::dir_sep_str ();
-    octave::sys::file_stat fs (directory);
+    std::string sep = sys::file_ops::dir_sep_str ();
+    sys::file_stat fs (directory);
 
     if (! fs || ! fs.is_dir ())
       {
         std::string msg;
-        int status = octave::sys::mkdir (directory, 0777, msg);
+        int status = sys::mkdir (directory, 0777, msg);
 
         if (status < 0)
           {
@@ -78,7 +78,7 @@
 
     if (good ())
       {
-        octave::unwind_protect_safe frame;
+        unwind_protect_safe frame;
 
         frame.add_fcn (reset_path, this);
 
@@ -108,7 +108,7 @@
                     break;
                   }
 
-                octave::unwind_protect_safe frame2;
+                unwind_protect_safe frame2;
 
                 frame2.add_fcn (delete_file, realfile);
 
@@ -134,7 +134,7 @@
 
     std::string realdir
       = (base.empty ()
-         ? directory : base + octave::sys::file_ops::dir_sep_str () + directory);
+         ? directory : base + sys::file_ops::dir_sep_str () + directory);
 
     mkdir (directory);
 
@@ -145,11 +145,11 @@
 
     if (good ())
       {
-        octave::unwind_protect_safe frame;
+        unwind_protect_safe frame;
 
         frame.add_fcn (reset_path, this);
 
-        octave::sys::dir_entry dirlist (realdir);
+        sys::dir_entry dirlist (realdir);
 
         if (dirlist)
           {
@@ -162,8 +162,8 @@
                 if (file == "." || file == "..")
                   continue;
 
-                std::string realfile = realdir + octave::sys::file_ops::dir_sep_str () + file;
-                octave::sys::file_stat fs (realfile);
+                std::string realfile = realdir + sys::file_ops::dir_sep_str () + file;
+                sys::file_stat fs (realfile);
 
                 if (! fs.exists ())
                   {
@@ -416,7 +416,7 @@
     {
       struct curl_slist *slist = nullptr;
 
-      octave::unwind_protect frame;
+      unwind_protect frame;
       frame.add_fcn (curl_slist_free_all, slist);
 
       std::string cmd = "rnfr " + oldname;
@@ -584,7 +584,7 @@
 
       struct curl_slist *slist = nullptr;
 
-      octave::unwind_protect frame;
+      unwind_protect frame;
       frame.add_fcn (curl_slist_free_all, slist);
 
       slist = curl_slist_append (slist, "pwd");
@@ -748,7 +748,7 @@
     {
       struct curl_slist *slist = nullptr;
 
-      octave::unwind_protect frame;
+      unwind_protect frame;
 
       frame.add_fcn (curl_slist_free_all, slist);
 
--- a/liboctave/util/url-transfer.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/liboctave/util/url-transfer.h	Mon Jun 26 09:05:37 2017 -0400
@@ -152,7 +152,7 @@
   protected:
 
     // Reference count.
-    octave::refcount<size_t> count;
+    refcount<size_t> count;
 
     // Host for ftp transfers or full URL for http requests.
     std::string host_or_url;
--- a/oct-conf-post.in.h	Mon Jun 26 09:02:21 2017 -0400
+++ b/oct-conf-post.in.h	Mon Jun 26 09:05:37 2017 -0400
@@ -50,7 +50,15 @@
 #  define OCTAVE_UNUSED
 #endif
 
-#define OCTAVE_USE_DEPRECATED_FUNCTIONS 1
+/* This macro could have a better name...  It is intended to be used
+   only to enable inline functions or typedefs that provide access to
+   symbols that have been moved to the octave namespace.  It may be
+   temporarily useful to define this macro when moving a symbol to the
+   octave namespace but it should not be defined when building
+   released versions of Octave, as building those should not require
+   deprecated symbols.  It is defined in octave-config.h, so users of
+   Octave may continue to access symbols using the deprecated names.  */
+/* #undef OCTAVE_USE_DEPRECATED_FUNCTIONS */
 
 #if defined (__cplusplus)
 template <typename T>