# HG changeset patch # User John W. Eaton # Date 1628992226 14400 # Node ID 939bef0b66e075fbbfeccdb604cb54eb0bf6004d # Parent 9e35973fb6c037a2756e2264635f4dce3ca17262 merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks In files with both OCTAVE_NAMESPACE_BEGIN/END and "namespace octave" blocks, merge adjacent blocks. Use the macros in place of "namespace octave" in affected files and the corresponding header files. Files affected: call-stack.cc, call-stack.h, defaults.cc, defaults.h, defun-int.h, display.cc, display.h, environment.cc, environment.h, error.cc, error.h, event-manager.cc, event-manager.h, fcn-info.cc, fcn-info.h, help.cc, help.h, input.cc, input.h, interpreter.cc, interpreter.h, load-path.cc, load-path.h, load-save.cc, load-save.h, oct-hist.cc, oct-hist.h, pager.cc, pager.h, settings.cc, settings.h, sighandlers.cc, sighandlers.h, symtab.cc, symtab.h, sysdep.cc, sysdep.h, utils.cc, utils.h, __ode15__.cc, gzip.cc, ov-fcn-handle.cc, ov-fcn-handle.h, ov-java.cc, ov-java.h, ov-typeinfo.cc, ov-typeinfo.h, ov.cc, ov.h, octave.cc, octave.h, lex.ll, oct-parse.yy, profiler.cc, profiler.h, pt-eval.cc, and pt-eval.h. diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/call-stack.cc --- a/libinterp/corefcn/call-stack.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/call-stack.cc Sat Aug 14 21:50:26 2021 -0400 @@ -47,8 +47,8 @@ #include "symscope.h" #include "variables.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // Use static fields for the best efficiency. // NOTE: C++0x will allow these two to be merged into one. static const char *bt_fieldnames[] = @@ -1133,9 +1133,6 @@ { return m_cs[m_curr_frame]->get_auto_fcn_var (avt); } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (max_stack_depth, interp, args, nargout, doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/call-stack.h --- a/libinterp/corefcn/call-stack.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/call-stack.h Sat Aug 14 21:50:26 2021 -0400 @@ -44,8 +44,8 @@ #include "stack-frame.h" #include "symscope.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class tree_evaluator; class symbol_info_list; class unwind_protect; @@ -325,6 +325,7 @@ std::map m_global_values; }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/defaults.cc --- a/libinterp/corefcn/defaults.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/defaults.cc Sat Aug 14 21:50:26 2021 -0400 @@ -47,8 +47,8 @@ #include "default-defs.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + namespace config { // Variables that name directories or files are substituted into source @@ -447,9 +447,6 @@ return s_site_defaults_file; } } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (OCTAVE_HOME, args, , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/defaults.h --- a/libinterp/corefcn/defaults.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/defaults.h Sat Aug 14 21:50:26 2021 -0400 @@ -32,8 +32,8 @@ #include "pathsearch.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + namespace config { extern OCTINTERP_API std::string @@ -102,6 +102,7 @@ extern OCTINTERP_API std::string local_site_defaults_file (void); extern OCTINTERP_API std::string site_defaults_file (void); } -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/defun-int.h --- a/libinterp/corefcn/defun-int.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/defun-int.h Sat Aug 14 21:50:26 2021 -0400 @@ -36,12 +36,9 @@ class octave_value; -namespace octave -{ - class interpreter; -} +OCTAVE_NAMESPACE_BEGIN -OCTAVE_NAMESPACE_BEGIN +class interpreter; extern OCTINTERP_API void print_usage (void); @@ -67,10 +64,6 @@ // Gets the shlib of the currently executing DLD function, if any. extern OCTINTERP_API dynamic_library get_current_shlib (void); -OCTAVE_NAMESPACE_END - -namespace octave -{ // FIXME: this class doesn't seem to be used in Octave. Is it // really needed? @@ -86,7 +79,8 @@ auto_shlib (const dynamic_library& shl) : dynamic_library (shl) { } }; -} + +OCTAVE_NAMESPACE_END // Some of these functions are widely used, so maybe we should avoid // deprecating them for now? diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/display.cc --- a/libinterp/corefcn/display.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/display.cc Sat Aug 14 21:50:26 2021 -0400 @@ -37,8 +37,8 @@ #include "ov.h" #include "ovl.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + void display_info::initialize (void) { int avail = 0; @@ -52,9 +52,6 @@ if (msg) m_msg = msg; } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (have_window_system, interp, , , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/display.h --- a/libinterp/corefcn/display.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/display.h Sat Aug 14 21:50:26 2021 -0400 @@ -32,8 +32,8 @@ class Matrix; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class display_info { public: @@ -86,6 +86,7 @@ // m_dpy_avail is false. std::string m_msg; }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/environment.cc --- a/libinterp/corefcn/environment.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/environment.cc Sat Aug 14 21:50:26 2021 -0400 @@ -41,8 +41,8 @@ #include "interpreter.h" #include "variables.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + static void append_to_shell_path (const std::string& exec_path) { // FIXME: should there be a way to remove a previous setting from @@ -152,9 +152,6 @@ return image_path; } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (EDITOR, interp, args, nargout, doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/environment.h --- a/libinterp/corefcn/environment.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/environment.h Sat Aug 14 21:50:26 2021 -0400 @@ -33,8 +33,8 @@ class octave_value; class octave_value_list; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class environment { public: @@ -90,6 +90,7 @@ return old_val; } }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/error.cc --- a/libinterp/corefcn/error.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/error.cc Sat Aug 14 21:50:26 2021 -0400 @@ -233,8 +233,8 @@ return have_fmt; } -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + static octave_scalar_map init_warning_options (const std::string& state) { @@ -934,7 +934,8 @@ evmgr.display_exception (ee, m_beep_on_error); } -} + +OCTAVE_NAMESPACE_END void vmessage (const char *name, const char *fmt, va_list args) diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/error.h --- a/libinterp/corefcn/error.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/error.h Sat Aug 14 21:50:26 2021 -0400 @@ -37,13 +37,11 @@ #include "oct-map.h" class octave_value_list; -namespace octave -{ - class execution_exception; -} + +OCTAVE_NAMESPACE_BEGIN -namespace octave -{ +class execution_exception; + class error_system { public: @@ -401,7 +399,8 @@ //! The last file in which an error occurred. octave_map m_last_error_stack; }; -} + +OCTAVE_NAMESPACE_END // FIXME: should we move the following functions inside the octave // namespace? If so, should the functions outside of the namespace be diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/event-manager.cc --- a/libinterp/corefcn/event-manager.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/event-manager.cc Sat Aug 14 21:50:26 2021 -0400 @@ -44,8 +44,8 @@ #include "quit.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + static int readline_event_hook (void) { event_manager& evmgr = __get_event_manager__ ("octave_readline_hook"); @@ -188,9 +188,6 @@ if (enabled ()) instance->set_history (command_history::list ()); } -} - -OCTAVE_NAMESPACE_BEGIN // FIXME: Should the following function be __event_manager_desktop__ // with the desktop function implemented in a .m file, similar to the diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/event-manager.h --- a/libinterp/corefcn/event-manager.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/event-manager.h Sat Aug 14 21:50:26 2021 -0400 @@ -42,8 +42,8 @@ class octave_value; class string_vector; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + typedef std::function fcn_callback; typedef std::function meth_callback; @@ -779,6 +779,7 @@ bool debugging; bool link_enabled; }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/fcn-info.cc --- a/libinterp/corefcn/fcn-info.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/fcn-info.cc Sat Aug 14 21:50:26 2021 -0400 @@ -47,8 +47,8 @@ // since they were last compiled? static int Vignore_function_time_stamp = 1; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + octave_value fcn_info::fcn_info_rep::load_private_function (const std::string& dir_name) { @@ -1144,9 +1144,6 @@ return octave_value (info_map); } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (ignore_function_time_stamp, args, nargout, doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/fcn-info.h --- a/libinterp/corefcn/fcn-info.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/fcn-info.h Sat Aug 14 21:50:26 2021 -0400 @@ -37,8 +37,8 @@ #include "ovl.h" #include "symscope.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class fcn_info { public: @@ -365,6 +365,7 @@ extern octave_value dump_function_map (const std::map& fcn_map); -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/help.cc --- a/libinterp/corefcn/help.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/help.cc Sat Aug 14 21:50:26 2021 -0400 @@ -73,8 +73,8 @@ #include "default-defs.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + const static char * const operators[] = { "!", @@ -715,9 +715,6 @@ return help_sys.make_name_list (); } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (get_help_text, interp, args, , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/help.h --- a/libinterp/corefcn/help.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/help.h Sat Aug 14 21:50:26 2021 -0400 @@ -36,8 +36,8 @@ class octave_value; class octave_value_list; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class interpreter; class help_system @@ -202,6 +202,7 @@ }; extern string_vector make_name_list (void); -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/input.cc --- a/libinterp/corefcn/input.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/input.cc Sat Aug 14 21:50:26 2021 -0400 @@ -94,8 +94,8 @@ // the terminal. bool Vtrack_line_num = true; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + static std::string quoting_filename (const std::string& text, int, char quote) { @@ -1127,9 +1127,6 @@ return retval; } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (input, interp, args, nargout, doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/input.h --- a/libinterp/corefcn/input.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/input.h Sat Aug 14 21:50:26 2021 -0400 @@ -57,8 +57,8 @@ class octave_value; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class interpreter; class input_system @@ -308,6 +308,7 @@ std::shared_ptr m_rep; }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/interpreter.cc --- a/libinterp/corefcn/interpreter.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/interpreter.cc Sat Aug 14 21:50:26 2021 -0400 @@ -308,10 +308,6 @@ return ovl (interp.traditional ()); } -OCTAVE_NAMESPACE_END - -namespace octave -{ temporary_file_list::~temporary_file_list (void) { cleanup (); @@ -2062,4 +2058,5 @@ handle_exception (ee); } } -} + +OCTAVE_NAMESPACE_END diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/interpreter.h --- a/libinterp/corefcn/interpreter.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/interpreter.h Sat Aug 14 21:50:26 2021 -0400 @@ -70,8 +70,8 @@ #include "oct-time.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class profiler; class child_list; class push_parser; @@ -669,6 +669,7 @@ void execute_pkg_add (const std::string& dir); }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/load-path.cc --- a/libinterp/corefcn/load-path.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/load-path.cc Sat Aug 14 21:50:26 2021 -0400 @@ -49,8 +49,8 @@ #include "unwind-prot.h" #include "utils.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // Canonicalize file name (keeping the path relative) if it exists. // Return it unmodified otherwise. @@ -2399,9 +2399,6 @@ return retval; } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (genpath, args, , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/load-path.h --- a/libinterp/corefcn/load-path.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/load-path.h Sat Aug 14 21:50:26 2021 -0400 @@ -39,8 +39,8 @@ #include "pathsearch.h" #include "str-vec.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class OCTINTERP_API load_path @@ -578,6 +578,7 @@ extern std::string genpath (const std::string& dir, const string_vector& skip = "private"); -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/load-save.cc --- a/libinterp/corefcn/load-save.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/load-save.cc Sat Aug 14 21:50:26 2021 -0400 @@ -90,8 +90,8 @@ # include "zfstream.h" #endif -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + OCTAVE_NORETURN static void err_file_open (const std::string& fcn, const std::string& file) @@ -1536,18 +1536,6 @@ return retval; } -} - -void -dump_octave_core (void) -{ - octave::load_save_system& load_save_sys - = octave::__get_load_save_system__ ("dump_octave_core"); - - load_save_sys.dump_octave_core (); -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (load, interp, args, nargout, doc: /* -*- texinfo -*- @@ -2058,3 +2046,12 @@ } OCTAVE_NAMESPACE_END + +void +dump_octave_core (void) +{ + octave::load_save_system& load_save_sys + = octave::__get_load_save_system__ ("dump_octave_core"); + + load_save_sys.dump_octave_core (); +} diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/load-save.h --- a/libinterp/corefcn/load-save.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/load-save.h Sat Aug 14 21:50:26 2021 -0400 @@ -35,8 +35,8 @@ #include "ovl.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class interpreter; class load_save_format; class symbol_info; @@ -291,7 +291,8 @@ load_save_system::format_type m_type; int m_options; }; -} + +OCTAVE_NAMESPACE_END extern OCTINTERP_API void dump_octave_core (void); diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/oct-hist.cc --- a/libinterp/corefcn/oct-hist.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/oct-hist.cc Sat Aug 14 21:50:26 2021 -0400 @@ -70,8 +70,8 @@ #include "utils.h" #include "variables.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // Read the edited history lines from STREAM and return them // one at a time. This can read unlimited length lines. The // caller should free the storage. @@ -577,9 +577,6 @@ + sys::env::get_host_name () + '>'; } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (edit_history, interp, args, , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/oct-hist.h --- a/libinterp/corefcn/oct-hist.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/oct-hist.h Sat Aug 14 21:50:26 2021 -0400 @@ -34,8 +34,8 @@ #include "ovl.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class interpreter; class OCTINTERP_API history_system @@ -113,6 +113,7 @@ return old_val; } }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/pager.cc --- a/libinterp/corefcn/pager.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/pager.cc Sat Aug 14 21:50:26 2021 -0400 @@ -52,8 +52,8 @@ #include "utils.h" #include "variables.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + static bool pager_event_handler (pid_t pid, int status) { @@ -502,9 +502,6 @@ return output_sys.__diary__ (); } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (diary, interp, args, nargout, doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/pager.h --- a/libinterp/corefcn/pager.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/pager.h Sat Aug 14 21:50:26 2021 -0400 @@ -37,8 +37,8 @@ class octave_value_list; class oprocstream; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class interpreter; class @@ -308,7 +308,8 @@ extern OCTINTERP_API std::ostream& __stdout__ (void); extern OCTINTERP_API std::ostream& __diary__ (void); -} + +OCTAVE_NAMESPACE_END #define octave_stdout (octave::__stdout__ ()) diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/settings.cc --- a/libinterp/corefcn/settings.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/settings.cc Sat Aug 14 21:50:26 2021 -0400 @@ -34,8 +34,8 @@ #include "settings.h" #include "variables.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + settings::settings (void) : m_display_tokens (false), m_token_count (0), m_lexer_debug_flag (false) @@ -54,9 +54,6 @@ return set_internal_variable (m_lexer_debug_flag, args, nargout, "__lexer_debug_flag__"); } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (__display_tokens__, interp, args, nargout, doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/settings.h --- a/libinterp/corefcn/settings.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/settings.h Sat Aug 14 21:50:26 2021 -0400 @@ -33,8 +33,8 @@ class octave_value; class octave_value_list; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // Most settings for the interpreter are stored in the classes which // they affect (intput_system, output_system, load_path, etc. Some // don't really fit anywhere else. For example, there is no single @@ -91,6 +91,7 @@ // Internal variable for lexer debugging state. bool m_lexer_debug_flag = false; }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/sighandlers.cc --- a/libinterp/corefcn/sighandlers.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/sighandlers.cc Sat Aug 14 21:50:26 2021 -0400 @@ -58,8 +58,8 @@ #include "utils.h" #include "variables.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // Nonzero means we have already printed a message for this series of // SIGPIPES. We assume that the writer will eventually give up. int pipe_handler_error_count = 0; @@ -486,9 +486,6 @@ return m; } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (SIG, args, , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/sighandlers.h --- a/libinterp/corefcn/sighandlers.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/sighandlers.h Sat Aug 14 21:50:26 2021 -0400 @@ -40,8 +40,8 @@ #include "child-list.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // This type must match the typedef in signal-wrappers.h. typedef void sig_handler (int); @@ -80,6 +80,7 @@ // TRUE means we should try to enter the debugger on SIGINT. extern OCTINTERP_API bool Vdebug_on_interrupt; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/symtab.cc --- a/libinterp/corefcn/symtab.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/symtab.cc Sat Aug 14 21:50:26 2021 -0400 @@ -48,8 +48,8 @@ #include "symscope.h" #include "symtab.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + symbol_table::symbol_table (interpreter& interp) : m_interpreter (interp), m_fcn_table (), m_class_precedence_table (), m_parent_map () @@ -813,9 +813,6 @@ { return m_interpreter.top_level_assign (name, value); } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (__dump_symtab_info__, interp, args, , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/symtab.h --- a/libinterp/corefcn/symtab.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/symtab.h Sat Aug 14 21:50:26 2021 -0400 @@ -46,8 +46,8 @@ #include "ovl.h" #include "symscope.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class interpreter; class OCTINTERP_API symbol_table @@ -391,6 +391,7 @@ // This function is generated automatically by mk-builtins.pl. void install_builtins (void); }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/sysdep.cc --- a/libinterp/corefcn/sysdep.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/sysdep.cc Sat Aug 14 21:50:26 2021 -0400 @@ -103,8 +103,8 @@ #endif -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + #if defined (__386BSD__) || defined (__FreeBSD__) || defined (__NetBSD__) static void @@ -188,9 +188,6 @@ #endif } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (__open_with_system_app__, args, , doc: /* -*- texinfo -*- @@ -363,10 +360,6 @@ #endif } -OCTAVE_NAMESPACE_END - -namespace octave -{ #if defined (__MINGW32__) static void @@ -807,9 +800,6 @@ #endif } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (clc, , , doc: /* -*- texinfo -*- @@ -915,12 +905,8 @@ ## Test for unsetenv is in setenv test */ -OCTAVE_NAMESPACE_END - #if defined (OCTAVE_USE_WINDOWS_API) -namespace octave -{ static void reg_close_key_wrapper (HKEY key) { @@ -1006,12 +992,9 @@ return retval; } -} #endif -OCTAVE_NAMESPACE_BEGIN - DEFUN (winqueryreg, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{value} =} winqueryreg (@var{rootkey}, @var{subkey}, @var{valuename}) diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/sysdep.h --- a/libinterp/corefcn/sysdep.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/sysdep.h Sat Aug 14 21:50:26 2021 -0400 @@ -35,8 +35,8 @@ #include "lo-ieee.h" #include "lo-sysdep.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + extern OCTINTERP_API void sysdep_init (void); extern OCTINTERP_API void set_application_id (void); @@ -57,6 +57,7 @@ const std::string&); extern OCTINTERP_API bool drive_or_unc_share (const std::string&); -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/utils.cc --- a/libinterp/corefcn/utils.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/utils.cc Sat Aug 14 21:50:26 2021 -0400 @@ -70,8 +70,8 @@ #include "utils.h" #include "variables.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // Return TRUE if S is a valid identifier. bool valid_identifier (const char *s) @@ -90,9 +90,6 @@ { return valid_identifier (s.c_str ()); } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (isvarname, args, , doc: /* -*- texinfo -*- @@ -133,10 +130,6 @@ %!error isvarname ("foo", "bar") */ -OCTAVE_NAMESPACE_END - -namespace octave -{ bool make_valid_name (std::string& str, const make_valid_name_options& options) { @@ -257,9 +250,6 @@ error ("makeValidName: unknown property '%s'", parameter.c_str ()); } } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (__make_valid_name__, args, , doc: /* -*- texinfo -*- @@ -298,19 +288,12 @@ error ("makeValidName: STR must be a string or cellstr"); } -OCTAVE_NAMESPACE_END - -namespace octave -{ // Return TRUE if F and G are both names for the same file. bool same_file (const std::string& f, const std::string& g) { return same_file_internal (f, g); } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (is_same_file, args, , doc: /* -*- texinfo -*- @@ -422,10 +405,6 @@ %!error is_same_file ({"1", "2"}, {"1"; "2"}) */ -OCTAVE_NAMESPACE_END - -namespace octave -{ int almost_match (const std::string& std, const std::string& s, int min_match_len, int case_sens) { @@ -565,9 +544,6 @@ return retval; } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (file_in_loadpath, interp, args, , doc: /* -*- texinfo -*- @@ -710,10 +686,6 @@ %!error file_in_path (path (), "plot.m", "bar") */ -OCTAVE_NAMESPACE_END - -namespace octave -{ std::string file_in_path (const std::string& name, const std::string& suffix) { std::string nm = name; @@ -951,9 +923,6 @@ return retval; } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (do_string_escapes, args, , doc: /* -*- texinfo -*- @@ -1011,10 +980,6 @@ %!warning do_string_escapes ('\G'); */ -OCTAVE_NAMESPACE_END - -namespace octave -{ const char * undo_string_escape (char c) { if (! c) @@ -1071,9 +1036,6 @@ return retval; } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (undo_string_escapes, args, , doc: /* -*- texinfo -*- @@ -1343,10 +1305,6 @@ %!error errno_list ("foo") */ -OCTAVE_NAMESPACE_END - -namespace octave -{ static void check_dimensions (octave_idx_type& nr, octave_idx_type& nc, const char *warnfor) { @@ -1667,9 +1625,6 @@ } } } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (isindex, interp, args, , doc: /* -*- texinfo -*- @@ -1729,10 +1684,6 @@ %!error isindex (1:3, 2, 3) */ -OCTAVE_NAMESPACE_END - -namespace octave -{ octave_value_list do_simple_cellfun (octave_value_list (*fun) (const octave_value_list&, int), const char *fun_name, const octave_value_list& args, @@ -1814,9 +1765,6 @@ return retval; } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (isstudent, args, , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/corefcn/utils.h --- a/libinterp/corefcn/utils.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/corefcn/utils.h Sat Aug 14 21:50:26 2021 -0400 @@ -41,8 +41,8 @@ class octave_value_list; class string_vector; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + extern OCTINTERP_API bool valid_identifier (const char *s); extern OCTINTERP_API bool valid_identifier (const std::string& s); @@ -196,6 +196,7 @@ octave_value do_simple_cellfun (octave_value_list (*fun) (const octave_value_list&, int), const char *fun_name, const octave_value_list& args); -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/dldfcn/__ode15__.cc --- a/libinterp/dldfcn/__ode15__.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/dldfcn/__ode15__.cc Sat Aug 14 21:50:26 2021 -0400 @@ -80,8 +80,8 @@ # include # endif -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + # if ! defined (HAVE_IDASETJACFN) && defined (HAVE_IDADLSSETJACFN) static inline int IDASetJacFn (void *ida_mem, IDADlsJacFn jac) @@ -1242,12 +1242,9 @@ return retval; } -} + #endif - -OCTAVE_NAMESPACE_BEGIN - DEFUN_DLD (__ode15__, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{t}, @var{y} =} __ode15__ (@var{fun}, @var{tspan}, @var{y0}, @var{yp0}, @var{options}, @var{num_event_args}) diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/dldfcn/gzip.cc --- a/libinterp/dldfcn/gzip.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/dldfcn/gzip.cc Sat Aug 14 21:50:26 2021 -0400 @@ -83,8 +83,8 @@ # include #endif -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + //! RIIA wrapper for std::FILE*. //! //! If error handling is available for failing to close the file, use @@ -594,9 +594,6 @@ return octave_value (Cell (xzip (source_patterns, out_dir))); } } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN_DLD (gzip, args, , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/octave-value/ov-fcn-handle.cc --- a/libinterp/octave-value/ov-fcn-handle.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/octave-value/ov-fcn-handle.cc Sat Aug 14 21:50:26 2021 -0400 @@ -84,8 +84,7 @@ const std::string octave_fcn_handle::anonymous ("@"); -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN class invalid_fcn_handle : public base_fcn_handle { public: @@ -2808,7 +2807,8 @@ else return false; } -} + +OCTAVE_NAMESPACE_END octave_fcn_handle::octave_fcn_handle (void) : octave_base_value (), m_rep (new octave::invalid_fcn_handle ()) @@ -3394,8 +3394,8 @@ return false; } -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // DEPRECATED in Octave 6. octave_value @@ -3405,9 +3405,6 @@ return tw.make_fcn_handle (nm); } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (functions, args, , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/octave-value/ov-fcn-handle.h --- a/libinterp/octave-value/ov-fcn-handle.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/octave-value/ov-fcn-handle.h Sat Aug 14 21:50:26 2021 -0400 @@ -40,8 +40,8 @@ #include "stack-frame.h" #include "symscope.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class interpreter; class tree_evaluator; @@ -168,7 +168,8 @@ // The name of the file where the named function was defined. std::string m_file; }; -} + +OCTAVE_NAMESPACE_END class OCTINTERP_API @@ -372,13 +373,14 @@ extern bool is_equal_to (const octave_fcn_handle& fh1, const octave_fcn_handle& fh2); -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) OCTAVE_DEPRECATED (6, "use 'tree_evaluator::make_fcn_handle' instead") extern octave_value make_fcn_handle (interpreter& interp, const std::string& name); #endif -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/octave-value/ov-java.cc --- a/libinterp/octave-value/ov-java.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/octave-value/ov-java.cc Sat Aug 14 21:50:26 2021 -0400 @@ -223,8 +223,8 @@ bool Vjava_unsigned_autoconversion = true; bool Vdebug_java = false; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class JVMArgs { public: @@ -317,8 +317,8 @@ std::list java_opts; }; -} - + +OCTAVE_NAMESPACE_END //! The java initialization directory is given by the environment variable //! @c OCTAVE_JAVA_DIR if defined; otherwise it is the directory of Octave's @@ -400,7 +400,6 @@ return (classpath); } - //! Return the initial classpath. //! //! The initial classpath starts with a pointer to @c octave.jar which is @@ -535,13 +534,10 @@ #if defined (OCTAVE_USE_WINDOWS_API) -namespace octave -{ // Declare function defined in sysdep.cc extern LONG get_regkey_value (HKEY h_rootkey, const std::string subkey, const std::string name, octave_value& value); -} static std::string get_jvm_lib_path_from_registry () @@ -643,7 +639,6 @@ } #endif - //! Initialize the java virtual machine (jvm) and field #jvm if necessary. //! //! If the jvm exists and is initialized, #jvm points to it, i.e. is not 0 diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/octave-value/ov-java.h --- a/libinterp/octave-value/ov-java.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/octave-value/ov-java.h Sat Aug 14 21:50:26 2021 -0400 @@ -31,10 +31,11 @@ #include "ov.h" #include "ovl.h" -namespace octave -{ - class type_info; -} +OCTAVE_NAMESPACE_BEGIN + +class type_info; + +OCTAVE_NAMESPACE_END typedef void *voidptr; diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/octave-value/ov-typeinfo.cc --- a/libinterp/octave-value/ov-typeinfo.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/octave-value/ov-typeinfo.cc Sat Aug 14 21:50:26 2021 -0400 @@ -39,8 +39,8 @@ #include "ov-typeinfo.h" #include "ov.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // FIXME: we should also store all class names and provide a // way to list them (calling class with nargin == 0?). @@ -758,7 +758,8 @@ return retval; } -} + +OCTAVE_NAMESPACE_END namespace octave_value_typeinfo { diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/octave-value/ov-typeinfo.h --- a/libinterp/octave-value/ov-typeinfo.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/octave-value/ov-typeinfo.h Sat Aug 14 21:50:26 2021 -0400 @@ -37,8 +37,8 @@ class string_vector; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class OCTINTERP_API type_info @@ -267,7 +267,8 @@ Array widening_ops; }; -} + +OCTAVE_NAMESPACE_END namespace octave_value_typeinfo { diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/octave-value/ov.cc --- a/libinterp/octave-value/ov.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/octave-value/ov.cc Sat Aug 14 21:50:26 2021 -0400 @@ -2628,8 +2628,8 @@ return octave_value (rhs.empty_clone ()); } -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + OCTAVE_NORETURN static void err_binary_op (const std::string& on, const std::string& tn1, const std::string& tn2) @@ -3256,7 +3256,8 @@ return unary_op (ti, op, v); } -} + +OCTAVE_NAMESPACE_END void install_types (octave::type_info& ti) diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/octave-value/ov.h --- a/libinterp/octave-value/ov.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/octave-value/ov.h Sat Aug 14 21:50:26 2021 -0400 @@ -45,11 +45,12 @@ #include "oct-time.h" #include "str-vec.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class stack_frame; class type_info; -} + +OCTAVE_NAMESPACE_END class Cell; class float_format; @@ -1643,8 +1644,8 @@ // Non-member unary and binary operations on octave_value objects. -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + extern OCTINTERP_API octave_value unary_op (type_info& ti, octave_value::unary_op op, const octave_value& a); @@ -1692,7 +1693,8 @@ return colon_op (base, octave_value (), limit, is_for_cmd_expr); } -} + +OCTAVE_NAMESPACE_END #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) OCTAVE_DEPRECATED (7, "use 'octave::unary_op' instead") diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/octave.cc --- a/libinterp/octave.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/octave.cc Sat Aug 14 21:50:26 2021 -0400 @@ -54,8 +54,8 @@ #include "sysdep.h" #include "usage.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + cmdline_options::cmdline_options (void) { m_all_args.resize (1); @@ -426,9 +426,6 @@ return status; } -} - -OCTAVE_NAMESPACE_BEGIN DEFUN (isguirunning, args, , doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/octave.h --- a/libinterp/octave.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/octave.h Sat Aug 14 21:50:26 2021 -0400 @@ -36,8 +36,8 @@ class octave_value; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // Command line arguments. See also options.h. class OCTINTERP_API cmdline_options @@ -378,6 +378,7 @@ int execute (void); }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/parse-tree/lex.ll --- a/libinterp/parse-tree/lex.ll Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/parse-tree/lex.ll Sat Aug 14 21:50:26 2021 -0400 @@ -316,8 +316,8 @@ return c == ' ' || c == '\t' || c == '\n' || c == '\r'; } -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + bool iskeyword (const std::string& s) { // Parsing function names like "set.property_name" inside @@ -334,7 +334,8 @@ || s == "enumeration" || s == "events" || s == "methods" || s == "properties")); } -} + +OCTAVE_NAMESPACE_END %} @@ -2174,10 +2175,6 @@ */ -OCTAVE_NAMESPACE_END - -namespace octave -{ void lexical_feedback::symbol_table_context::clear (void) { @@ -2369,7 +2366,6 @@ const token *tok = m_tokens.front (); return tok ? tok->may_be_command () : false; } -} static bool looks_like_copyright (const std::string& s) @@ -2394,8 +2390,6 @@ return ((! s.empty ()) && (s[0] == '!')); } -namespace octave -{ void base_lexer::input_buffer::fill (const std::string& input, bool eof_arg) { @@ -2966,7 +2960,6 @@ || (m_nesting_level.is_brace () && ! m_looking_at_object_index.front ())); } -} static inline bool looks_like_bin (const char *s, int len) @@ -3030,8 +3023,6 @@ return octave_value (); } -namespace octave -{ template <> int base_lexer::handle_number<2> (void) @@ -4173,4 +4164,5 @@ return status; } -} + +OCTAVE_NAMESPACE_END diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/parse-tree/oct-parse.yy --- a/libinterp/parse-tree/oct-parse.yy Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/parse-tree/oct-parse.yy Sat Aug 14 21:50:26 2021 -0400 @@ -2563,8 +2563,8 @@ parser.bison_error (s); } -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class parse_exception : public std::runtime_error { public: @@ -5852,9 +5852,6 @@ return retval; } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (autoload, interp, args, , doc: /* -*- texinfo -*- @@ -5956,10 +5953,6 @@ return octave_value (interp.mfilename (opt)); } -OCTAVE_NAMESPACE_END - -namespace octave -{ // Execute the contents of a script file. For compatibility with // Matlab, also execute a function file by calling the function it // defines with no arguments and nargout = 0. @@ -5972,9 +5965,6 @@ interp.source_file (file_name, context, verbose, require_file); } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (source, interp, args, , doc: /* -*- texinfo -*- @@ -6009,10 +5999,6 @@ return octave_value_list (); } -OCTAVE_NAMESPACE_END - -namespace octave -{ //! Evaluate an Octave function (built-in or interpreted) and return //! the list of result values. //! @@ -6061,9 +6047,6 @@ return interp.feval (args, nargout); } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (feval, interp, args, nargout, doc: /* -*- texinfo -*- @@ -6156,10 +6139,6 @@ return retval; } -OCTAVE_NAMESPACE_END - -namespace octave -{ void cleanup_statement_list (tree_statement_list **lst) { @@ -6169,9 +6148,6 @@ *lst = nullptr; } } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (eval, interp, args, nargout, doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/parse-tree/profiler.cc --- a/libinterp/parse-tree/profiler.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/parse-tree/profiler.cc Sat Aug 14 21:50:26 2021 -0400 @@ -35,8 +35,8 @@ #include "pager.h" #include "profiler.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + profiler::stats::stats (void) : m_time (0.0), m_calls (0), m_recursive (false), m_parents (), m_children () @@ -381,9 +381,6 @@ m_active_fcn->add_time (t - m_last_time); } } -} - -OCTAVE_NAMESPACE_BEGIN // Enable or disable the profiler data collection. DEFMETHOD (__profiler_enable__, interp, args, , diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/parse-tree/profiler.h --- a/libinterp/parse-tree/profiler.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/parse-tree/profiler.h Sat Aug 14 21:50:26 2021 -0400 @@ -36,8 +36,8 @@ class octave_value; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class OCTINTERP_API profiler @@ -213,6 +213,7 @@ // it as a separate function. void add_current_time (void); }; -} + +OCTAVE_NAMESPACE_END #endif diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/parse-tree/pt-eval.cc --- a/libinterp/parse-tree/pt-eval.cc Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/parse-tree/pt-eval.cc Sat Aug 14 21:50:26 2021 -0400 @@ -71,8 +71,8 @@ #include "utils.h" #include "variables.h" -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + // Normal evaluator. class quit_debug_exception @@ -2232,9 +2232,6 @@ ref.assign (octave_value::op_asn_eq, octave_value ()); } } -} - -OCTAVE_NAMESPACE_BEGIN // END is documented in op-kw-docs. DEFCONSTMETHOD (end, interp, args, , @@ -2280,10 +2277,6 @@ %! assert (x(minus (minus (end, 1), 1)), 8); */ -OCTAVE_NAMESPACE_END - -namespace octave -{ octave_value_list tree_evaluator::convert_to_const_vector (tree_argument_list *args) { @@ -5096,9 +5089,6 @@ return full_name; } -} - -OCTAVE_NAMESPACE_BEGIN DEFMETHOD (max_recursion_depth, interp, args, nargout, doc: /* -*- texinfo -*- diff -r 9e35973fb6c0 -r 939bef0b66e0 libinterp/parse-tree/pt-eval.h --- a/libinterp/parse-tree/pt-eval.h Sat Aug 14 18:55:37 2021 -0400 +++ b/libinterp/parse-tree/pt-eval.h Sat Aug 14 21:50:26 2021 -0400 @@ -46,8 +46,8 @@ class octave_user_code; -namespace octave -{ +OCTAVE_NAMESPACE_BEGIN + class symbol_info_list; class symbol_scope; class tree_decl_elt; @@ -990,6 +990,7 @@ int m_index_position; int m_num_indices; }; -} + +OCTAVE_NAMESPACE_END #endif