diff libinterp/corefcn/interpreter.cc @ 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 4a62da62af09
children b29904962d2d
line wrap: on
line diff
--- 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.