# HG changeset patch # User John W. Eaton # Date 1637773312 18000 # Node ID 2d80e308b9e48c03c62b94463852770268bb21e0 # Parent eff73c13fcf3f506c515c877e544448678449ab4# Parent 2e733d9ce10e30c533ce2c2ee8ac34cfafae5202 maint: Merge stable to default. diff -r 2e733d9ce10e -r 2d80e308b9e4 configure.ac --- a/configure.ac Wed Nov 24 11:58:02 2021 -0500 +++ b/configure.ac Wed Nov 24 12:01:52 2021 -0500 @@ -27,7 +27,7 @@ ### Initialize Autoconf AC_PREREQ([2.65]) -AC_INIT([GNU Octave], [7.0.1], [https://octave.org/bugs.html], [octave], +AC_INIT([GNU Octave], [8.0.0], [https://octave.org/bugs.html], [octave], [https://www.gnu.org/software/octave/]) ### Declare version numbers @@ -39,9 +39,9 @@ ## explains how to update these numbers for release and development ## versions. -OCTAVE_MAJOR_VERSION=7 +OCTAVE_MAJOR_VERSION=8 OCTAVE_MINOR_VERSION=0 -OCTAVE_PATCH_VERSION=1 +OCTAVE_PATCH_VERSION=0 dnl PACKAGE_VERSION is set by the AC_INIT VERSION argument. OCTAVE_VERSION="$PACKAGE_VERSION" diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/error.cc --- a/libinterp/corefcn/error.cc Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/error.cc Wed Nov 24 12:01:52 2021 -0500 @@ -2187,8 +2187,3 @@ } OCTAVE_NAMESPACE_END - -// Deprecated variables and functions. - -// This variable is obsolete and always has the value 0. -int error_state = 0; diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/error.h --- a/libinterp/corefcn/error.h Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/error.h Wed Nov 24 12:01:52 2021 -0500 @@ -566,14 +566,6 @@ octave::interpreter_try (uwp); } -OCTAVE_DEPRECATED (6, "this function is obsolete and should not be needed") -inline void reset_error_handler (void) { } #endif -// This symbol must have be declared with the correct visibility -// attributes when Octave is built, so it must appear unconditionally in -// this header file. -OCTAVE_DEPRECATED (6, "this variable is obsolete and always has the value 0") -extern OCTINTERP_API int error_state; - #endif diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/errwarn.h --- a/libinterp/corefcn/errwarn.h Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/errwarn.h Wed Nov 24 12:01:52 2021 -0500 @@ -188,11 +188,4 @@ extern OCTINTERP_API void warn_wrong_type_arg (const char *name, const octave_value& tc); -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) -OCTAVE_DEPRECATED (6, "this function will be removed in a future version of Octave") -inline void -warn_divide_by_zero (void) -{ } #endif - -#endif diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/file-io.h --- a/libinterp/corefcn/file-io.h Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/file-io.h Wed Nov 24 12:01:52 2021 -0500 @@ -46,20 +46,4 @@ OCTAVE_NAMESPACE_END -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) - -OCTAVE_DEPRECATED (6, "use 'interpreter::mark_for_deletion' instead") -inline void mark_for_deletion (const std::string& fname) -{ - octave::mark_for_deletion_deprecated (fname); -} - -OCTAVE_DEPRECATED (6, "use 'interpreter::cleanup_tmp_files' instead") -inline void cleanup_tmp_files (void) -{ - octave::cleanup_tmp_files_deprecated (); -} - #endif - -#endif diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/graphics-toolkit.h --- a/libinterp/corefcn/graphics-toolkit.h Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/graphics-toolkit.h Wed Nov 24 12:01:52 2021 -0500 @@ -284,12 +284,4 @@ }; } -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) -OCTAVE_DEPRECATED (6, "use 'octave::graphics_toolkit' instead") -typedef octave::graphics_toolkit graphics_toolkit; - -OCTAVE_DEPRECATED (6, "use 'octave::base_graphics_toolkit' instead") -typedef octave::base_graphics_toolkit base_graphics_toolkit; #endif - -#endif diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/input.cc --- a/libinterp/corefcn/input.cc Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/input.cc Wed Nov 24 12:01:52 2021 -0500 @@ -89,11 +89,6 @@ // the next user prompt. bool Vdrawnow_requested = false; -// TRUE if we are recording line numbers in a source file. -// Always true except when debugging and taking input directly from -// the terminal. -bool Vtrack_line_num = true; - OCTAVE_NAMESPACE_BEGIN static std::string diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/input.h --- a/libinterp/corefcn/input.h Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/input.h Wed Nov 24 12:01:52 2021 -0500 @@ -48,11 +48,6 @@ // the next user prompt. extern OCTINTERP_API bool Vdrawnow_requested; -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) -OCTAVE_DEPRECATED (6, "'Vtrack_line_num' is an obsolete internal variable; any uses should be removed") -extern OCTINTERP_API bool Vtrack_line_num; -#endif - extern OCTINTERP_API octave::sys::time Vlast_prompt_time; class octave_value; diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/interpreter.cc --- a/libinterp/corefcn/interpreter.cc Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/interpreter.cc Wed Nov 24 12:01:52 2021 -0500 @@ -56,7 +56,6 @@ #include "display.h" #include "error.h" #include "event-manager.h" -#include "file-io.h" #include "graphics.h" #include "help.h" #include "input.h" @@ -1998,24 +1997,6 @@ return found; } - // Remove when corresponding public deprecated function is removed. - void interpreter::add_atexit_function_deprecated (const std::string& fname) - { - interpreter& interp - = __get_interpreter__ ("interpreter::add_atexit_function"); - - interp.add_atexit_fcn (fname); - } - - // Remove when corresponding public deprecated function is removed. - bool interpreter::remove_atexit_function_deprecated (const std::string& fname) - { - interpreter& interp - = __get_interpreter__ ("interpreter::remove_atexit_function"); - - return interp.remove_atexit_fcn (fname); - } - // What internal options get configured by --traditional. void interpreter::maximum_braindamage (void) diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/interpreter.h --- a/libinterp/corefcn/interpreter.h Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/interpreter.h Wed Nov 24 12:01:52 2021 -0500 @@ -538,30 +538,6 @@ bool remove_atexit_fcn (const std::string& fname); - private: - - // Remove when corresponding public deprecated function is removed. - static void add_atexit_function_deprecated (const std::string& fname); - - // Remove when corresponding public deprecated function is removed. - static bool remove_atexit_function_deprecated (const std::string& fname); - - public: - -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) - OCTAVE_DEPRECATED (6, "use interpreter::add_atexit_fcn member function instead") - static void add_atexit_function (const std::string& fname) - { - add_atexit_function_deprecated (fname); - } - - OCTAVE_DEPRECATED (6, "use interpreter::remove_atexit_fcn member function instead") - static bool remove_atexit_function (const std::string& fname) - { - return remove_atexit_function_deprecated (fname); - } - #endif - static interpreter * the_interpreter (void) { return m_instance; } private: diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/symtab.cc --- a/libinterp/corefcn/symtab.cc Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/symtab.cc Wed Nov 24 12:01:52 2021 -0500 @@ -722,98 +722,6 @@ return octave_value (info_map); } - // Remove when corresponding public deprecated function is removed. - bool symbol_table::at_top_level_deprecated (void) - { - return m_interpreter.at_top_level (); - } - - // Remove when corresponding public deprecated function is removed. - octave_value symbol_table::varval_deprecated (const std::string& name) const - { - return m_interpreter.varval (name); - } - - // Remove when corresponding public deprecated function is removed. - octave_value symbol_table::global_varval_deprecated (const std::string& name) const - { - return m_interpreter.global_varval (name); - } - - // Remove when corresponding public deprecated function is removed. - octave_value symbol_table::top_level_varval_deprecated (const std::string& name) const - { - return m_interpreter.top_level_varval (name); - } - - // Remove when corresponding public deprecated function is removed. - std::list symbol_table::global_variable_names_deprecated (void) - { - return m_interpreter.global_variable_names (); - } - - // Remove when corresponding public deprecated function is removed. - std::list symbol_table::top_level_variable_names_deprecated (void) - { - return m_interpreter.top_level_variable_names (); - } - - // Remove when corresponding public deprecated function is removed. - std::list symbol_table::variable_names_deprecated (void) - { - return m_interpreter.variable_names (); - } - - // Remove when corresponding public deprecated function is removed. - void symbol_table::assign_deprecated (const std::string& name, const octave_value& value) - { - return m_interpreter.assign (name, value); - } - - // Remove when corresponding public deprecated function is removed. - void symbol_table::clear_all_deprecated (bool force) - { - return m_interpreter.clear_all (force); - } - - // Remove when corresponding public deprecated function is removed. - void symbol_table::clear_global_deprecated (const std::string& name) - { - return m_interpreter.clear_global_variable (name); - } - - // Remove when corresponding public deprecated function is removed. - void symbol_table::clear_global_pattern_deprecated (const std::string& pattern) - { - return m_interpreter.clear_global_variable_pattern (pattern); - } - - // Remove when corresponding public deprecated function is removed. - void symbol_table::clear_symbol_deprecated (const std::string& name) - { - return m_interpreter.clear_symbol (name); - } - - // Remove when corresponding public deprecated function is removed. - void symbol_table::clear_symbol_pattern_deprecated (const std::string& pattern) - { - return m_interpreter.clear_symbol_pattern (pattern); - } - - // Remove when corresponding public deprecated function is removed. - void symbol_table::global_assign_deprecated (const std::string& name, - const octave_value& value) - { - return m_interpreter.global_assign (name, value); - } - - // Remove when corresponding public deprecated function is removed. - void symbol_table::top_level_assign_deprecated (const std::string& name, - const octave_value& value) - { - return m_interpreter.top_level_assign (name, value); - } - DEFMETHOD (__dump_symtab_info__, interp, args, , doc: /* -*- texinfo -*- @deftypefn {} {} __dump_symtab_info__ () diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/symtab.h --- a/libinterp/corefcn/symtab.h Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/symtab.h Wed Nov 24 12:01:52 2021 -0500 @@ -185,170 +185,6 @@ fcn_info * get_fcn_info (const std::string& name); - // The remaining functions are all provided for backward - // compatibility. New code should use the functions provided by the - // interpreter class. - - private: - - // Remove when corresponding public deprecated function is removed. - bool at_top_level_deprecated (void); - - // Remove when corresponding public deprecated function is removed. - octave_value varval_deprecated (const std::string& name) const; - - // Remove when corresponding public deprecated function is removed. - octave_value global_varval_deprecated (const std::string& name) const; - - // Remove when corresponding public deprecated function is removed. - octave_value top_level_varval_deprecated (const std::string& name) const; - - // Remove when corresponding public deprecated function is removed. - std::list global_variable_names_deprecated (void); - - // Remove when corresponding public deprecated function is removed. - std::list top_level_variable_names_deprecated (void); - - // Remove when corresponding public deprecated function is removed. - std::list variable_names_deprecated (void); - - // Remove when corresponding public deprecated function is removed. - void assign_deprecated (const std::string& name, - const octave_value& value = octave_value ()); - - // Remove when corresponding public deprecated function is removed. - // Note, FORCE_ADD no longer has any meaning. - void assign_deprecated (const std::string& name, const octave_value& value, - bool /*force_add*/); - - // Remove when corresponding public deprecated function is removed. - void clear_all_deprecated (bool force = false); - - // Remove when corresponding public deprecated function is removed. - void clear_global_deprecated (const std::string& name); - - // Remove when corresponding public deprecated function is removed. - void clear_global_pattern_deprecated (const std::string& pattern); - - // Remove when corresponding public deprecated function is removed. - void clear_symbol_deprecated (const std::string& name); - - // Remove when corresponding public deprecated function is removed. - void clear_symbol_pattern_deprecated (const std::string& pattern); - - // Remove when corresponding public deprecated function is removed. - void global_assign_deprecated (const std::string& name, - const octave_value& value = octave_value ()); - - // Remove when corresponding public deprecated function is removed. - void top_level_assign_deprecated (const std::string& name, - const octave_value& value = octave_value ()); - - public: - -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) - OCTAVE_DEPRECATED (6, "use 'interpreter::at_top_level' instead") - bool at_top_level (void) - { - return at_top_level_deprecated (); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::varval' instead") - octave_value varval (const std::string& name) const - { - return varval_deprecated (name); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::global_varval' instead") - octave_value global_varval (const std::string& name) const - { - return global_varval_deprecated (name); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::top_level_varval' instead") - octave_value top_level_varval (const std::string& name) const - { - return top_level_varval_deprecated (name); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::global_variable_names' instead") - std::list global_variable_names (void) - { - return global_variable_names_deprecated (); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::top_level_variable_names' instead") - std::list top_level_variable_names (void) - { - return top_level_variable_names_deprecated (); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::variable_names' instead") - std::list variable_names (void) - { - return variable_names_deprecated (); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::assign' instead") - void assign (const std::string& name, - const octave_value& value = octave_value ()) - { - assign_deprecated (name, value); - } - - // Note, FORCE_ADD no longer has any meaning. - OCTAVE_DEPRECATED (6, "use 'interpreter::assign' instead") - void assign (const std::string& name, const octave_value& value, - bool /*force_add*/) - { - assign_deprecated (name, value); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::clear_all' instead") - void clear_all (bool force = false) - { - clear_all_deprecated (force); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::clear_global' instead") - void clear_global (const std::string& name) - { - clear_global_deprecated (name); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::clear_global_pattern' instead") - void clear_global_pattern (const std::string& pattern) - { - clear_global_pattern_deprecated (pattern); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::clear_symbol' instead") - void clear_symbol (const std::string& name) - { - clear_symbol_deprecated (name); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::clear_symbol_pattern' instead") - void clear_symbol_pattern (const std::string& pattern) - { - clear_symbol_pattern_deprecated (pattern); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::global_assign' instead") - void global_assign (const std::string& name, - const octave_value& value = octave_value ()) - { - global_assign_deprecated (name, value); - } - - OCTAVE_DEPRECATED (6, "use 'interpreter::top_level_assign' instead") - void top_level_assign (const std::string& name, - const octave_value& value = octave_value ()) - { - top_level_assign_deprecated (name, value); - } -#endif - private: interpreter& m_interpreter; diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/toplev.cc --- a/libinterp/corefcn/toplev.cc Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/toplev.cc Wed Nov 24 12:01:52 2021 -0500 @@ -54,7 +54,6 @@ #include "defaults.h" #include "defun.h" #include "error.h" -#include "file-io.h" #include "help.h" #include "interpreter-private.h" #include "octave.h" diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/variables.cc --- a/libinterp/corefcn/variables.cc Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/variables.cc Wed Nov 24 12:01:52 2021 -0500 @@ -1525,45 +1525,3 @@ } OCTAVE_NAMESPACE_END - -// DEPRECATED in Octave 6 - -octave_function * -extract_function (const octave_value& arg, const std::string& warn_for, - const std::string& fname, const std::string& header, - const std::string& trailer) -{ - octave_function *retval = is_valid_function (arg, warn_for, 0); - - if (! retval) - { - std::string s = arg.xstring_value ("%s: argument must be a string", - warn_for.c_str ()); - - std::string cmd = header; - cmd.append (s); - cmd.append (trailer); - - int parse_status; - - octave::interpreter& interp - = octave::__get_interpreter__ ("extract_function"); - - interp.eval_string (cmd, true, parse_status, 0); - - if (parse_status != 0) - error ("%s: '%s' is not valid as a function", - warn_for.c_str (), fname.c_str ()); - - retval = is_valid_function (fname, warn_for, 0); - - if (! retval) - error ("%s: '%s' is not valid as a function", - warn_for.c_str (), fname.c_str ()); - - warning ("%s: passing function body as a string is obsolete; please use anonymous functions", - warn_for.c_str ()); - } - - return retval; -} diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/corefcn/variables.h --- a/libinterp/corefcn/variables.h Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/corefcn/variables.h Wed Nov 24 12:01:52 2021 -0500 @@ -178,12 +178,6 @@ return octave::maybe_missing_function_hook (name); } -OCTAVE_DEPRECATED (6, "use 'octave::get_function_handle' instead") -extern OCTINTERP_API octave_function * -extract_function (const octave_value& arg, const std::string& warn_for, - const std::string& fname, const std::string& header, - const std::string& trailer); - #endif // The following macros should also be considered obsolete. diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/octave-value/ov-fcn-handle.cc --- a/libinterp/octave-value/ov-fcn-handle.cc Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/octave-value/ov-fcn-handle.cc Wed Nov 24 12:01:52 2021 -0500 @@ -3397,16 +3397,6 @@ OCTAVE_NAMESPACE_BEGIN - // DEPRECATED in Octave 6. - - octave_value - make_fcn_handle (interpreter& interp, const std::string& nm) - { - tree_evaluator& tw = interp.get_evaluator (); - - return tw.make_fcn_handle (nm); - } - DEFUN (functions, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{s} =} functions (@var{fcn_handle}) diff -r 2e733d9ce10e -r 2d80e308b9e4 libinterp/octave-value/ov-fcn-handle.h --- a/libinterp/octave-value/ov-fcn-handle.h Wed Nov 24 11:58:02 2021 -0500 +++ b/libinterp/octave-value/ov-fcn-handle.h Wed Nov 24 12:01:52 2021 -0500 @@ -373,14 +373,4 @@ extern bool is_equal_to (const octave_fcn_handle& fh1, const octave_fcn_handle& fh2); -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 2e733d9ce10e -r 2d80e308b9e4 liboctave/util/lo-array-errwarn.cc --- a/liboctave/util/lo-array-errwarn.cc Wed Nov 24 11:58:02 2021 -0500 +++ b/liboctave/util/lo-array-errwarn.cc Wed Nov 24 12:01:52 2021 -0500 @@ -301,21 +301,6 @@ "matrix singular to machine precision, rcond = %g", rcond); } } - - // DEPRECATED in Octave 6. - - // Complain of an index that is out of range, but we don't know matrix size - void - err_index_out_of_range (int nd, int dim, octave_idx_type idx, - octave_idx_type ext) - { - // The dim_vector setting here doesn't really make sense. However, - // this function has been deprecated and will be removed in version - // 8, so there's no need to attempt to fix it. - - throw out_of_range (std::to_string (idx), nd, dim, ext, - dim_vector (1, 1, 1, 1, 1, 1, 1)); - } } /* Tests in test/index.tst */ diff -r 2e733d9ce10e -r 2d80e308b9e4 liboctave/util/lo-array-errwarn.h --- a/liboctave/util/lo-array-errwarn.h Wed Nov 24 11:58:02 2021 -0500 +++ b/liboctave/util/lo-array-errwarn.h Wed Nov 24 12:01:52 2021 -0500 @@ -131,13 +131,6 @@ err_index_out_of_range (int ndims, int dim, octave_idx_type idx, octave_idx_type ext, const dim_vector& dv); -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) - OCTAVE_DEPRECATED (6, "use err_index_out_of_range (int, int, octave_idx_type, octave_idx_type, const dim_vector&) instead") - OCTAVE_NORETURN extern OCTAVE_API void - err_index_out_of_range (int ndims, int dim, octave_idx_type idx, - octave_idx_type ext); -#endif - OCTAVE_NORETURN extern OCTAVE_API void err_del_index_out_of_range (bool is1d, octave_idx_type iext, octave_idx_type ext); diff -r 2e733d9ce10e -r 2d80e308b9e4 liboctave/util/quit.cc --- a/liboctave/util/quit.cc Wed Nov 24 11:58:02 2021 -0500 +++ b/liboctave/util/quit.cc Wed Nov 24 12:01:52 2021 -0500 @@ -37,32 +37,11 @@ sig_atomic_t octave_interrupt_state = 0; -// DEPRECATED in Octave 6. -// This variable should never have been public. -sig_atomic_t octave_exception_state = 0; -// Use this variable internally until the functions that use it can be -// removed. -static sig_atomic_t internal_exception_state; - volatile sig_atomic_t octave_signal_caught = 0; void (*octave_signal_hook) (void) = nullptr; void (*octave_interrupt_hook) (void) = nullptr; -// DEPRECATED in Octave 6. -void (*octave_bad_alloc_hook) (void) = nullptr; - -// The octave_exception enum values were DEPRECATED in Octave 6. -// Use these values internally until the functions that use them can be -// removed. -enum octave_internal_exception -{ - octave_internal_no_exception = 0, - octave_internal_exec_exception = 1, - octave_internal_alloc_exception = 3, - octave_internal_quit_exception = 4 -}; - namespace octave { std::string execution_exception::stack_trace (void) const @@ -130,61 +109,3 @@ throw octave::interrupt_exception (); } } - -// DEPRECATED in Octave 6 -void -octave_throw_interrupt_exception (void) -{ - if (octave_interrupt_hook) - octave_interrupt_hook (); - - throw octave::interrupt_exception (); -} - -// DEPRECATED in Octave 6 -void -octave_throw_execution_exception (void) -{ - // FIXME: would a hook function be useful here? - - internal_exception_state = octave_internal_exec_exception; - - throw octave::execution_exception (); -} - -// DEPRECATED in Octave 6 -void -octave_throw_bad_alloc (void) -{ - internal_exception_state = octave_internal_alloc_exception; - - throw std::bad_alloc (); -} - -// DEPRECATED in Octave 6 -void -octave_rethrow_exception (void) -{ - if (octave_interrupt_state) - { - octave_interrupt_state = -1; - - throw octave::interrupt_exception (); - } - else - { - switch (internal_exception_state) - { - case octave_internal_exec_exception: - throw octave::execution_exception (); - break; - - case octave_internal_alloc_exception: - throw std::bad_alloc (); - break; - - default: - break; - } - } -} diff -r 2e733d9ce10e -r 2d80e308b9e4 liboctave/util/quit.h --- a/liboctave/util/quit.h Wed Nov 24 11:58:02 2021 -0500 +++ b/liboctave/util/quit.h Wed Nov 24 12:01:52 2021 -0500 @@ -224,29 +224,10 @@ */ extern OCTAVE_API sig_atomic_t octave_interrupt_state; -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) -OCTAVE_DEPRECATED (6, "'octave_exception_state' is an obsolete internal variable; any uses should be removed") -extern OCTAVE_API sig_atomic_t octave_exception_state; -#endif - extern OCTAVE_API volatile sig_atomic_t octave_signal_caught; extern OCTAVE_API void octave_handle_signal (void); -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) -OCTAVE_DEPRECATED (6, "use 'throw octave::interrupt_exception' instead") -OCTAVE_NORETURN extern OCTAVE_API void octave_throw_interrupt_exception (void); - -OCTAVE_DEPRECATED (6, "use 'throw octave::execution_exception' instead") -OCTAVE_NORETURN extern OCTAVE_API void octave_throw_execution_exception (void); - -OCTAVE_DEPRECATED (6, "use 'throw std::bad_alloc' instead") -OCTAVE_NORETURN extern OCTAVE_API void octave_throw_bad_alloc (void); - -OCTAVE_DEPRECATED (6, "use 'throw' instead") -extern OCTAVE_API void octave_rethrow_exception (void); -#endif - #if defined (__cplusplus) inline void octave_quit (void) @@ -312,11 +293,6 @@ extern OCTAVE_API void (*octave_signal_hook) (void); extern OCTAVE_API void (*octave_interrupt_hook) (void); -#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) -OCTAVE_DEPRECATED (6, "'octave_bad_alloc_hook' is obsolete and no longer used") -extern OCTAVE_API void (*octave_bad_alloc_hook) (void); #endif #endif - -#endif diff -r 2e733d9ce10e -r 2d80e308b9e4 scripts/deprecated/module.mk --- a/scripts/deprecated/module.mk Wed Nov 24 11:58:02 2021 -0500 +++ b/scripts/deprecated/module.mk Wed Nov 24 12:01:52 2021 -0500 @@ -4,8 +4,7 @@ %reldir%/.oct-config \ %reldir%/disable_diagonal_matrix.m \ %reldir%/disable_permutation_matrix.m \ - %reldir%/disable_range.m \ - %reldir%/runtests.m + %reldir%/disable_range.m %canon_reldir%dir = $(fcnfiledir)/deprecated diff -r 2e733d9ce10e -r 2d80e308b9e4 scripts/deprecated/runtests.m --- a/scripts/deprecated/runtests.m Wed Nov 24 11:58:02 2021 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -######################################################################## -## -## Copyright (C) 2010-2021 The Octave Project Developers -## -## See the file COPYRIGHT.md in the top-level directory of this -## distribution or . -## -## This file is part of Octave. -## -## Octave is free software: you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## . -## -######################################################################## - -## -*- texinfo -*- -## @deftypefn {} {} runtests () -## @deftypefnx {} {} runtests (@var{directory}) -## -## -## @code{runtests} is deprecated and will be removed in Octave version 8. -## Use @code{oruntests} instead. -## -## Execute built-in tests for all m-files in the specified @var{directory}. -## -## Test blocks in any C++ source files (@file{*.cc}) will also be executed -## for use with dynamically linked oct-file functions. -## -## If no directory is specified, operate on all directories in Octave's search -## path for functions. -## @seealso{oruntests, rundemos, test, path} -## @end deftypefn - -## FIXME: DEPRECATED: Remove in version 8. - -function runtests (varargin) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "runtests is obsolete and will be removed from a future version of Octave, please use oruntests instead\n"); - endif - - oruntests (varargin{:}); - -endfunction