Mercurial > octave
changeset 32151:72dcb1cef2c9
maint: Strip trailing whitespace from source files.
Modified files: NEWS.8.md, file-editor-tab.cc, call-stack.cc,
compile.cc, perms.cc, stack-frame.cc, ov-base.cc, ov-fcn-handle.cc,
ov-fcn-handle.h, ov-fcn.cc, ov-oncleanup.h, ov-range.cc, ov-range.h,
ov-ref.cc, ov-ref.h, ov-scalar.h, ov-struct.cc, ov-vm.h,
pt-bytecode-vm-internal.h, pt-bytecode-vm.cc, pt-bytecode-vm.h,
pt-bytecode-walk.cc, pt-eval.cc, isuniform.m, inputParser.m, xlim.m,
ylim.m, zlim.m, movfun.m, std.m, var.m, isstrprop.m, bench.m,
bench.py, bytecode.tst, bytecode_anon_handles.m, bytecode_cell.m,
bytecode_dountil.m, bytecode_end.m, bytecode_errors.m,
bytecode_eval_1.m, bytecode_for.m, bytecode_global_1.m, bytecode_if.m,
bytecode_leaks.m, bytecode_matrix.m, bytecode_multi_assign.m,
bytecode_persistant.m, bytecode_range.m, bytecode_trycatch.m,
bytecode_unwind.m, bytecode_while.m, bytecode_disp.m,
bytecode_disp.tst, parser.tst.
line wrap: on
line diff
--- a/etc/NEWS.8.md Mon Jun 19 20:07:05 2023 -0400 +++ b/etc/NEWS.8.md Mon Jun 19 23:21:41 2023 -0400 @@ -94,7 +94,7 @@ - Octave is now compatible with PCRE2 (UTF-8). PCRE2 is preferred over PCRE if both are installed. Configure with `--without-pcre2` if you prefer Octave to use PCRE in this case. - + - `mean` now internally processes data as type double to reduce likelihood of hitting overflow or precision limits with other types (bug #63848).
--- a/libgui/src/m-editor/file-editor-tab.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libgui/src/m-editor/file-editor-tab.cc Mon Jun 19 23:21:41 2023 -0400 @@ -1651,7 +1651,7 @@ { QString line (m_edit_area->text (i)); QRegularExpressionMatch match = rxc.match (line); - + if (match.hasMatch ()) { len = match.capturedLength (); // complete length
--- a/libinterp/corefcn/call-stack.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/corefcn/call-stack.cc Mon Jun 19 23:21:41 2023 -0400 @@ -1170,13 +1170,13 @@ m_cs[m_curr_frame]->set_auto_fcn_var (avt, val); } -void +void call_stack::set_nargin (int nargin) { m_cs[m_curr_frame]->set_nargin (nargin); } -void +void call_stack::set_nargout (int nargout) { m_cs[m_curr_frame]->set_nargout (nargout);
--- a/libinterp/corefcn/compile.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/corefcn/compile.cc Mon Jun 19 23:21:41 2023 -0400 @@ -189,15 +189,15 @@ { int nargin = args.length (); - // Unless a "profiler enabled" flag is added to the evaluator + // Unless a "profiler enabled" flag is added to the evaluator // the vm profiler need the debugger to be active for it to actually // be able to profile. if (!interp.get_evaluator ().debug_mode ()) - warning ("As a workaround atleast one breakpoint has to be set" + warning ("As a workaround atleast one breakpoint has to be set" " in any file (preferably not being profiled) for the profiler to actually profile anything."); std::string arg0; - + if (nargin >= 1) arg0 = args (0).string_value ();
--- a/libinterp/corefcn/perms.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/corefcn/perms.cc Mon Jun 19 23:21:41 2023 -0400 @@ -321,7 +321,7 @@ else // none of the above class criteria were met { warning ("perms: unable to permute for class %s", clname.c_str ()); - // retval stays empty + // retval stays empty } return ovl (retval); }
--- a/libinterp/corefcn/stack-frame.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/corefcn/stack-frame.cc Mon Jun 19 23:21:41 2023 -0400 @@ -97,7 +97,7 @@ m_nargin (nargin), m_nargout (nargout) { - // If the function scope has more variables now due to something adding e.g. + // If the function scope has more variables now due to something adding e.g. // a global too it after the compilation of the function was done we need // to resize the bytecode frame size. std::size_t n_syms = fcn->scope_num_symbols (); @@ -176,7 +176,7 @@ delete m_lazy_data->m_unwind_protect_frame; delete m_lazy_data; m_lazy_data = nullptr; - } + } } ~bytecode_fcn_stack_frame () @@ -187,7 +187,7 @@ size_t local_to_external_offset (size_t local_offset) const - { + { for (auto it : m_unwind_data->m_external_frame_offset_to_internal) { size_t local_tmp = it.second; @@ -213,12 +213,12 @@ // The offsets that are not in the original translation table are in the extra slots added dynamically return m_size + (external_offset - m_orig_size); } - + return it->second; } // Do an expensive check if the stack is in order. Call only during debugging. - void vm_dbg_check_scope () + void vm_dbg_check_scope () { symbol_scope scope = __get_interpreter__().get_current_scope (); auto symbols = scope.symbol_list (); @@ -244,14 +244,14 @@ error ("VM stack check failed: %s != %s\n", scope_name.c_str (), frame_name.c_str ()); if (scope_offset != frame_offset && frame_name != "") error ("VM stack check failed: %zu != %zu\n", scope_offset, frame_offset); - + if (internal_offset >= internal_size ()) internal_resize (internal_offset + 1); auto flag = get_scope_flag (scope_offset); if (flag == PERSISTENT || flag == GLOBAL) continue; - + octave_value ov1 = varval (sym_scope); octave_value ov2 = varval (scope_name); octave_value ov3 = varval (scope_offset); @@ -509,7 +509,7 @@ virtual octave_value get_active_bytecode_call_arg_names () { - + // Handle ARG_NAMES if (!m_unwind_data || !m_vm) return Cell {}; @@ -564,7 +564,7 @@ case stack_frame::IGNORED: if (!m_lazy_data) return {}; - else + else return m_lazy_data->m_ignored; case stack_frame::ARG_NAMES: { @@ -689,7 +689,7 @@ // Handle native int %nargout specially. Note that changing // the value of %nargout via the this ref wont work. - if (local_offset == 0) + if (local_offset == 0) return fake_dummy_nargout = octave_value {m_stack_start [0].i}; if (local_offset < stack_slots) { @@ -860,8 +860,8 @@ void display (bool follow = true) const; - int line () const - { + int line () const + { if (! m_vm) return -1; @@ -870,7 +870,7 @@ } int column () const - { + { if (! m_vm) return -1; @@ -1989,7 +1989,7 @@ stack_frame::create_bytecode (tree_evaluator& tw, octave_user_function *fcn, vm &vm, std::size_t index, const std::shared_ptr<stack_frame>& parent_link, - const std::shared_ptr<stack_frame>& static_link, + const std::shared_ptr<stack_frame>& static_link, int nargout, int nargin) { // If we have any cached shared_ptr to empty bytecode_fcn_stack_frame objects
--- a/libinterp/octave-value/ov-base.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-base.cc Mon Jun 19 23:21:41 2023 -0400 @@ -294,7 +294,7 @@ error ("Type error extracting for loop iterator double value for VM"); } -bool +bool octave_base_value::maybe_update_double (double) { return false;
--- a/libinterp/octave-value/ov-fcn-handle.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-fcn-handle.cc Mon Jun 19 23:21:41 2023 -0400 @@ -685,10 +685,10 @@ octave_function * get_cached_fcn (const octave_value_list&) { return m_fcn.function_value (); } // TODO: This is a hack to get uncompiled anonymous functions to be subsrefed in the VM - bool has_function_cache (void) const - { + bool has_function_cache (void) const + { octave_function *fn = m_fcn.function_value (); - return fn ? fn->is_compiled () : false; + return fn ? fn->is_compiled () : false; } protected: @@ -963,7 +963,7 @@ // simple_fcn_handle::call octave_function * simple_fcn_handle:: -get_cached_fcn (const octave_value_list &args) +get_cached_fcn (const octave_value_list &args) { if (m_cache.has_cached_function (args)) return m_cache.get_cached_fcn ();
--- a/libinterp/octave-value/ov-fcn-handle.h Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-fcn-handle.h Mon Jun 19 23:21:41 2023 -0400 @@ -156,7 +156,7 @@ virtual octave_function * get_cached_fcn (const octave_value_list&) { return nullptr; } - virtual bool + virtual bool has_function_cache (void) const { return false; } protected:
--- a/libinterp/octave-value/ov-fcn.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-fcn.cc Mon Jun 19 23:21:41 2023 -0400 @@ -152,7 +152,7 @@ set_cached_function (val, args, current_n_updated); return val; } - + val = symtab.find_function (m_fcn_name); if (val.is_function ()) { @@ -184,7 +184,7 @@ set_cached_function (val, args, current_n_updated); return fcn; } - + val = symtab.find_function (m_fcn_name); if (val.is_function ()) {
--- a/libinterp/octave-value/ov-oncleanup.h Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-oncleanup.h Mon Jun 19 23:21:41 2023 -0400 @@ -91,10 +91,10 @@ void call_object_destructor (); - void maybe_call_dtor () - { + void maybe_call_dtor () + { if (m_count == 1) - call_object_destructor (); + call_object_destructor (); } private:
--- a/libinterp/octave-value/ov-range.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-range.cc Mon Jun 19 23:21:41 2023 -0400 @@ -982,11 +982,11 @@ "trivial range", "double"); template <typename T> -bool +bool ov_range<T>::could_be_trivial_range () { return false; } template <> -bool +bool ov_range<double>::could_be_trivial_range () { octave_idx_type n = m_range.numel ();
--- a/libinterp/octave-value/ov-range.h Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-range.h Mon Jun 19 23:21:41 2023 -0400 @@ -76,7 +76,7 @@ { if (i < m_numel - 1) return m_base + static_cast<int> (i) * m_increment; - return m_base + (m_numel - 1) * m_increment; + return m_base + (m_numel - 1) * m_increment; } bool is_trivial_range () const { return true; };
--- a/libinterp/octave-value/ov-ref.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-ref.cc Mon Jun 19 23:21:41 2023 -0400 @@ -59,12 +59,12 @@ } octave_base_value * -octave_value_ref::unique_clone () +octave_value_ref::unique_clone () { return ref ().m_rep->unique_clone (); } -octave_value +octave_value octave_value_ref::simple_subsasgn (char type, octave_value_list& idx, const octave_value& rhs) { octave_value ans = ref ().m_rep->simple_subsasgn (type, idx, rhs);
--- a/libinterp/octave-value/ov-ref.h Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-ref.h Mon Jun 19 23:21:41 2023 -0400 @@ -83,7 +83,7 @@ octave_value deref (); octave_value & ref (); void set_value (octave_value val); - + bool is_global_ref () { return true; } private: @@ -104,7 +104,7 @@ octave_value deref (); octave_value & ref (); void set_value (octave_value val); - + bool is_persistent_ref () { return true; } private:
--- a/libinterp/octave-value/ov-scalar.h Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-scalar.h Mon Jun 19 23:21:41 2023 -0400 @@ -225,8 +225,8 @@ octave_value as_double_or_copy (void); - bool maybe_update_double (double d) - { + bool maybe_update_double (double d) + { if (m_count != 1) return false; scalar = d;
--- a/libinterp/octave-value/ov-struct.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-struct.cc Mon Jun 19 23:21:41 2023 -0400 @@ -1096,7 +1096,7 @@ return retval; } -octave_value +octave_value octave_struct::vm_extract_forloop_value (octave_idx_type counter) { // TODO: Maybe this is slow? Should preferably be done once per loop @@ -1126,7 +1126,7 @@ // One based indexing idx(iidx) = counter + 1; - return arg.index_op (idx).storable_value (); + return arg.index_op (idx).storable_value (); } DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_scalar_struct, "scalar struct",
--- a/libinterp/octave-value/ov-vm.h Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/octave-value/ov-vm.h Mon Jun 19 23:21:41 2023 -0400 @@ -36,7 +36,7 @@ // and need to have the same bit representation as // an octave_value. // -// A octave_value_vm object might not be assigned +// A octave_value_vm object might not be assigned // to itself or have a nullptr m_rep when being // assigned to.
--- a/libinterp/parse-tree/pt-bytecode-vm-internal.h Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/parse-tree/pt-bytecode-vm-internal.h Mon Jun 19 23:21:41 2023 -0400 @@ -203,7 +203,7 @@ (*sp++).i = static_cast<int>(error_type::INTERRUPT_EXC); \ goto unwind; \ } \ - + #define CATCH_EXECUTION_EXCEPTION \ catch (execution_exception& e) \ { \
--- a/libinterp/parse-tree/pt-bytecode-vm.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/parse-tree/pt-bytecode-vm.cc Mon Jun 19 23:21:41 2023 -0400 @@ -509,7 +509,7 @@ auto v_ls = opcodes_to_strings (bc); for (auto ls : v_ls) { - printf ("\t%5d: %s\n", ls.first, ls.second.c_str ()); + printf ("\t%5d: %s\n", ls.first, ls.second.c_str ()); } } @@ -851,7 +851,7 @@ } #if defined (__GNUC__) && defined (__x86_64__) - // We strongly suggest to GCC to put sp, ip and bsp in actual registers with + // We strongly suggest to GCC to put sp, ip and bsp in actual registers with // the "local register variable" extension. // // If GCC is not nudged to put these in registers, its register allocator @@ -1498,7 +1498,7 @@ int slot = arg0; unsigned char b0 = *ip++; unsigned char b1 = *ip++; - + octave_cached_value *ovb = static_cast<octave_cached_value*> (bsp[slot].ovb); if (ovb->is_defined () && ovb->cache_is_valid ()) { @@ -1642,7 +1642,7 @@ if (ov.is_maybe_function ()) { if (ov.is_undefined ()) // class objects are defined - ov_was_cmd = true; + ov_was_cmd = true; ip -= 2; // Rewind to slot so the state matches 'push_slot_nargoutn' and 'push_slot_dispatch'. goto cmd_fcn_or_undef_error; } @@ -2054,7 +2054,7 @@ { ip -= 1; int wide_opcode_offset = slot < 256 ? 0 : -1; // If WIDE is used, we need to look further back - + CHECK (ip[-2 + wide_opcode_offset] == static_cast<unsigned char> (INSTR::INDEX_ID_NARGOUT1)); ip[-2 + wide_opcode_offset] = static_cast<unsigned char> (INSTR::INDEX_ID1_MAT_1D); @@ -2684,7 +2684,7 @@ // Increase counter TOP ().i++; // Wraps to zero first iteration - + // Check if we done all iterations // n is second element on the stack if (TOP ().i == SEC ().i) @@ -3868,7 +3868,7 @@ slot = arg0; nargout = 0; } - + int n_args_on_stack = *ip++; // The object to index is before the args on the stack @@ -5545,7 +5545,7 @@ else if (0) debug_check_1b: onebyte_op = true; - + { int tmp_ip = ip - code; if (onebyte_op) @@ -5560,7 +5560,7 @@ { int64_t t1 = vm_profiler::unow (); - auto p = m_vm_profiler; + auto p = m_vm_profiler; if (!p) // Only happens as a race between m_profiler_enabled and m_vm_profiler goto debug_check_end; @@ -5920,7 +5920,7 @@ static octave_value xeval_for_numel (octave_value &ov, const std::string& type, const std::list<octave_value_list>& idx); // This function reimplements octave_lvalue::numel() -// TODO: octave_lvalue::numel() could be broken out or made static and used instead. But don't mess with that code +// TODO: octave_lvalue::numel() could be broken out or made static and used instead. But don't mess with that code // to keep the VM somewhat independent of other code. static int lhs_assign_numel (octave_value &ov, const std::string& type, const std::list<octave_value_list>& idx) { @@ -6430,7 +6430,7 @@ auto v_ip_s = map_fn_to_opcodes_stringrows[fn_name]; map<int, int> map_op_offset_to_src_line; - + for (auto ip_s : v_ip_s) { int ip = ip_s.first; @@ -6677,7 +6677,7 @@ break; } } - + vm_profiler_call call = m_shadow_call_stack.back (); m_shadow_call_stack.pop_back ();
--- a/libinterp/parse-tree/pt-bytecode-vm.h Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/parse-tree/pt-bytecode-vm.h Mon Jun 19 23:21:41 2023 -0400 @@ -480,7 +480,7 @@ type_info::binary_op_fcn m_fn_dbl_gr_eq = nullptr; type_info::binary_op_fcn m_fn_dbl_eq = nullptr; type_info::binary_op_fcn m_fn_dbl_neq = nullptr; - + type_info::unary_op_fcn m_fn_dbl_usub = nullptr; type_info::unary_op_fcn m_fn_dbl_not = nullptr; type_info::unary_op_fcn m_fn_bool_not = nullptr; @@ -535,7 +535,7 @@ error_data handle_error (error_type et); - static + static loc_entry find_loc (int ip, std::vector<octave::loc_entry> &loc_entries); octave_value_list execute_code (const octave_value_list &args, int root_nargout)
--- a/libinterp/parse-tree/pt-bytecode-walk.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/parse-tree/pt-bytecode-walk.cc Mon Jun 19 23:21:41 2023 -0400 @@ -146,7 +146,7 @@ } op->accept (*this); - } + } void visit_prefix_expression (tree_prefix_expression& e) { @@ -2061,7 +2061,7 @@ // Does the function output varargout? m_varargout = returns->takes_varargs (); - // "varargout" is not in the 'returns' list (if in the proper last position) + // "varargout" is not in the 'returns' list (if in the proper last position) // so add one to size if 'm_varargout' is true int n_returns = returns ? returns->size () + m_varargout: 0; @@ -2133,7 +2133,7 @@ MAYBE_PUSH_WIDE_OPEXT (slot_dummy); PUSH_CODE (INSTR::PUSH_SLOT_INDEXED); PUSH_SLOT (slot_dummy); - int slot = SLOT (name); + int slot = SLOT (name); MAYBE_PUSH_WIDE_OPEXT (slot); PUSH_CODE (INSTR::FORCE_ASSIGN); // Accepts undefined rhs PUSH_SLOT (slot); @@ -3750,7 +3750,7 @@ return m_n_locals - 1; } - + return it->second; } @@ -4694,7 +4694,7 @@ PUSH_SLOT (slot); // The for loop variable int need_after = CODE_SIZE (); PUSH_CODE_SHORT (-1); // Placeholder for after address - + LOC (loc_id).m_ip_end = CODE_SIZE (); LOC (loc_id).m_col = cmd.column (); LOC (loc_id).m_line = cmd.line ();
--- a/libinterp/parse-tree/pt-eval.cc Mon Jun 19 20:07:05 2023 -0400 +++ b/libinterp/parse-tree/pt-eval.cc Mon Jun 19 23:21:41 2023 -0400 @@ -2181,13 +2181,13 @@ m_call_stack.set_auto_fcn_var (avt, val); } -void +void tree_evaluator::set_nargin (int nargin) { m_call_stack.set_nargin (nargin); } -void +void tree_evaluator::set_nargout (int nargout) { m_call_stack.set_nargout (nargout); @@ -2199,7 +2199,7 @@ return m_call_stack.get_auto_fcn_var (avt); } -void +void tree_evaluator::set_active_bytecode_ip (int ip) { m_call_stack.set_active_bytecode_ip (ip); @@ -3520,7 +3520,7 @@ set_auto_fcn_var (stack_frame::IGNORED, ignored_outputs); octave_value_list ret; - + try { ret = vm.execute_code (args, nargout); } catch (std::exception &e) { @@ -3528,7 +3528,7 @@ { std::cout << e.what () << std::endl; // TODO: Replace with panic when the VM almost works - + // Some test code eats errors messages, so we print to stderr too. fprintf (stderr, "VM error %d: " "Exception in function %s escaped the VM\n", __LINE__, user_function.name ().c_str()); error("VM error %d: " "Exception in function %s escaped the VM\n", __LINE__, user_function.name ().c_str());
--- a/scripts/general/isuniform.m Mon Jun 19 20:07:05 2023 -0400 +++ b/scripts/general/isuniform.m Mon Jun 19 23:21:41 2023 -0400 @@ -68,12 +68,12 @@ endif ## Compare mean delta to individual deltas with a tolerance - d = diff (v, 1); + d = diff (v, 1); delta = mean (d); if (isnan (delta)) tf = false; else - tol = 4 * eps (max (abs (v))); + tol = 4 * eps (max (abs (v))); if (delta < tol) ## Switch to absolute tolerance for very small delta tol = eps (class (v));
--- a/scripts/miscellaneous/inputParser.m Mon Jun 19 20:07:05 2023 -0400 +++ b/scripts/miscellaneous/inputParser.m Mon Jun 19 23:21:41 2023 -0400 @@ -657,7 +657,7 @@ endif ## Implement setdiff() without calling out to function for performance. - typenames = {this.(type).name}(:); + typenames = {this.(type).name}(:); Resultnames = fieldnames (this.Results); [sorted, sidx] = sort ([typenames; Resultnames]); dups = strcmp (sorted(1:end-1), sorted(2:end));
--- a/scripts/plot/appearance/xlim.m Mon Jun 19 20:07:05 2023 -0400 +++ b/scripts/plot/appearance/xlim.m Mon Jun 19 23:21:41 2023 -0400 @@ -54,7 +54,7 @@ ## @item @qcode{"auto"} (default) ## Automatically calculate limits based on the plot data and the currently ## specified limit calculation method. -## +## ## @item @qcode{"manual"} ## Fix axis limits at current values. ## @end table @@ -65,7 +65,7 @@ ## @item @qcode{"tickaligned"} (default) ## Calculate limits that encompass all of the data and extend outwards to the ## nearest tick mark. -## +## ## @item @qcode{"tight"} ## Calculate limits that exactly fit the data range. ##
--- a/scripts/plot/appearance/ylim.m Mon Jun 19 20:07:05 2023 -0400 +++ b/scripts/plot/appearance/ylim.m Mon Jun 19 23:21:41 2023 -0400 @@ -54,7 +54,7 @@ ## @item @qcode{"auto"} (default) ## Automatically calculate limits based on the plot data and the currently ## specified limit calculation method. -## +## ## @item @qcode{"manual"} ## Fix axis limits at current values. ## @end table @@ -65,7 +65,7 @@ ## @item @qcode{"tickaligned"} (default) ## Calculate limits that encompass all of the data and extend outwards to the ## nearest tick mark. -## +## ## @item @qcode{"tight"} ## Calculate limits that exactly fit the data range. ##
--- a/scripts/plot/appearance/zlim.m Mon Jun 19 20:07:05 2023 -0400 +++ b/scripts/plot/appearance/zlim.m Mon Jun 19 23:21:41 2023 -0400 @@ -54,7 +54,7 @@ ## @item @qcode{"auto"} (default) ## Automatically calculate limits based on the plot data and the currently ## specified limit calculation method. -## +## ## @item @qcode{"manual"} ## Fix axis limits at current values. ## @end table @@ -65,7 +65,7 @@ ## @item @qcode{"tickaligned"} (default) ## Calculate limits that encompass all of the data and extend outwards to the ## nearest tick mark. -## +## ## @item @qcode{"tight"} ## Calculate limits that exactly fit the data range. ##
--- a/scripts/signal/movfun.m Mon Jun 19 20:07:05 2023 -0400 +++ b/scripts/signal/movfun.m Mon Jun 19 23:21:41 2023 -0400 @@ -633,7 +633,7 @@ ## outdim > dim %!error movfun (@(x) [min(x), max(x)], (1:10).', 3, "Outdim", 3) -## Test for correct return class based on output of function. +## Test for correct return class based on output of function. %!test <*63802> %! x = single (1:10); %! y = movfun (@mean, x, 3);
--- a/scripts/statistics/std.m Mon Jun 19 20:07:05 2023 -0400 +++ b/scripts/statistics/std.m Mon Jun 19 23:21:41 2023 -0400 @@ -102,7 +102,7 @@ ## NaN values from the calculation using any of the previously specified input ## argument combinations. The default value for @var{nanflag} is ## @qcode{"includenan"} which keeps NaN values in the calculation. To -## exclude NaN values set the value of @var{nanflag} to @qcode{"omitnan"}. +## exclude NaN values set the value of @var{nanflag} to @qcode{"omitnan"}. ## The output will still contain NaN values if @var{x} consists of all NaN ## values in the operating dimension. ##
--- a/scripts/statistics/var.m Mon Jun 19 20:07:05 2023 -0400 +++ b/scripts/statistics/var.m Mon Jun 19 23:21:41 2023 -0400 @@ -101,7 +101,7 @@ ## NaN values from the calculation using any of the previously specified input ## argument combinations. The default value for @var{nanflag} is ## @qcode{"includenan"} which keeps NaN values in the calculation. To -## exclude NaN values set the value of @var{nanflag} to @qcode{"omitnan"}. +## exclude NaN values set the value of @var{nanflag} to @qcode{"omitnan"}. ## The output will still contain NaN values if @var{x} consists of all NaN ## values in the operating dimension. ##
--- a/scripts/strings/isstrprop.m Mon Jun 19 20:07:05 2023 -0400 +++ b/scripts/strings/isstrprop.m Mon Jun 19 23:21:41 2023 -0400 @@ -108,7 +108,7 @@ elseif (! (isscalar (flag) && isreal (flag))) error ("isstrprop: FLAG must be a real scalar"); endif - force_cell_output = flag; + force_cell_output = flag; endif switch (prop)
--- a/test/compile-bench/bench-octave/bench.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile-bench/bench-octave/bench.m Mon Jun 19 23:21:41 2023 -0400 @@ -1,7 +1,7 @@ function bench (varargin) % The tests to run - % + % % {name, {arg_type, n}, ...} tests = { {"for_loop_empty", {"n", 206824596}, 1, {}},
--- a/test/compile-bench/bench-py3/bench.py Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile-bench/bench-py3/bench.py Mon Jun 19 23:21:41 2023 -0400 @@ -117,7 +117,7 @@ for i in range(cols): arr.append(random.gauss (0, 1)) return arr - + arr = array() for i in range (rows): arr_row = array('d') @@ -146,4 +146,4 @@ print (t[0].__name__ + " in %g s" % dt) if __name__ == "__main__": - main () \ No newline at end of file + main () \ No newline at end of file
--- a/test/compile/bytecode.tst Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode.tst Mon Jun 19 23:21:41 2023 -0400 @@ -23,7 +23,7 @@ ## ######################################################################## -## Just clear the cached string in __prog_output_assert__() and clear +## Just clear the cached string in __prog_output_assert__() and clear ## classes method lookups due to maybe bug %!test %! __prog_output_assert__ (""); @@ -55,7 +55,7 @@ %! clear all %! key = "2 2 2 11 30 10 30 5 0 0 double 1 2 1 2 double 30 11 5 0 0 double 1 2 1 2 double 11 11 12 13 1 1 double 14 1 1 double 11 11 5 13 1 1 double 14 1 1 double 11 3 3 3 2 2 2 313 ret32:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 ret32:1 ret32:ret32:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 take32:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 18 59 64 "; %! a = 313; -%! % Gets called to ensure anonymous functions calls with +%! % Gets called to ensure anonymous functions calls with %! % externally scoped variables work %! h = @() __printf_assert__ ("%d ", a); %! @@ -600,7 +600,7 @@ %! __compile bytecode_cdef_use clear; %! bytecode_cdef_use (); %! assert (__prog_output_assert__ (key)); -%! global cdef_foo_ctor_cnt; global cdef_foo_dtor_cnt; +%! global cdef_foo_ctor_cnt; global cdef_foo_dtor_cnt; %! assert (cdef_foo_ctor_cnt == cdef_foo_dtor_cnt); % Check, as many ctor and dtor executions %! %! __enable_vm_eval__ (1, "local"); @@ -609,7 +609,7 @@ %! assert (__compile ("bytecode_cdef_use")); %! bytecode_cdef_use (); %! assert (__prog_output_assert__ (key)); -%! global cdef_foo_ctor_cnt; global cdef_foo_dtor_cnt; +%! global cdef_foo_ctor_cnt; global cdef_foo_dtor_cnt; %! assert (cdef_foo_ctor_cnt == cdef_foo_dtor_cnt); %! %! global cdef_foo_ctor_cnt; clear global cdef_foo_ctor_cnt;
--- a/test/compile/bytecode_anon_handles.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_anon_handles.m Mon Jun 19 23:21:41 2023 -0400 @@ -17,7 +17,7 @@ __printf_assert__ ("%d %d %d ", a, b, c); [a b] = h4(); __printf_assert__ ("%d %d ", a, b); - + h5 = @(x) @(y) __printf_assert__ ("%d %d ", x, y); h5(11)(12)
--- a/test/compile/bytecode_cell.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_cell.m Mon Jun 19 23:21:41 2023 -0400 @@ -46,7 +46,7 @@ __printf_assert__ ("%d ", a{:}); __printf_assert__ ("%d ", a{:, 1}); __printf_assert__ ("%d ", a{1, :}); - __printf_assert__ ("%d ", a{:, :}); + __printf_assert__ ("%d ", a{:, :}); __printf_assert__ ("%d ", size (a)); __printf_assert__ ("%s ", class (a{1}));
--- a/test/compile/bytecode_dountil.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_dountil.m Mon Jun 19 23:21:41 2023 -0400 @@ -100,7 +100,7 @@ end continue; until i == 3 - __printf_assert__ ("%d ", i); + __printf_assert__ ("%d ", i); i = 0; do
--- a/test/compile/bytecode_end.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_end.m Mon Jun 19 23:21:41 2023 -0400 @@ -39,9 +39,9 @@ % Nested index expressions M = [1 2 3 4]; - __printf_assert__ ("%d ", M (min (2, end))); % End of M - __printf_assert__ ("%d ", M (max (3, min (2, end)))); % End of M - + __printf_assert__ ("%d ", M (min (2, end))); % End of M + __printf_assert__ ("%d ", M (max (3, min (2, end)))); % End of M + min_h = @min; __printf_assert__ ("%d ", M (min_h (2, end))); % End of min_h
--- a/test/compile/bytecode_errors.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_errors.m Mon Jun 19 23:21:41 2023 -0400 @@ -1,6 +1,6 @@ function bytecode_errors (idx) % We put test dispatch last, so that we don't have - % to update all columns and rows each time we + % to update all columns and rows each time we % add a test ... run_test (idx); end
--- a/test/compile/bytecode_eval_1.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_eval_1.m Mon Jun 19 23:21:41 2023 -0400 @@ -52,7 +52,7 @@ % Just test the same thing in a subfunction sub1 (); - + % Change the value of arguments and returns in an eval % Also do nargin and nargout in a subfunction [aa bb] = suby2 (11, 22, 33); @@ -117,7 +117,7 @@ __printf_assert__ ("5:%f ", b); __printf_assert__ ("6:%f ", c); __printf_assert__ ("7:%f ", d); - + __printf_assert__ ("%d ", nargin); __printf_assert__ ("%d ", eval ("nargin"));
--- a/test/compile/bytecode_for.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_for.m Mon Jun 19 23:21:41 2023 -0400 @@ -60,9 +60,9 @@ if j == 2 continue end - + ctr++; - + if j == 3 break end @@ -130,7 +130,7 @@ __printf_assert__ ("%d ", i); __printf_assert__ ("%s ", class (i)); - + n = 'qwe'; for i = n __printf_assert__ ("%s ", i); @@ -146,7 +146,7 @@ end end - % ... unless rhs is a scalar ... + % ... unless rhs is a scalar ... for i = single (1) end __printf_assert__ ("%s ", class (i)); @@ -177,7 +177,7 @@ __printf_assert__ ("boo"); end end - + function i = foo () for i = 1:10
--- a/test/compile/bytecode_global_1.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_global_1.m Mon Jun 19 23:21:41 2023 -0400 @@ -6,7 +6,7 @@ function bytecode_global_1 () % General test. a and b are also read and verified in test .tst file global a b - __printf_assert__ ("%s ", class (a)); + __printf_assert__ ("%s ", class (a)); __printf_assert__ ("%d ", size (a)); __printf_assert__ ("%d ", length (who ('global','a'))); @@ -145,7 +145,7 @@ function sub1(make_global) - % Already defined local, later declared global + % Already defined local, later declared global d = 3; __printf_assert__ ("%d ", length(who('global','d'))); global d @@ -171,7 +171,7 @@ __printf_assert__ ("%d ", e); __printf_assert__ ("%s ", class(e)); __printf_assert__ ("%d ", size (e)); - + % Conditionally global a and b if make_global
--- a/test/compile/bytecode_if.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_if.m Mon Jun 19 23:21:41 2023 -0400 @@ -37,7 +37,7 @@ __printf_assert__ ("booo "); else __printf_assert__ ("%d ", ctr++); - end + end if b __printf_assert__ ("booo "); @@ -139,4 +139,4 @@ __printf_assert__ ("%d ", b); a = 0; end - +
--- a/test/compile/bytecode_leaks.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_leaks.m Mon Jun 19 23:21:41 2023 -0400 @@ -105,7 +105,7 @@ catch end assert (refs_e, __ref_count (e)) - + % eval dynamic stack suby8 (e); assert (refs_e, __ref_count (e))
--- a/test/compile/bytecode_matrix.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_matrix.m Mon Jun 19 23:21:41 2023 -0400 @@ -46,16 +46,16 @@ % Matrix div A = [a b c d] / [a b c d]; __printf_assert__ ("%g ", A); - __printf_assert__ ("%g ", size (A)); + __printf_assert__ ("%g ", size (A)); A = [a b c d] \ [a b c d]; __printf_assert__ ("%g ", A); __printf_assert__ ("%g ", size (A)); - + A = [a b; c d] / [a b; c d]; __printf_assert__ ("%g ", A); - __printf_assert__ ("%g ", size (A)); - + __printf_assert__ ("%g ", size (A)); + % Compound mul herm A = [a b c d] * [a b c d]'; __printf_assert__ ("%g ", A); @@ -64,7 +64,7 @@ % Compound herm mul A = [a b; c d]' * [a b; c d]; __printf_assert__ ("%g ", A); - __printf_assert__ ("%g ", size (A)); + __printf_assert__ ("%g ", size (A)); % Compound trans ldiv A = [a; b; c; d].' \ [a b c d]; @@ -213,7 +213,7 @@ 251; 252; 253; 254; 255; 256; 257]; __printf_assert__ ("%d ", size (b)); __printf_assert__ ("%d ", sum (b)); - + end function i = hi (s)
--- a/test/compile/bytecode_multi_assign.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_multi_assign.m Mon Jun 19 23:21:41 2023 -0400 @@ -12,7 +12,7 @@ % Non ids in lhs % Eval is used as a cheat since - % rhs need to know how many lhs values + % rhs need to know how many lhs values % there are. [e, f.a, g, h.b] = foo (); @@ -41,7 +41,7 @@ __printf_assert__ ("%d ", g{end}); __printf_assert__ ("%d ", h.b); - + [C{1:2}, D] = {1,2,3}{:}; __printf_assert__ ("%d ", C{1}); __printf_assert__ ("%d ", C{2});
--- a/test/compile/bytecode_persistant.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_persistant.m Mon Jun 19 23:21:41 2023 -0400 @@ -1,7 +1,7 @@ function bytecode_persistant () q = 3; l = 4; - + persistent a = 3; __printf_assert__ ("a:%d ", a++);
--- a/test/compile/bytecode_range.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_range.m Mon Jun 19 23:21:41 2023 -0400 @@ -2,7 +2,7 @@ % The should be range constants, but I think % negative limits are not folded to range constants - + a = 1:3; __printf_assert__ ("%d ", a);
--- a/test/compile/bytecode_trycatch.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_trycatch.m Mon Jun 19 23:21:41 2023 -0400 @@ -35,7 +35,7 @@ error("foo"); catch end - + % Error object try __printf_assert__ ("yay2 "); @@ -135,7 +135,7 @@ switch m case 2 end - + for i = 1:3 try qwe = '1'; @@ -151,7 +151,7 @@ for k = 1:3 end end - end + end catch __printf_assert__ ("yay13 "); __printf_assert__ ("%s ", getfield (lasterror (), 'message'));
--- a/test/compile/bytecode_unwind.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_unwind.m Mon Jun 19 23:21:41 2023 -0400 @@ -23,7 +23,7 @@ suby (3); catch end - + suby (4); suby (5); suby (6); @@ -31,7 +31,7 @@ % Break and returns that are not executed % % The combination "break and return", "break" and "return" - % takes different codepaths in the walker so we test all + % takes different codepaths in the walker so we test all % combinations here. unwind_protect @@ -76,7 +76,7 @@ return __printf_assert__ ("boo "); unwind_protect_cleanup - __printf_assert__ ("subyyay2 "); + __printf_assert__ ("subyyay2 "); end __printf_assert__ ("boo "); elseif a == 2 @@ -87,11 +87,11 @@ return __printf_assert__ ("boo "); unwind_protect_cleanup - __printf_assert__ ("subyyay4 "); + __printf_assert__ ("subyyay4 "); end __printf_assert__ ("boo "); unwind_protect_cleanup - __printf_assert__ ("subyyay5 "); + __printf_assert__ ("subyyay5 "); end __printf_assert__ ("boo "); elseif a == 3 @@ -102,11 +102,11 @@ error foooo __printf_assert__ ("boo "); unwind_protect_cleanup - __printf_assert__ ("subyyay7 "); + __printf_assert__ ("subyyay7 "); end __printf_assert__ ("boo "); unwind_protect_cleanup - __printf_assert__ ("subyyay8 "); + __printf_assert__ ("subyyay8 "); end __printf_assert__ ("boo "); elseif a == 4 @@ -116,7 +116,7 @@ break; __printf_assert__ ("boo "); unwind_protect_cleanup - __printf_assert__ ("subyyay10 "); + __printf_assert__ ("subyyay10 "); end __printf_assert__ ("boo "); end @@ -130,14 +130,14 @@ break; __printf_assert__ ("boo "); unwind_protect_cleanup - __printf_assert__ ("subyyay13 "); + __printf_assert__ ("subyyay13 "); end __printf_assert__ ("boo "); end break; __printf_assert__ ("boo "); unwind_protect_cleanup - __printf_assert__ ("subyyay14 "); + __printf_assert__ ("subyyay14 "); end __printf_assert__ ("boo "); end @@ -153,7 +153,7 @@ error ('qwe'); __printf_assert__ ("boo "); unwind_protect_cleanup - __printf_assert__ ("subyyay17 "); + __printf_assert__ ("subyyay17 "); end __printf_assert__ ("boo "); end @@ -162,7 +162,7 @@ end __printf_assert__ ("boo "); unwind_protect_cleanup - __printf_assert__ ("subyyay18 "); + __printf_assert__ ("subyyay18 "); end __printf_assert__ ("boo "); end
--- a/test/compile/bytecode_while.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/bytecode_while.m Mon Jun 19 23:21:41 2023 -0400 @@ -96,7 +96,7 @@ while i++ < 2 continue end - __printf_assert__ ("%d ", i); + __printf_assert__ ("%d ", i); i = 0; while i++ < 2
--- a/test/compile/shutup_operator_test/bytecode_disp.m Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/shutup_operator_test/bytecode_disp.m Mon Jun 19 23:21:41 2023 -0400 @@ -11,13 +11,13 @@ print_dot; 2^3 % "ans = 8" print_dot % - + if 2 3 % "ans = 3" end print_dot; x = 4 - 1 % "x = 3" - + print_dot; [x, y] = deal (1,2) % "x = 1" "y = 2" print_dot;
--- a/test/compile/shutup_operator_test/bytecode_disp.tst Mon Jun 19 20:07:05 2023 -0400 +++ b/test/compile/shutup_operator_test/bytecode_disp.tst Mon Jun 19 23:21:41 2023 -0400 @@ -1,7 +1,7 @@ ## Test display due to no ";" at eol ## ## We are overloading display for double so we place this test -## in its own folder to not mess double up for the other +## in its own folder to not mess double up for the other ## tests. %!test
--- a/test/parser.tst Mon Jun 19 20:07:05 2023 -0400 +++ b/test/parser.tst Mon Jun 19 23:21:41 2023 -0400 @@ -61,7 +61,7 @@ %! assert (!a .b, logical ([1 0])); %! assert (3*a .b, [0 3]); %! assert (a. b-1, [-1 0]); -%! warning ('off', 'Octave:colon-nonscalar-argument', 'local'); +%! warning ('off', 'Octave:colon-nonscalar-argument', 'local'); %! assert (a. b:3, 0:3); %! assert (a. b>0.5, logical ([0 1])); %! assert (a. b&0, logical ([0 0]));