# HG changeset patch # User Rik # Date 1638165128 28800 # Node ID a61e1a0f60246b883e0fd9c2128407b9be45640a # Parent bf4cea7b9ba8386ab0f85af2b82e33e742d4d66b maint: style check C++ files in libinterp/ ahead of 7.1 release. * Cell.cc, __eigs__.cc, __ichol__.cc, __ilu__.cc, __magick_read__.cc, __qp__.cc, bitfcns.cc, bsxfun.cc, c-file-ptr-stream.h, ccolamd.cc, cellfun.cc, data.cc, debug.cc, defun-int.h, dlmread.cc, event-manager.cc, fftn.cc, file-io.cc, ft-text-renderer.cc, gl2ps-print.cc, graphics.cc, graphics.in.h, gzfstream.cc, gzfstream.h, jsondecode.cc, jsonencode.cc, latex-text-renderer.cc, ls-mat5.cc, lu.cc, mex.cc, oct-stream.cc, oct-strstrm.cc, ordqz.cc, pager.h, pr-output.cc, qz.cc, schur.cc, sparse-xdiv.cc, sparse-xpow.cc, sparse.cc, stack-frame.h, strfns.cc, svd.cc, symrcm.cc, symscope.h, sysdep.cc, text-engine.h, text-renderer.h, tril.cc, variables.h, xdiv.h, __glpk__.cc, __init_fltk__.cc, __init_gnuplot__.cc, __voronoi__.cc, audiodevinfo.cc, cdef-class.cc, cdef-class.h, cdef-manager.cc, cdef-manager.h, cdef-method.cc, cdef-object.cc, ov-base-diag.cc, ov-base-diag.h, ov-base-int.cc, ov-base-int.h, ov-base-mat.cc, ov-base-mat.h, ov-base-scalar.h, ov-base-sparse.cc, ov-base-sparse.h, ov-base.h, ov-bool-mat.cc, ov-cell.cc, ov-cell.h, ov-class.cc, ov-class.h, ov-dld-fcn.cc, ov-intx.h, ov-lazy-idx.cc, ov-lazy-idx.h, ov-mex-fcn.h, ov-perm.cc, ov-perm.h, ov-range.cc, ov-re-mat.cc, ov-re-mat.h, ov-str-mat.h, ov-struct.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov.h, parse.h, pt-cell.cc, pt-stmt.cc, pt-tm-const.cc, pt-walk.cc: Style check C++ files in libinterp/ ahead of 7.1 release. diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/Cell.cc --- a/libinterp/corefcn/Cell.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/Cell.cc Sun Nov 28 21:52:08 2021 -0800 @@ -58,7 +58,7 @@ s = (pos == std::string::npos) ? "" : s.substr (0, pos+1); } - elem(i,0) = s; + elem (i, 0) = s; } } } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/__eigs__.cc --- a/libinterp/corefcn/__eigs__.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/__eigs__.cc Sun Nov 28 21:52:08 2021 -0800 @@ -456,14 +456,14 @@ { if (b_is_sparse) nconv = EigsComplexNonSymmetricFunc - (eigs_complex_fcn, n, typ, sigma, k, p, info, eig_vec, - eig_val, bscm, permB, cresid, octave_stdout, tol, - (nargout > 1), cholB, disp, maxit); + (eigs_complex_fcn, n, typ, sigma, k, p, info, eig_vec, + eig_val, bscm, permB, cresid, octave_stdout, tol, + (nargout > 1), cholB, disp, maxit); else nconv = EigsComplexNonSymmetricFunc - (eigs_complex_fcn, n, typ, sigma, k, p, info, eig_vec, - eig_val, bcm, permB, cresid, octave_stdout, tol, - (nargout > 1), cholB, disp, maxit); + (eigs_complex_fcn, n, typ, sigma, k, p, info, eig_vec, + eig_val, bcm, permB, cresid, octave_stdout, tol, + (nargout > 1), cholB, disp, maxit); } else if (have_sigma) { @@ -524,14 +524,14 @@ { if (b_is_sparse) nconv = EigsComplexNonSymmetricFunc - (eigs_complex_fcn, n, typ, sigma, k, p, info, eig_vec, - eig_val, bscm, permB, cresid, octave_stdout, tol, - (nargout > 1), cholB, disp, maxit); + (eigs_complex_fcn, n, typ, sigma, k, p, info, eig_vec, + eig_val, bscm, permB, cresid, octave_stdout, tol, + (nargout > 1), cholB, disp, maxit); else nconv = EigsComplexNonSymmetricFunc - (eigs_complex_fcn, n, typ, sigma, k, p, info, eig_vec, - eig_val, bcm, permB, cresid, octave_stdout, tol, - (nargout > 1), cholB, disp, maxit); + (eigs_complex_fcn, n, typ, sigma, k, p, info, eig_vec, + eig_val, bcm, permB, cresid, octave_stdout, tol, + (nargout > 1), cholB, disp, maxit); } else { @@ -578,14 +578,14 @@ { if (b_is_sparse) nconv = EigsRealSymmetricFunc - (eigs_fcn, n, typ, sigmar, k, p, info, eig_vec, - eig_val, bsmm, permB, resid, octave_stdout, tol, - (nargout > 1), cholB, disp, maxit); + (eigs_fcn, n, typ, sigmar, k, p, info, eig_vec, + eig_val, bsmm, permB, resid, octave_stdout, tol, + (nargout > 1), cholB, disp, maxit); else nconv = EigsRealSymmetricFunc - (eigs_fcn, n, typ, sigmar, k, p, info, eig_vec, - eig_val, bmm, permB, resid, octave_stdout, tol, - (nargout > 1), cholB, disp, maxit); + (eigs_fcn, n, typ, sigmar, k, p, info, eig_vec, + eig_val, bmm, permB, resid, octave_stdout, tol, + (nargout > 1), cholB, disp, maxit); } else if (have_sigma) { diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/__ichol__.cc --- a/libinterp/corefcn/__ichol__.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/__ichol__.cc Sun Nov 28 21:52:08 2021 -0800 @@ -91,7 +91,7 @@ // Input matrix pointers octave_idx_type *cidx = sm.cidx (); octave_idx_type *ridx = sm.ridx (); - T* data = sm.data (); + T *data = sm.data (); // Working arrays OCTAVE_LOCAL_BUFFER (octave_idx_type, Lfirst, n); @@ -235,7 +235,7 @@ // Input matrix pointers octave_idx_type *cidx = sm.cidx (); octave_idx_type *ridx = sm.ridx (); - T* data = sm.data (); + T *data = sm.data (); // Output matrix data structures. Because the final zero pattern pattern of // the output matrix is not known due to fill-in elements, a heuristic @@ -251,7 +251,7 @@ Array ridx_out_l (dim_vector (max_len, 1)); octave_idx_type *ridx_l = ridx_out_l.fortran_vec (); Array data_out_l (dim_vector (max_len, 1)); - T* data_l = data_out_l.fortran_vec (); + T *data_l = data_out_l.fortran_vec (); // Working arrays OCTAVE_LOCAL_BUFFER (T, w_data, n); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/__ilu__.cc --- a/libinterp/corefcn/__ilu__.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/__ilu__.cc Sun Nov 28 21:52:08 2021 -0800 @@ -857,7 +857,7 @@ for (i = 0; i < n; i++) { if (opt == ROW) - diag.elem (i,i) = data_u[uptr[i]]; + diag.elem (i, i) = data_u[uptr[i]]; j = cidx_l[i]; while (j < cidx_l[i+1]) diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/__magick_read__.cc --- a/libinterp/corefcn/__magick_read__.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/__magick_read__.cc Sun Nov 28 21:52:08 2021 -0800 @@ -273,9 +273,9 @@ for (octave_idx_type i = 0; i < mapsize; i++) { const Magick::ColorRGB c = img.colorMap (i); - cmap(i,0) = c.red (); - cmap(i,1) = c.green (); - cmap(i,2) = c.blue (); + cmap(i, 0) = c.red (); + cmap(i, 1) = c.green (); + cmap(i, 2) = c.blue (); amap(i) = c.alpha (); } octave_value_list maps; diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/__qp__.cc --- a/libinterp/corefcn/__qp__.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/__qp__.cc Sun Nov 28 21:52:08 2021 -0800 @@ -369,7 +369,7 @@ { Wact(i) = Wact(i+1); for (octave_idx_type j = 0; j < n; j++) - Aact(n_eq+i,j) = Aact(n_eq+i+1,j); + Aact(n_eq+i, j) = Aact(n_eq+i+1, j); bact(n_eq+i) = bact(n_eq+i+1); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/bitfcns.cc --- a/libinterp/corefcn/bitfcns.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/bitfcns.cc Sun Nov 28 21:52:08 2021 -0800 @@ -57,21 +57,21 @@ struct bit_and { public: - T operator() (const T & op1, const T & op2) const { return (op1 & op2); } + T operator() (const T& op1, const T& op2) const { return (op1 & op2); } }; template struct bit_or { public: - T operator() (const T & op1, const T & op2) const { return (op1 | op2); } + T operator() (const T& op1, const T& op2) const { return (op1 | op2); } }; template struct bit_xor { public: - T operator() (const T & op1, const T & op2) const { return (op1 ^ op2); } + T operator() (const T& op1, const T& op2) const { return (op1 ^ op2); } }; } #endif diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/bsxfun.cc --- a/libinterp/corefcn/bsxfun.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/bsxfun.cc Sun Nov 28 21:52:08 2021 -0800 @@ -322,7 +322,7 @@ OCTAVE_NAMESPACE_BEGIN -DEFMETHOD (bsxfun, interp,args, , +DEFMETHOD (bsxfun, interp, args, , doc: /* -*- texinfo -*- @deftypefn {} {} bsxfun (@var{f}, @var{A}, @var{B}) Apply a binary function @var{f} element-by-element to two array arguments diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/c-file-ptr-stream.h --- a/libinterp/corefcn/c-file-ptr-stream.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/c-file-ptr-stream.h Sun Nov 28 21:52:08 2021 -0800 @@ -68,7 +68,7 @@ int_type pbackfail (int_type); - std::streamsize xsputn (const char*, std::streamsize); + std::streamsize xsputn (const char *, std::streamsize); std::streamsize xsgetn (char *, std::streamsize); @@ -183,7 +183,7 @@ int_type pbackfail (int_type); - std::streamsize xsputn (const char*, std::streamsize); + std::streamsize xsputn (const char *, std::streamsize); std::streamsize xsgetn (char *, std::streamsize); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/ccolamd.cc --- a/libinterp/corefcn/ccolamd.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/ccolamd.cc Sun Nov 28 21:52:08 2021 -0800 @@ -283,7 +283,7 @@ error ("ccolamd: CMEMBER must be of length equal to #cols of A"); // Order the columns (destroys A) - if (! CCOLAMD_NAME () (n_row, n_col, Alen, A, p, knobs, stats,cmember)) + if (! CCOLAMD_NAME () (n_row, n_col, Alen, A, p, knobs, stats, cmember)) { CCOLAMD_NAME (_report) (stats); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/cellfun.cc --- a/libinterp/corefcn/cellfun.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/cellfun.cc Sun Nov 28 21:52:08 2021 -0800 @@ -423,7 +423,7 @@ if (func.is_string ()) { - retval = try_cellfun_internal_ops (args, nargin); + retval = try_cellfun_internal_ops (args, nargin); if (! retval.empty ()) return retval; @@ -1919,7 +1919,7 @@ template static void prepare_idx (container *idx, int idim, int nd, - const Array* d) + const Array *d) { octave_idx_type nidx = (idim < nd ? d[idim].numel () : 1); if (nidx == 1) @@ -1986,7 +1986,7 @@ { octave_quit (); - retval.xelem (i,j) = a.index (ridx[i], cidx[j]); + retval.xelem (i, j) = a.index (ridx[i], cidx[j]); } } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/data.cc --- a/libinterp/corefcn/data.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/data.cc Sun Nov 28 21:52:08 2021 -0800 @@ -1961,7 +1961,7 @@ // be some additional setup needed, and so this should be avoided. octave_value tmp = args(0); - tmp = tmp.resize (dim_vector (0,0)).resize (dv); + tmp = tmp.resize (dim_vector (0, 0)).resize (dv); int dv_len = dv.ndims (); Array ra_idx (dim_vector (dv_len, 1), 0); @@ -4466,13 +4466,13 @@ if (nargin > 1 && args(nargin-2).is_string () && args(nargin-2).string_value () == "like") - { - if (! args(nargin-1).islogical ()) - error (R"(%s: input followed by "like" must be logical)", fcn); - - issparse = args(nargin-1).issparse (); - nargin -= 2; - } + { + if (! args(nargin-1).islogical ()) + error (R"(%s: input followed by "like" must be logical)", fcn); + + issparse = args(nargin-1).issparse (); + nargin -= 2; + } switch (nargin) { @@ -5264,7 +5264,7 @@ int n = std::min (nr, nc); for (int i = 0; i < n; i++) - m(i,i) = one; + m(i, i) = one; } retval = m; @@ -8312,7 +8312,7 @@ const Array in = args(0).float_array_value (); std::size_t inlen; inlen = in.numel () * sizeof (float) / sizeof (char); - const char* inc; + const char *inc; inc = reinterpret_cast (in.data ()); char *out; if (base64_encode (inc, inlen, &out)) @@ -8326,7 +8326,7 @@ const Array in = args(0).array_value (); std::size_t inlen; inlen = in.numel () * sizeof (double) / sizeof (char); - const char* inc; + const char *inc; inc = reinterpret_cast (in.data ()); char *out; if (base64_encode (inc, inlen, &out)) diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/debug.cc --- a/libinterp/corefcn/debug.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/debug.cc Sun Nov 28 21:52:08 2021 -0800 @@ -513,7 +513,7 @@ } else { - octave_map outer (dim_vector (3,1)); + octave_map outer (dim_vector (3, 1)); outer.assign ("bkpt", Cell (retmap)); for (auto f = ew.begin (); f != ew.end (); f++) outer.setfield (f->first, ew.contents (f)); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/defun-int.h --- a/libinterp/corefcn/defun-int.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/defun-int.h Sun Nov 28 21:52:08 2021 -0800 @@ -64,21 +64,21 @@ // Gets the shlib of the currently executing DLD function, if any. extern OCTINTERP_API dynamic_library get_current_shlib (void); - // FIXME: this class doesn't seem to be used in Octave. Is it - // really needed? +// FIXME: this class doesn't seem to be used in Octave. Is it +// really needed? - // This is a convenience class that calls the above function automatically at - // construction time. When deriving new classes, you can either use it as a - // field or as a parent (with multiple inheritance). +// This is a convenience class that calls the above function automatically at +// construction time. When deriving new classes, you can either use it as a +// field or as a parent (with multiple inheritance). - class auto_shlib : public dynamic_library - { - public: +class auto_shlib : public dynamic_library +{ +public: - auto_shlib (void) : dynamic_library (get_current_shlib ()) { } + auto_shlib (void) : dynamic_library (get_current_shlib ()) { } - auto_shlib (const dynamic_library& shl) : dynamic_library (shl) { } - }; + auto_shlib (const dynamic_library& shl) : dynamic_library (shl) { } +}; OCTAVE_NAMESPACE_END diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/dlmread.cc --- a/libinterp/corefcn/dlmread.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/dlmread.cc Sun Nov 28 21:52:08 2021 -0800 @@ -290,7 +290,7 @@ // Short-circuit and return if range is empty if (r1 < r0 || c1 < c0) - return ovl (Matrix (0,0)); + return ovl (Matrix (0, 0)); } octave_idx_type i = 0; @@ -351,7 +351,7 @@ rcnt--; if (rcnt > 0) - return ovl (Matrix (0,0)); // Not enough lines in file to satisfy RANGE + return ovl (Matrix (0, 0)); // Not enough lines in file to satisfy RANGE else r1 -= r0; @@ -487,9 +487,9 @@ if (tmp_stream.eof ()) { if (iscmplx) - cdata(i,j++) = x; + cdata(i, j++) = x; else - rdata(i,j++) = x; + rdata(i, j++) = x; } else { @@ -508,7 +508,7 @@ cdata = ComplexMatrix (rdata); } - cdata(i,j++) = Complex (0, x); + cdata(i, j++) = Complex (0, x); } else { @@ -532,9 +532,9 @@ } if (iscmplx) - cdata(i,j++) = Complex (x, y); + cdata(i, j++) = Complex (x, y); else - rdata(i,j++) = x; + rdata(i, j++) = x; } } } @@ -563,7 +563,7 @@ if (iscmplx) { if ((i == 0 && j == 0) || (c0 > c1)) - return ovl (ComplexMatrix (0,0)); + return ovl (ComplexMatrix (0, 0)); cdata = cdata.extract (0, c0, r1, c1); return ovl (cdata); @@ -571,7 +571,7 @@ else { if ((i == 0 && j == 0) || (c0 > c1)) - return ovl (Matrix (0,0)); + return ovl (Matrix (0, 0)); rdata = rdata.extract (0, c0, r1, c1); return ovl (rdata); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/event-manager.cc --- a/libinterp/corefcn/event-manager.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/event-manager.cc Sun Nov 28 21:52:08 2021 -0800 @@ -326,9 +326,9 @@ event_manager::filter_list filter_lst; for (octave_idx_type i = 0; i < flist.rows (); i++) - filter_lst.push_back (std::make_pair (flist(i,0), + filter_lst.push_back (std::make_pair (flist(i, 0), (flist.columns () > 1 - ? flist(i,1) : ""))); + ? flist(i, 1) : ""))); flush_stdout (); @@ -453,8 +453,8 @@ std::list nc; for (octave_idx_type i = 0; i < nel; i++) { - nr.push_back (rc(i,0)); - nc.push_back (rc(i,1)); + nr.push_back (rc(i, 0)); + nc.push_back (rc(i, 1)); } Cell defaults = args(3).cell_value (); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/fftn.cc --- a/libinterp/corefcn/fftn.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/fftn.cc Sun Nov 28 21:52:08 2021 -0800 @@ -67,12 +67,12 @@ for (int i = 0; i < dims.ndims (); i++) { - if (math::isnan (val(i,0))) + if (math::isnan (val(i, 0))) error ("%s: SIZE has invalid NaN entries", fcn); - else if (math::nint_big (val(i,0)) < 0) + else if (math::nint_big (val(i, 0)) < 0) error ("%s: all dimensions in SIZE must be greater than zero", fcn); else - dims(i) = math::nint_big(val(i,0)); + dims(i) = math::nint_big(val(i, 0)); } } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/file-io.cc --- a/libinterp/corefcn/file-io.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/file-io.cc Sun Nov 28 21:52:08 2021 -0800 @@ -635,7 +635,7 @@ int fid = -1; stream os = do_stream_open (args(0), mode, arch, encoding, "fopen", - fid); + fid); if (os) retval = ovl (streams.insert (os), ""); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/ft-text-renderer.cc --- a/libinterp/corefcn/ft-text-renderer.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/ft-text-renderer.cc Sun Nov 28 21:52:08 2021 -0800 @@ -228,7 +228,7 @@ FcPattern *font = fs->fonts[i]; if (FcPatternGetString (font, FC_FAMILY, 0, &family) == FcResultMatch) - families(i) = std::string (reinterpret_cast (family)); + families(i) = std::string (reinterpret_cast (family)); else families(i) = "unknown"; @@ -820,7 +820,7 @@ } } - bool is_opaque (const FT_GlyphSlot &glyph, const int x, const int y) + bool is_opaque (const FT_GlyphSlot& glyph, const int x, const int y) { // Borrowed from https://stackoverflow.com/questions/14800827/ // indexing-pixels-in-a-monochrome-freetype-glyph-buffer @@ -952,7 +952,7 @@ x0 = m_xoffset + face->glyph->bitmap_left; y0 = m_line_yoffset + m_yoffset - + (face->glyph->bitmap_top - 1); + + (face->glyph->bitmap_top - 1); // 'w' seems to have a negative -1 // face->glyph->bitmap_left, this is so we don't index out diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/gl2ps-print.cc --- a/libinterp/corefcn/gl2ps-print.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/gl2ps-print.cc Sun Nov 28 21:52:08 2021 -0800 @@ -497,7 +497,7 @@ // In EPS terminal read the header line by line and insert a // new procedure - const char* fcn = "/SRX { gsave FCT moveto rotate xshow grestore } BD\n"; + const char *fcn = "/SRX { gsave FCT moveto rotate xshow grestore } BD\n"; bool header_found = ! (m_term.find ("eps") != std::string::npos || m_term.find ("svg") != std::string::npos); @@ -1315,7 +1315,7 @@ ColumnVector vp_lim_min = m_xform.untransform (std::numeric_limits ::epsilon (), - std::numeric_limits ::epsilon ()); + std::numeric_limits ::epsilon ()); ColumnVector vp_lim_max = m_xform.untransform (vp(2), vp(3)); if (vp_lim_min(0) > vp_lim_max(0)) @@ -1383,9 +1383,9 @@ else jj = w - j - 1; - a[idx] = xcdata(ii,jj,0); - a[idx+1] = xcdata(ii,jj,1); - a[idx+2] = xcdata(ii,jj,2); + a[idx] = xcdata(ii, jj, 0); + a[idx+1] = xcdata(ii, jj, 1); + a[idx+2] = xcdata(ii, jj, 2); } } @@ -1413,9 +1413,9 @@ else jj = w - j - 1; - a[idx] = xcdata(ii,jj,0); - a[idx+1] = xcdata(ii,jj,1); - a[idx+2] = xcdata(ii,jj,2); + a[idx] = xcdata(ii, jj, 0); + a[idx+1] = xcdata(ii, jj, 1); + a[idx+2] = xcdata(ii, jj, 2); } } @@ -1443,9 +1443,9 @@ else jj = w - j - 1; - a[idx] = xcdata(ii,jj,0); - a[idx+1] = xcdata(ii,jj,1); - a[idx+2] = xcdata(ii,jj,2); + a[idx] = xcdata(ii, jj, 0); + a[idx+1] = xcdata(ii, jj, 1); + a[idx+2] = xcdata(ii, jj, 2); } } @@ -1473,9 +1473,9 @@ else jj = w - j - 1; - a[idx] = xcdata(ii,jj,0); - a[idx+1] = xcdata(ii,jj,1); - a[idx+2] = xcdata(ii,jj,2); + a[idx] = xcdata(ii, jj, 0); + a[idx+1] = xcdata(ii, jj, 1); + a[idx+2] = xcdata(ii, jj, 2); } } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/graphics.cc Sun Nov 28 21:52:08 2021 -0800 @@ -260,32 +260,32 @@ { Matrix retval (7, 3, 0.0); - retval(0,1) = 0.447; - retval(0,2) = 0.741; - - retval(1,0) = 0.850; - retval(1,1) = 0.325; - retval(1,2) = 0.098; - - retval(2,0) = 0.929; - retval(2,1) = 0.694; - retval(2,2) = 0.125; - - retval(3,0) = 0.494; - retval(3,1) = 0.184; - retval(3,2) = 0.556; - - retval(4,0) = 0.466; - retval(4,1) = 0.674; - retval(4,2) = 0.188; - - retval(5,0) = 0.301; - retval(5,1) = 0.745; - retval(5,2) = 0.933; - - retval(6,0) = 0.635; - retval(6,1) = 0.078; - retval(6,2) = 0.184; + retval(0, 1) = 0.447; + retval(0, 2) = 0.741; + + retval(1, 0) = 0.850; + retval(1, 1) = 0.325; + retval(1, 2) = 0.098; + + retval(2, 0) = 0.929; + retval(2, 1) = 0.694; + retval(2, 2) = 0.125; + + retval(3, 0) = 0.494; + retval(3, 1) = 0.184; + retval(3, 2) = 0.556; + + retval(4, 0) = 0.466; + retval(4, 1) = 0.674; + retval(4, 2) = 0.188; + + retval(5, 0) = 0.301; + retval(5, 1) = 0.745; + retval(5, 2) = 0.933; + + retval(6, 0) = 0.635; + retval(6, 1) = 0.078; + retval(6, 2) = 0.184; return retval; } @@ -342,7 +342,7 @@ for (int col = 0; col < 64; col++) for (int row = 0; row < 64; row++) { - m(col,row) = static_cast (default_im_data[i]); + m(col, row) = static_cast (default_im_data[i]); i++; } @@ -356,7 +356,7 @@ for (int col = 0; col < 3; col++) for (int row = 0; row < 3; row++) - m(row,col) = col+1; + m(row, col) = col+1; return m; } @@ -368,7 +368,7 @@ for (int row = 0; row < 3; row++) for (int col = 0; col < 3; col++) - m(row,col) = row+1; + m(row, col) = row+1; return m; } @@ -379,7 +379,7 @@ Matrix m (3, 3, 0.0); for (int row = 0; row < 3; row++) - m(row,row) = 1.0; + m(row, row) = 1.0; return m; } @@ -1208,7 +1208,7 @@ return result; } -static base_graphics_object* +static base_graphics_object * make_graphics_object_from_type (const caseless_str& type, const graphics_handle& h = graphics_handle (), const graphics_handle& p = graphics_handle ()) @@ -1413,11 +1413,11 @@ { try { - tmp_rgb[0] = static_cast (stoi (str.substr (1,2), nullptr, 16)) + tmp_rgb[0] = static_cast (stoi (str.substr (1, 2), nullptr, 16)) / 255.0; - tmp_rgb[1] = static_cast (stoi (str.substr (3,2), nullptr, 16)) + tmp_rgb[1] = static_cast (stoi (str.substr (3, 2), nullptr, 16)) / 255.0; - tmp_rgb[2] = static_cast (stoi (str.substr (5,2), nullptr, 16)) + tmp_rgb[2] = static_cast (stoi (str.substr (5, 2), nullptr, 16)) / 255.0; } catch (const octave::execution_exception&) @@ -1429,11 +1429,11 @@ { try { - tmp_rgb[0] = static_cast (stoi (str.substr (1,1), nullptr, 16)) + tmp_rgb[0] = static_cast (stoi (str.substr (1, 1), nullptr, 16)) / 15.0; - tmp_rgb[1] = static_cast (stoi (str.substr (2,1), nullptr, 16)) + tmp_rgb[1] = static_cast (stoi (str.substr (2, 1), nullptr, 16)) / 15.0; - tmp_rgb[2] = static_cast (stoi (str.substr (3,1), nullptr, 16)) + tmp_rgb[2] = static_cast (stoi (str.substr (3, 1), nullptr, 16)) / 15.0; } catch (const octave::execution_exception&) @@ -3690,7 +3690,7 @@ base_properties::get_children_of_type (const caseless_str& chtype, bool get_invisible, bool traverse, - std::list &children_list) const + std::list& children_list) const { gh_manager& gh_mgr = octave::__get_gh_manager__ ("base_properties::get_children_of_type"); @@ -3786,7 +3786,8 @@ } void -base_graphics_object::build_user_defaults_map (property_list::pval_map_type& def, const std::string go_name) const +base_graphics_object::build_user_defaults_map (property_list::pval_map_type& def, + const std::string go_name) const { property_list local_defaults = get_defaults_list (); const auto it = local_defaults.find (go_name); @@ -5831,7 +5832,7 @@ Matrix m (4, 4, 0.0); for (int i = 0; i < 4; i++) - m(i,i) = 1; + m(i, i) = 1; return m; } @@ -5869,10 +5870,10 @@ { Matrix m (4, 4, 0.0); - m(0,0) = x; - m(1,1) = y; - m(2,2) = z; - m(3,3) = 1; + m(0, 0) = x; + m(1, 1) = y; + m(2, 2) = z; + m(3, 3) = 1; return m; } @@ -5882,10 +5883,10 @@ { Matrix m = xform_matrix (); - m(0,3) = x; - m(1,3) = y; - m(2,3) = z; - m(3,3) = 1; + m(0, 3) = x; + m(1, 3) = y; + m(2, 3) = z; + m(3, 3) = 1; return m; } @@ -5960,14 +5961,14 @@ { static double data[32] = { - 0,0,0,1, - 1,0,0,1, - 0,1,0,1, - 0,0,1,1, - 1,1,0,1, - 1,0,1,1, - 0,1,1,1, - 1,1,1,1 + 0, 0, 0, 1, + 1, 0, 0, 1, + 0, 1, 0, 1, + 0, 0, 1, 1, + 1, 1, 0, 1, + 1, 0, 1, 1, + 0, 1, 1, 1, + 1, 1, 1, 1 }; Matrix m (4, 8); @@ -6114,9 +6115,9 @@ scale (x_view, 1, 1, -1); Matrix l = xform_matrix (); - l(0,0) = s(0); l(0,1) = s(1); l(0,2) = s(2); - l(1,0) = u(0); l(1,1) = u(1); l(1,2) = u(2); - l(2,0) = -f(0); l(2,1) = -f(1); l(2,2) = -f(2); + l(0, 0) = s(0); l(0, 1) = s(1); l(0, 2) = s(2); + l(1, 0) = u(0); l(1, 1) = u(1); l(1, 2) = u(2); + l(2, 0) = -f(0); l(2, 1) = -f(1); l(2, 2) = -f(2); x_view = x_view * l; translate (x_view, -c_eye(0), -c_eye(1), -c_eye(2)); scale (x_view, pb(0), pb(1), pb(2)); @@ -7879,8 +7880,8 @@ } void -axes::properties::check_axis_limits (Matrix &limits, const Matrix kids, - const bool logscale, char &update_type) +axes::properties::check_axis_limits (Matrix& limits, const Matrix kids, + const bool logscale, char& update_type) { double min_val = octave::numeric_limits::Inf (); double max_val = -octave::numeric_limits::Inf (); @@ -8132,7 +8133,7 @@ if (limmode_is_auto) { // Adjust limits to include min and max ticks - Matrix tmp_lims (1,2); + Matrix tmp_lims (1, 2); tmp_lims(0) = std::min (tick_sep * i1, lo); tmp_lims(1) = std::max (tick_sep * i2, hi); @@ -8764,7 +8765,7 @@ get_children_limits (min_val, max_val, min_pos, max_neg, kids, 'z'); m_properties.set_has3Dkids ((max_val - min_val) > - std::numeric_limits::epsilon ()); + std::numeric_limits::epsilon ()); // FIXME: How to correctly handle (positive or negative) log scale? if ((! octave::math::isfinite (min_val) @@ -8783,7 +8784,7 @@ get_children_limits (min_val, max_val, min_pos, max_neg, kids, 'z'); m_properties.set_has3Dkids ((max_val - min_val) > - std::numeric_limits::epsilon ()); + std::numeric_limits::epsilon ()); limits = m_properties.get_zlim ().matrix_value (); m_properties.check_axis_limits (limits, kids, @@ -9221,7 +9222,7 @@ if (v(1) < -90) v(1) = -90; - v(0) = fmod (v(0) - delta_az + 720,360); + v(0) = fmod (v(0) - delta_az + 720, 360); set_view (v); @@ -9764,12 +9765,12 @@ { for (octave_idx_type ii = 0; ii < nr; ii++) { - vert(kk,0) = xd(ii,jj); - vert(kk,1) = yd(ii,jj); + vert(kk, 0) = xd(ii, jj); + vert(kk, 1) = yd(ii, jj); if (is3D) - vert(kk,2) = zd(ii,jj); - - idx(jj,ii) = static_cast (kk+1); + vert(kk, 2) = zd(ii, jj); + + idx(jj, ii) = static_cast (kk+1); kk++; } @@ -9796,7 +9797,7 @@ } // core coplanar tester -bool is_coplanar (const Matrix &cov) +bool is_coplanar (const Matrix& cov) { // Accuracy note: this test will also accept single precision input (although // stored in double precision). This is because the error threshold is @@ -9808,14 +9809,14 @@ } std::vector -coplanar_partition (const Matrix &vert, const Matrix &idx, +coplanar_partition (const Matrix& vert, const Matrix& idx, octave_idx_type nc, octave_idx_type jj) { std::vector coplanar_ends; Matrix plane_pivot = Matrix (1, 3, 0.0); for (octave_idx_type i = 0; i < 3; i++) - plane_pivot(0,i) = vert(idx(0,jj)-1,i); + plane_pivot(0, i) = vert(idx(0, jj)-1, i); Matrix fc = Matrix (0, 3, 0.0); // face corner vertex coordinates Matrix fa = Matrix (1, 3, 0.0); // for append face corner @@ -9833,7 +9834,7 @@ fc.resize (nc - 1, 3); for (octave_idx_type j = 1; j < nc; j++) for (octave_idx_type i = 0; i < 3; i++) - fc(j-1,i) = vert(idx(j,jj)-1,i) - plane_pivot(i); + fc(j-1, i) = vert(idx(j, jj)-1, i) - plane_pivot(i); coor_cov = fc.transpose () * fc; if (is_coplanar (coor_cov)) @@ -9866,7 +9867,7 @@ // The first point is implicitly included. for (octave_idx_type j = 0; j < 3; j++) for (octave_idx_type i = 0; i < 3; i++) - fc(j,i) = vert(idx(j+i_start,jj)-1,i) - plane_pivot(i); + fc(j, i) = vert(idx(j+i_start, jj)-1, i) - plane_pivot(i); // covariance matrix between coordinates of vertices coor_cov = fc.transpose () * fc; @@ -9883,7 +9884,7 @@ // add a point to plane for (octave_idx_type i = 0; i < 3; i++) - fa(0,i) = vert(idx(i_end,jj)-1,i) - plane_pivot(i); + fa(0, i) = vert(idx(i_end, jj)-1, i) - plane_pivot(i); coor_cov += fa.transpose () * fa; } @@ -9919,17 +9920,17 @@ { for (octave_idx_type jj = 0; jj < idx.columns (); jj++) { - double valid_vert = idx(0,jj); + double valid_vert = idx(0, jj); bool turn_valid = false; for (octave_idx_type ii = 0; ii < idx.rows (); ii++) { - if (octave::math::isnan (idx(ii,jj)) || turn_valid) + if (octave::math::isnan (idx(ii, jj)) || turn_valid) { - idx(ii,jj) = valid_vert; + idx(ii, jj) = valid_vert; turn_valid = true; } else - valid_vert = idx(ii,jj); + valid_vert = idx(ii, jj); } } } @@ -9942,12 +9943,12 @@ m_coplanar_last_idx.resize (idx.columns ()); for (octave_idx_type jj = 0; jj < idx.columns (); jj++) { - if (octave::math::isnan (idx(3,jj))) + if (octave::math::isnan (idx(3, jj))) continue; // find first element that is NaN to get number of corners octave_idx_type nc = 3; - while (nc < fcmax && ! octave::math::isnan (idx(nc,jj))) + while (nc < fcmax && ! octave::math::isnan (idx(nc, jj))) nc++; // If any of the corners is NaN or Inf, skip coplanar test. @@ -9957,8 +9958,8 @@ { const octave_idx_type k = idx(j, jj) - 1; if (! (octave::math::isfinite (vert(k, 0)) - && octave::math::isfinite (vert(k, 1)) - && octave::math::isfinite (vert(k, 2)))) + && octave::math::isfinite (vert(k, 1)) + && octave::math::isfinite (vert(k, 2)))) { is_unclosed = true; break; @@ -10012,16 +10013,16 @@ { for (octave_idx_type ii = 0; ii < idx.rows (); ii++) { - octave_idx_type row = static_cast (idx(ii,jj)-1); - xd(ii,jj) = vert(row,0); - yd(ii,jj) = vert(row,1); + octave_idx_type row = static_cast (idx(ii, jj)-1); + xd(ii, jj) = vert(row, 0); + yd(ii, jj) = vert(row, 1); if (has_zd) - zd(ii,jj) = vert(row,2); + zd(ii, jj) = vert(row, 2); if (pervertex) for (int kk = 0; kk < fvc.columns (); kk++) - cd(ii,jj,kk) = fvc(row,kk); + cd(ii, jj, kk) = fvc(row, kk); } } @@ -10076,7 +10077,7 @@ octave_idx_type nc = 3; if (max_nc > 3) { - while (nc < max_nc && ! octave::math::isnan (f(i,nc))) + while (nc < max_nc && ! octave::math::isnan (f(i, nc))) nc++; } @@ -10088,17 +10089,17 @@ if (is_coplanar) { // fast way for coplanar polygons - i1 = f(i,0) - 1; i2 = f(i,1) - 1; i3 = f(i,nc-1) - 1; + i1 = f(i, 0) - 1; i2 = f(i, 1) - 1; i3 = f(i, nc-1) - 1; if (is_3D) cross_product - (v(i3,0) - v(i1,0), v(i3,1) - v(i1,1), v(i3,2) - v(i1,2), - v(i2,0) - v(i1,0), v(i2,1) - v(i1,1), v(i2,2) - v(i1,2), - nx, ny, nz); + (v(i3, 0) - v(i1, 0), v(i3, 1) - v(i1, 1), v(i3, 2) - v(i1, 2), + v(i2, 0) - v(i1, 0), v(i2, 1) - v(i1, 1), v(i2, 2) - v(i1, 2), + nx, ny, nz); else { - nz = (v(i2,0) - v(i1,0)) * (v(i3,1) - v(i1,1)) - - (v(i2,1) - v(i1,1)) * (v(i3,0) - v(i1,0)); + nz = (v(i2, 0) - v(i1, 0)) * (v(i3, 1) - v(i1, 1)) - + (v(i2, 1) - v(i1, 1)) * (v(i3, 0) - v(i1, 0)); // 2-d vertices always point towards +z nz = (nz < 0) ? -nz : nz; } @@ -10111,20 +10112,20 @@ // https://www.khronos.org/opengl/wiki/Calculating_a_Surface_Normal#Newell.27s_Method j1 = nc - 1; j2 = 0; - i1 = f(i,j1) - 1; i2 = f(i,j2) - 1; - - nx = (v(i2,1) - v(i1,1)) * (v(i1,2) + v(i2,2)); - ny = (v(i2,2) - v(i1,2)) * (v(i1,0) + v(i2,0)); - nz = (v(i2,0) - v(i1,0)) * (v(i1,1) + v(i2,1)); + i1 = f(i, j1) - 1; i2 = f(i, j2) - 1; + + nx = (v(i2, 1) - v(i1, 1)) * (v(i1, 2) + v(i2, 2)); + ny = (v(i2, 2) - v(i1, 2)) * (v(i1, 0) + v(i2, 0)); + nz = (v(i2, 0) - v(i1, 0)) * (v(i1, 1) + v(i2, 1)); for (octave_idx_type j = 1; j < nc; j++) { j1 = j-1; j2 = j; - i1 = f(i,j1) - 1; i2 = f(i,j2) - 1; - - nx += (v(i2,1) - v(i1,1)) * (v(i1,2) + v(i2,2)); - ny += (v(i2,2) - v(i1,2)) * (v(i1,0) + v(i2,0)); - nz += (v(i2,0) - v(i1,0)) * (v(i1,1) + v(i2,1)); + i1 = f(i, j1) - 1; i2 = f(i, j2) - 1; + + nx += (v(i2, 1) - v(i1, 1)) * (v(i1, 2) + v(i2, 2)); + ny += (v(i2, 2) - v(i1, 2)) * (v(i1, 0) + v(i2, 0)); + nz += (v(i2, 0) - v(i1, 0)) * (v(i1, 1) + v(i2, 1)); } } @@ -10134,10 +10135,10 @@ // assign normal to current face if ( n_len < std::numeric_limits::epsilon () ) for (octave_idx_type j = 0; j < 3; j++) - fn(i,j) = 0.0; + fn(i, j) = 0.0; else for (octave_idx_type j = 0; j < 3; j++) - fn(i,j) = fnc(j) / n_len; + fn(i, j) = fnc(j) / n_len; } } @@ -10208,12 +10209,12 @@ octave_idx_type nc = 3; if (max_nc > 3) { - while (nc < max_nc && ! octave::math::isnan (f(i,nc))) + while (nc < max_nc && ! octave::math::isnan (f(i, nc))) nc++; } for (octave_idx_type j = 0; j < nc; j++) - vec_vn[static_cast (f(i,j) - 1)].push_back (fn.row (i)); + vec_vn[static_cast (f(i, j) - 1)].push_back (fn.row (i)); } // Third step: Calculate the normal for the vertices taking the average @@ -10252,7 +10253,7 @@ // save normal in matrix for (octave_idx_type j = 0; j < 3; j++) - vn(i,j) = vn0(j)/n_len; + vn(i, j) = vn0(j)/n_len; } } @@ -10324,7 +10325,7 @@ && (c_rows != x_rows || (c_cols != 1 && c_cols != 3))) { m_bad_data_msg = "cdata must be an rgb triplet or have the same number of " - "rows as X and one or three columns"; + "rows as X and one or three columns"; return; } @@ -10332,7 +10333,7 @@ if (s_rows != 1 && s_rows != x_rows) { m_bad_data_msg = "sizedata must be a scalar or a vector with the same " - "dimensions as X"; + "dimensions as X"; return; } } @@ -10363,9 +10364,9 @@ % color_order.rows (); Matrix color = Matrix (1, 3, 0.); - color(0) = color_order(s,0); - color(1) = color_order(s,1); - color(2) = color_order(s,2); + color(0) = color_order(s, 0); + color(1) = color_order(s, 1); + color(2) = color_order(s, 2); octave::unwind_protect_var restore_var (updating_scatter_cdata, true); @@ -10478,10 +10479,10 @@ if (x_mat || y_mat) { - x0 = x(x_mat?j1:0,y_mat?i1:0); - x1 = x(x_mat?j1:0,y_mat?i2:0); - x2 = x(x_mat?j2:0,y_mat?i2:0); - x3 = x(x_mat?j2:0,y_mat?i1:0); + x0 = x(x_mat?j1:0, y_mat?i1:0); + x1 = x(x_mat?j1:0, y_mat?i2:0); + x2 = x(x_mat?j2:0, y_mat?i2:0); + x3 = x(x_mat?j2:0, y_mat?i1:0); x1m0 = x1 - x0; x2m1 = x2 - x1; x3m2 = x3 - x2; @@ -10490,10 +10491,10 @@ x2p1 = x2 + x1; x3p2 = x3 + x2; x0p3 = x0 + x3; - y0 = y(x_mat?j1:0,y_mat?i1:0); - y1 = y(x_mat?j1:0,y_mat?i2:0); - y2 = y(x_mat?j2:0,y_mat?i2:0); - y3 = y(x_mat?j2:0,y_mat?i1:0); + y0 = y(x_mat?j1:0, y_mat?i1:0); + y1 = y(x_mat?j1:0, y_mat?i2:0); + y2 = y(x_mat?j2:0, y_mat?i2:0); + y3 = y(x_mat?j2:0, y_mat?i1:0); y1m0 = y1 - y0; y2m1 = y2 - y1; y3m2 = y3 - y2; @@ -10504,14 +10505,14 @@ y0p3 = y0 + y3; } - double& nx = n(j,i,0); - double& ny = n(j,i,1); - double& nz = n(j,i,2); - - z0 = z(j1,i1); - z1 = z(j1,i2); - z2 = z(j2,i2); - z3 = z(j2,i1); + double& nx = n(j, i, 0); + double& ny = n(j, i, 1); + double& nz = n(j, i, 2); + + z0 = z(j1, i1); + z1 = z(j1, i2); + z2 = z(j2, i2); + z3 = z(j2, i1); // calculate face normal with Newell's method // https://www.khronos.org/opengl/wiki/Calculating_a_Surface_Normal#Newell.27s_Method @@ -12114,7 +12115,7 @@ function_event (const function_event&) = delete; - function_event & operator = (const function_event&) = delete; + function_event& operator = (const function_event&) = delete; void execute (void) { diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/graphics.in.h --- a/libinterp/corefcn/graphics.in.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/graphics.in.h Sun Nov 28 21:52:08 2021 -0800 @@ -4217,8 +4217,8 @@ const bool logscale); OCTINTERP_API void - check_axis_limits (Matrix &limits, const Matrix kids, - const bool logscale, char &update_type); + check_axis_limits (Matrix& limits, const Matrix kids, + const bool logscale, char& update_type); void update_xlim () { @@ -6558,7 +6558,7 @@ virtual void execute (void) = 0; - private: +private: int m_busyaction; }; @@ -6568,7 +6568,7 @@ { public: - typedef void (*event_fcn) (void*); + typedef void (*event_fcn) (void *); graphics_event (void) = default; diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/gzfstream.cc --- a/libinterp/corefcn/gzfstream.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/gzfstream.cc Sun Nov 28 21:52:08 2021 -0800 @@ -84,7 +84,7 @@ } // Open gzipped file -gzfilebuf* +gzfilebuf * gzfilebuf::open (const char *name, std::ios_base::openmode mode) { // Fail if file already open @@ -111,7 +111,7 @@ } // Attach to gzipped file -gzfilebuf* +gzfilebuf * gzfilebuf::attach (int fd, std::ios_base::openmode mode) { // Fail if file already open @@ -138,7 +138,7 @@ } // Close gzipped file -gzfilebuf* +gzfilebuf * gzfilebuf::close () { // Fail immediately if no file is open @@ -352,7 +352,7 @@ } // Assign new buffer -std::streambuf* +std::streambuf * gzfilebuf::setbuf (char_type *p, std::streamsize n) { // First make sure stuff is sync'ed, for safety diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/gzfstream.h --- a/libinterp/corefcn/gzfstream.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/gzfstream.h Sun Nov 28 21:52:08 2021 -0800 @@ -95,7 +95,7 @@ * @param mode Open mode flags. * @return @c this on success, NULL on failure. */ - gzfilebuf* + gzfilebuf * open (const char *name, std::ios_base::openmode mode); @@ -105,7 +105,7 @@ * @param mode Open mode flags. * @return @c this on success, NULL on failure. */ - gzfilebuf* + gzfilebuf * attach (int fd, std::ios_base::openmode mode); @@ -113,7 +113,7 @@ * @brief Close gzipped file. * @return @c this on success, NULL on failure. */ - gzfilebuf* + gzfilebuf * close (); protected: @@ -165,7 +165,7 @@ * * Call setbuf(0,0) to enable unbuffered output. */ - virtual std::streambuf* + virtual std::streambuf * setbuf (char_type *p, std::streamsize n); @@ -305,7 +305,7 @@ /** * Obtain underlying stream buffer. */ - gzfilebuf* + gzfilebuf * rdbuf () const { return const_cast(&m_sb); } @@ -392,7 +392,7 @@ /** * Obtain underlying stream buffer. */ - gzfilebuf* + gzfilebuf * rdbuf () const { return const_cast(&m_sb); } @@ -460,7 +460,7 @@ template friend gzofstream& operator<<(gzofstream&, - const gzomanip2&); + const gzomanip2&); // Constructor gzomanip2 (gzofstream& (*f)(gzofstream&, T1, T2), @@ -487,22 +487,22 @@ // Manipulator constructor stores arguments template inline -gzomanip2::gzomanip2 (gzofstream &(*f)(gzofstream &, T1, T2), - T1 v1, - T2 v2) +gzomanip2::gzomanip2 (gzofstream &(*f)(gzofstream&, T1, T2), + T1 v1, + T2 v2) : func(f), val1(v1), val2(v2) { } // Insertor applies underlying manipulator function to stream template inline gzofstream& -operator<<(gzofstream& s, const gzomanip2& m) +operator<<(gzofstream& s, const gzomanip2& m) { return (*m.func)(s, m.val1, m.val2); } // Insert this onto stream to simplify setting of compression level -inline gzomanip2 +inline gzomanip2 setcompression (int l, int s = Z_DEFAULT_STRATEGY) -{ return gzomanip2(&setcompression, l, s); } +{ return gzomanip2(&setcompression, l, s); } #endif diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/jsondecode.cc --- a/libinterp/corefcn/jsondecode.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/jsondecode.cc Sun Nov 28 21:52:08 2021 -0800 @@ -45,7 +45,7 @@ static octave_value decode (const rapidjson::Value& val, - const octave::make_valid_name_options* options); + const octave::make_valid_name_options *options); //! Decodes a numerical JSON value into a scalar number. //! @@ -95,19 +95,19 @@ static octave_value decode_object (const rapidjson::Value& val, - const octave::make_valid_name_options* options) + const octave::make_valid_name_options *options) { octave_scalar_map retval; for (const auto& pair : val.GetObject ()) - { - // Validator function "matlab.lang.makeValidName" to guarantee legitimate - // variable name. - std::string varname = pair.name.GetString (); - if (options != nullptr) - octave::make_valid_name (varname, *options); - retval.assign (varname, decode (pair.value, options)); - } + { + // Validator function "matlab.lang.makeValidName" to guarantee legitimate + // variable name. + std::string varname = pair.name.GetString (); + if (options != nullptr) + octave::make_valid_name (varname, *options); + retval.assign (varname, decode (pair.value, options)); + } return retval; } @@ -188,7 +188,7 @@ static octave_value decode_string_and_mixed_array (const rapidjson::Value& val, - const octave::make_valid_name_options* options) + const octave::make_valid_name_options *options) { Cell retval (dim_vector (val.Size (), 1)); octave_idx_type index = 0; @@ -224,7 +224,7 @@ static octave_value decode_object_array (const rapidjson::Value& val, - const octave::make_valid_name_options* options) + const octave::make_valid_name_options *options) { Cell struct_cell = decode_string_and_mixed_array (val, options).cell_value (); string_vector field_names = struct_cell(0).scalar_map_value ().fieldnames (); @@ -290,7 +290,7 @@ static octave_value decode_array_of_arrays (const rapidjson::Value& val, - const octave::make_valid_name_options* options) + const octave::make_valid_name_options *options) { // Some arrays should be decoded as NDArrays and others as cell arrays Cell cell = decode_string_and_mixed_array (val, options).cell_value (); @@ -400,7 +400,7 @@ static octave_value decode_array (const rapidjson::Value& val, - const octave::make_valid_name_options* options) + const octave::make_valid_name_options *options) { // Handle empty arrays if (val.Empty ()) @@ -415,7 +415,7 @@ { rapidjson::Type current_elem_type = elem.GetType (); if (is_numeric && ! (current_elem_type == rapidjson::kNullType - || current_elem_type == rapidjson::kNumberType)) + || current_elem_type == rapidjson::kNumberType)) is_numeric = false; if (same_type && (current_elem_type != array_type)) // RapidJSON doesn't have kBoolean Type it has kTrueType and kFalseType @@ -463,7 +463,7 @@ static octave_value decode (const rapidjson::Value& val, - const octave::make_valid_name_options* options) + const octave::make_valid_name_options *options) { if (val.IsBool ()) return val.GetBool (); @@ -598,11 +598,11 @@ for (auto i = 1; i < nargin; i = i + 2) { std::string parameter = args(i).xstring_value ("jsondecode: " - "option argument must be a string"); + "option argument must be a string"); if (string::strcmpi (parameter, "makeValidName")) { use_makeValidName = args(i + 1).xbool_value ("jsondecode: " - "'makeValidName' value must be a bool"); + "'makeValidName' value must be a bool"); } else make_valid_name_params.append (args.slice(i, 2)); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/jsonencode.cc --- a/libinterp/corefcn/jsonencode.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/jsonencode.cc Sun Nov 28 21:52:08 2021 -0800 @@ -133,33 +133,33 @@ // In this case, we already have a vector. So, we transform it to 2-D // vector in order to be detected by "isvector" in the recursive call if (dims.num_ones () == ndims - 1) - { - // Handle the special case when the input is a vector with more than - // 2 dimensions (e.g. cat (8, ['a'], ['c'])). In this case, we don't - // add dimension brackets and treat it as if it is a vector - if (level != 0) - // Place an opening and a closing bracket (represents a dimension) - // for every dimension that equals 1 until we reach the 2-D vector - for (int i = level; i < ndims - 1; ++i) - writer.StartArray (); + { + // Handle the special case when the input is a vector with more than + // 2 dimensions (e.g. cat (8, ['a'], ['c'])). In this case, we don't + // add dimension brackets and treat it as if it is a vector + if (level != 0) + // Place an opening and a closing bracket (represents a dimension) + // for every dimension that equals 1 until we reach the 2-D vector + for (int i = level; i < ndims - 1; ++i) + writer.StartArray (); - encode_string (writer, array.as_row (), original_dims, level); + encode_string (writer, array.as_row (), original_dims, level); - if (level != 0) - for (int i = level; i < ndims - 1; ++i) - writer.EndArray (); - } + if (level != 0) + for (int i = level; i < ndims - 1; ++i) + writer.EndArray (); + } else { // We place an opening and a closing bracket for each dimension // that equals 1 to preserve the number of dimensions when decoding // the array after encoding it. if (original_dims(level) == 1 && level != 1) - { - writer.StartArray (); - encode_string (writer, array, original_dims, level + 1); - writer.EndArray (); - } + { + writer.StartArray (); + encode_string (writer, array, original_dims, level + 1); + writer.EndArray (); + } else { // The second dimension contains the number of the chars in @@ -341,12 +341,12 @@ // that equals 1 to preserve the number of dimensions when decoding // the array after encoding it. if (original_dims (level) == 1) - { - writer.StartArray (); - encode_array (writer, array, ConvertInfAndNaN, - original_dims, level + 1, is_logical); - writer.EndArray (); - } + { + writer.StartArray (); + encode_array (writer, array, ConvertInfAndNaN, + original_dims, level + 1, is_logical); + writer.EndArray (); + } else { for (idx = 0; idx < ndims; ++idx) diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/latex-text-renderer.cc --- a/libinterp/corefcn/latex-text-renderer.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/latex-text-renderer.cc Sun Nov 28 21:52:08 2021 -0800 @@ -52,7 +52,7 @@ class OCTINTERP_API latex_renderer : public base_text_renderer - { + { public: @@ -61,27 +61,27 @@ m_color (dim_vector (1, 3), 0), m_latex_binary ("latex"), m_dvipng_binary ("dvipng"), m_dvisvg_binary ("dvisvgm"), m_debug (false), m_testing (true) - { - std::string bin = sys::env::getenv ("OCTAVE_LATEX_BINARY"); - if (! bin.empty ()) - m_latex_binary = quote_string (bin); + { + std::string bin = sys::env::getenv ("OCTAVE_LATEX_BINARY"); + if (! bin.empty ()) + m_latex_binary = quote_string (bin); - bin = sys::env::getenv ("OCTAVE_DVIPNG_BINARY"); - if (! bin.empty ()) - m_dvipng_binary = quote_string (bin); + bin = sys::env::getenv ("OCTAVE_DVIPNG_BINARY"); + if (! bin.empty ()) + m_dvipng_binary = quote_string (bin); - bin = sys::env::getenv ("OCTAVE_DVISVG_BINARY"); - if (! bin.empty ()) - m_dvisvg_binary = quote_string (bin); + bin = sys::env::getenv ("OCTAVE_DVISVG_BINARY"); + if (! bin.empty ()) + m_dvisvg_binary = quote_string (bin); - m_debug = ! sys::env::getenv ("OCTAVE_LATEX_DEBUG_FLAG").empty (); - } + m_debug = ! sys::env::getenv ("OCTAVE_LATEX_DEBUG_FLAG").empty (); + } ~latex_renderer (void) - { - if (! m_tmp_dir.empty () && ! m_debug) - sys::recursive_rmdir (m_tmp_dir); - } + { + if (! m_tmp_dir.empty () && ! m_debug) + sys::recursive_rmdir (m_tmp_dir); + } void set_font (const std::string& /*name*/, const std::string& /*weight*/, const std::string& /*angle*/, double size) @@ -160,7 +160,7 @@ + std::to_string (m_color(2))); } - void warn_helper (std::string caller, std::string txt,std::string cmd, + void warn_helper (std::string caller, std::string txt, std::string cmd, process_execution_result result); uint8NDArray render (const std::string& txt, int halign = 0); @@ -252,8 +252,8 @@ env = "flushright"; latex_txt = std::string ("\\begin{" ) + env + "}\n" - + latex_txt + "\n" - + "\\end{" + env + "}\n"; + + latex_txt + "\n" + + "\\end{" + env + "}\n"; // Write to temporary .tex file std::ofstream file; @@ -288,7 +288,7 @@ "Wrong type for info"); height = info.getfield ("rows").int_value (); width = info.getfield ("columns").int_value (); - Cell region (dim_vector(1,2)); + Cell region (dim_vector(1, 2)); region(0) = range (1.0, height); region(1) = range (1.0, width); info.setfield ("region", region); @@ -315,7 +315,7 @@ } data = uint8NDArray (dim_vector (4, width, height), - static_cast (0)); + static_cast (0)); for (int i = 0; i < height; i++) { @@ -324,7 +324,7 @@ data(0, j, i) = m_color(0); data(1, j, i) = m_color(1); data(2, j, i) = m_color(2); - data(3, j, i) = alpha(height-i-1,j); + data(3, j, i) = alpha(height-i-1, j); } } @@ -505,7 +505,7 @@ fix_bbox_anchor (bbox, halign, valign, rot_mode, handle_rotation); } - base_text_renderer* + base_text_renderer * make_latex_text_renderer (void) { latex_renderer *renderer = new latex_renderer (); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/ls-mat5.cc --- a/libinterp/corefcn/ls-mat5.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/ls-mat5.cc Sun Nov 28 21:52:08 2021 -0800 @@ -1139,7 +1139,7 @@ classname = name; } } - // Fall-through + // Fall-through case MAT_FILE_STRUCT_CLASS: { @@ -2010,7 +2010,7 @@ } int -save_mat5_array_length (const float* /* val */, octave_idx_type nel, bool) +save_mat5_array_length (const float * /* val */, octave_idx_type nel, bool) { if (nel > 0) { diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/lu.cc --- a/libinterp/corefcn/lu.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/lu.cc Sun Nov 28 21:52:08 2021 -0800 @@ -171,7 +171,7 @@ Matrix tmp = args(n++).matrix_value (); if (tmp.numel () == 1) { - thresh.resize (1,2); + thresh.resize (1, 2); thresh(0) = tmp(0); thresh(1) = tmp(0); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/mex.cc --- a/libinterp/corefcn/mex.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/mex.cc Sun Nov 28 21:52:08 2021 -0800 @@ -3816,7 +3816,7 @@ mxArray * mxCreateNumericMatrix (mwSize m, mwSize n, mxClassID class_id, - mxComplexity flag) + mxComplexity flag) { return maybe_mark_array (new mxArray (false, class_id, m, n, flag)); } @@ -3831,7 +3831,7 @@ mxArray * mxCreateUninitNumericArray (mwSize ndims, const mwSize *dims, - mxClassID class_id, mxComplexity flag) + mxClassID class_id, mxComplexity flag) { return maybe_mark_array (new mxArray (false, class_id, ndims, dims, flag, false)); @@ -3846,7 +3846,7 @@ mxArray * mxCreateUninitNumericMatrix (mwSize m, mwSize n, mxClassID class_id, - mxComplexity flag) + mxComplexity flag) { return maybe_mark_array (new mxArray (false, class_id, m, n, flag, false)); } @@ -5117,7 +5117,7 @@ return retval; } -std::map mex_lock_count; +std::map mex_lock_count; void mexLock (void) diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/oct-stream.cc --- a/libinterp/corefcn/oct-stream.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/oct-stream.cc Sun Nov 28 21:52:08 2021 -0800 @@ -365,7 +365,7 @@ std::size_t m_curr_idx; // List of format elements. - std::deque m_fmt_elts; + std::deque m_fmt_elts; // Temporary buffer. std::ostringstream m_buf; @@ -864,7 +864,7 @@ std::size_t m_curr_idx; // List of format elements. - std::deque m_fmt_elts; + std::deque m_fmt_elts; // Temporary buffer. std::ostringstream m_buf; @@ -1780,7 +1780,7 @@ std::size_t m_curr_idx; // List of format elements. - std::deque m_fmt_elts; + std::deque m_fmt_elts; // list holding column arrays of types specified by conversions std::list m_output_container; @@ -2480,7 +2480,7 @@ std::istringstream strstr (first_line); delimited_stream ds (strstr, is); - dim_vector dv (1,1); // initial size of each output_container + dim_vector dv (1, 1); // initial size of each output_container Complex val; octave_value val_type; m_nconv = 0; @@ -2597,7 +2597,7 @@ // Create our own buffered stream, for fast get/putback/tell/seek. // First, see how far ahead it should let us look. - int max_lookahead = std::max ({m_comment_len, m_treat_as_empty_len, + int max_lookahead = std::max ({m_comment_len, m_treat_as_empty_len, m_delim_len, 3}); // 3 for NaN and Inf // Next, choose a buffer size to avoid reading too much, or too often. @@ -2619,7 +2619,7 @@ // Grow retval dynamically. "size" is half the initial size // (FIXME: Should we start smaller if ntimes is large?) octave_idx_type size = ((ntimes < 8 && ntimes >= 0) ? ntimes : 1); - Array row_idx (dim_vector (1,2)); + Array row_idx (dim_vector (1, 2)); row_idx(1) = 0; int err = 0; @@ -2713,7 +2713,7 @@ } // convert return value to Cell array - Array ra_idx (dim_vector (1,2)); + Array ra_idx (dim_vector (1, 2)); // (err & 1) means "error, and no columns read this row // FIXME: This may redundant now that done_after=0 says the same @@ -2737,7 +2737,7 @@ dv = dim_vector (std::max (valid_rows - 1, 0), 1); ra_idx(1) = i; - retval = cat_op (retval, octave_value (Cell (col.resize (dv,0))), + retval = cat_op (retval, octave_value (Cell (col.resize (dv, 0))), ra_idx); i++; } @@ -2759,14 +2759,14 @@ ra_idx(1) = i++; retval = cat_op (retval, octave_value (Cell (cur)), ra_idx); } - cur = octave_value (col.resize (dv,0)); + cur = octave_value (col.resize (dv, 0)); group_size = 1; prev_type = col.type_id (); } else { ra_idx(1) = group_size++; - cur = cat_op (cur, octave_value (col.resize (dv,0)), ra_idx); + cur = cat_op (cur, octave_value (col.resize (dv, 0)), ra_idx); } } ra_idx(1) = i; @@ -3123,8 +3123,8 @@ { std::string delim = delimiters(i).string_value (); std::size_t start = (retval.length () > delim.length () - ? retval.length () - delim.length () - : 0); + ? retval.length () - delim.length () + : 0); std::string may_match = retval.substr (start); if (may_match == delim) { @@ -3610,7 +3610,7 @@ { if (m_delim_list(j).is_sq_string ()) m_delim_list(j) = do_string_escapes (m_delim_list(j) - .string_value ()); + .string_value ()); octave_idx_type len = m_delim_list(j).string_value () .length (); m_delim_len = std::max (static_cast (len), @@ -4432,8 +4432,8 @@ } template void - do_scanf_conv (std::istream&, const scanf_format_elt&, double*, - Matrix&, double*, octave_idx_type&, octave_idx_type&, + do_scanf_conv (std::istream&, const scanf_format_elt&, double *, + Matrix&, double *, octave_idx_type&, octave_idx_type&, octave_idx_type, octave_idx_type, bool); #define DO_WHITESPACE_CONVERSION() \ diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/oct-strstrm.cc --- a/libinterp/corefcn/oct-strstrm.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/oct-strstrm.cc Sun Nov 28 21:52:08 2021 -0800 @@ -63,16 +63,16 @@ stream istrstream::create (const std::string& data, std::ios::openmode arg_md, - mach_info::float_format flt_fmt, - const std::string& encoding) + mach_info::float_format flt_fmt, + const std::string& encoding) { return stream (new istrstream (data, arg_md, flt_fmt, encoding)); } stream ostrstream::create (std::ios::openmode arg_md, - mach_info::float_format flt_fmt, - const std::string& encoding) + mach_info::float_format flt_fmt, + const std::string& encoding) { return stream (new ostrstream (arg_md, flt_fmt, encoding)); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/ordqz.cc --- a/libinterp/corefcn/ordqz.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/ordqz.cc Sun Nov 28 21:52:08 2021 -0800 @@ -289,7 +289,7 @@ for (k = 0; k < nn-1; k++) { - if (caa(k+1,k) != 0.0) + if (caa(k+1, k) != 0.0) error_with_id ("Octave:ordqz:unsupported_AA", "ordqz: quasi upper triangular matrices are not " "allowed with complex data"); @@ -297,8 +297,8 @@ for (k = 0; k < nn; k++) { - alpha(k) = caa(k,k); - beta(k) = cbb(k,k); + alpha(k) = caa(k, k); + beta(k) = cbb(k, k); } for (k = 0; k < nn; k++) @@ -377,11 +377,11 @@ #ifdef DEBUG octave_stdout << "ordqz: k = " << k << " nn = " << nn << " \n"; #endif - if ((k < nn-1 && aa(k+1,k) == 0.0) || k == nn-1) + if ((k < nn-1 && aa(k+1, k) == 0.0) || k == nn-1) { - alphar(k) = aa(k,k); + alphar(k) = aa(k, k); alphai(k) = 0.0; - beta(k) = bb(k,k); + beta(k) = bb(k, k); k++; } else @@ -403,7 +403,7 @@ F77_CONST_CHAR_ARG2 (&comp_q, 1), F77_CONST_CHAR_ARG2 (&comp_z, 1), nl, ilo, ihi, - &aa_vec[k+k*nn] , nn, + &aa_vec[k+k*nn], nn, &bb_vec[k+k*nn], nn, ar, ai, b, nullptr, nn, diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/pager.h --- a/libinterp/corefcn/pager.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/pager.h Sun Nov 28 21:52:08 2021 -0800 @@ -39,7 +39,7 @@ OCTAVE_NAMESPACE_BEGIN class interpreter; -class oprocstream; + class oprocstream; class OCTINTERP_API diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/pr-output.cc --- a/libinterp/corefcn/pr-output.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/pr-output.cc Sun Nov 28 21:52:08 2021 -0800 @@ -312,7 +312,7 @@ for (octave_idx_type j = 0; j < nc; j++) for (octave_idx_type i = 0; i < nr; i++) { - T val = m(i,j); + T val = m(i, j); if (! octave::math::isfinite (val)) continue; @@ -342,7 +342,7 @@ for (octave_idx_type j = 0; j < nc; j++) for (octave_idx_type i = 0; i < nr; i++) { - T val = m(i,j); + T val = m(i, j); if (! octave::math::isfinite (val)) continue; @@ -1825,7 +1825,7 @@ for (octave_idx_type i = 0; i < nr; i++) { for (octave_idx_type j = 0; j < nc; j++) - os << ' ' << m.elem(i,j); + os << ' ' << m.elem (i, j); if (i < nr - 1) os << "\n"; @@ -1848,7 +1848,7 @@ { octave_quit (); - pr_plus_format (os, m(i,j)); + pr_plus_format (os, m(i, j)); } if (i < nr - 1) @@ -1934,7 +1934,7 @@ os << " "; } - pr_float (os, fmt, m(i,j)); + pr_float (os, fmt, m(i, j)); } col += inc; @@ -1974,7 +1974,7 @@ os << " "; - pr_float (os, fmt, m(i,j)); + pr_float (os, fmt, m(i, j)); } if (i < nr - 1) @@ -2050,7 +2050,7 @@ os << " "; } - pr_float (os, fmt, m(j,j)); + pr_float (os, fmt, m(j, j)); } col += inc; @@ -2099,7 +2099,7 @@ os << " "; if (i == j) - pr_float (os, fmt, m(i,j)); + pr_float (os, fmt, m(i, j)); else os << std::setw (zero_fw) << '0'; } @@ -2380,7 +2380,7 @@ os << " "; - os << std::setw (fw) << m(i,j); + os << std::setw (fw) << m(i, j); } if (i < nr - 1) @@ -2536,7 +2536,7 @@ { os << ' '; for (octave_idx_type i = 0; i < num_elem; i++) - os << ' ' << r.elem(i); + os << ' ' << r.elem (i); return; } @@ -2769,7 +2769,7 @@ for (octave_idx_type ii = 0; ii < n_rows; ii++) { for (octave_idx_type jj = 0; jj < n_cols; jj++) - os << " " << page(ii,jj); + os << " " << page(ii, jj); os << "\n"; } @@ -3004,7 +3004,7 @@ { octave_quit (); - pr_plus_format (os, page(ii,jj)); + pr_plus_format (os, page(ii, jj)); } if ((ii < nr - 1) || (i < m -1)) @@ -3148,7 +3148,7 @@ { octave_quit (); os << " "; - pr_int (os, page(ii,jj), fw); + pr_int (os, page(ii, jj), fw); } if ((ii < n_rows - 1) || (i < m -1)) os << "\n"; diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/qz.cc --- a/libinterp/corefcn/qz.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/qz.cc Sun Nov 28 21:52:08 2021 -0800 @@ -297,10 +297,10 @@ // First, declare variables used in both the real and complex cases. // FIXME: There are a lot of excess variables declared. // Probably a better way to handle this. - Matrix QQ (nn,nn), ZZ (nn,nn), VR (nn,nn), VL (nn,nn); + Matrix QQ (nn, nn), ZZ (nn, nn), VR (nn, nn), VL (nn, nn); RowVector alphar (nn), alphai (nn), betar (nn); ComplexRowVector xalpha (nn), xbeta (nn); - ComplexMatrix CQ (nn,nn), CZ (nn,nn), CVR (nn,nn), CVL (nn,nn); + ComplexMatrix CQ (nn, nn), CZ (nn, nn), CVR (nn, nn), CVL (nn, nn); F77_INT ilo, ihi, info; char comp_q = (nargout >= 3 ? 'V' : 'N'); char comp_z = ((nargout >= 4 || nargin == 3)? 'V' : 'N'); @@ -314,8 +314,8 @@ std::fill_n (ZZptr, ZZ.numel (), 0.0); for (F77_INT i = 0; i < nn; i++) { - QQ(i,i) = 1.0; - ZZ(i,i) = 1.0; + QQ(i, i) = 1.0; + ZZ(i, i) = 1.0; } } @@ -760,18 +760,18 @@ if (j == (nn-1)) // Single column. cinc = 1; - else if (aa(j+1,j) == 0) + else if (aa(j+1, j) == 0) cinc = 1; // Now copy the eigenvector (s) to CVR, CVL. if (cinc == 1) { for (F77_INT i = 0; i < nn; i++) - CVR(i,j) = VR(i,j); + CVR(i, j) = VR(i, j); if (side == 'B') for (F77_INT i = 0; i < nn; i++) - CVL(i,j) = VL(i,j); + CVL(i, j) = VL(i, j); } else { @@ -779,15 +779,15 @@ for (F77_INT i = 0; i < nn; i++) { - CVR(i,j) = Complex (VR(i,j), VR(i,j+1)); - CVR(i,j+1) = Complex (VR(i,j), -VR(i,j+1)); + CVR(i, j) = Complex (VR(i, j), VR(i, j+1)); + CVR(i, j+1) = Complex (VR(i, j), -VR(i, j+1)); } if (side == 'B') for (F77_INT i = 0; i < nn; i++) { - CVL(i,j) = Complex (VL(i,j), VL(i,j+1)); - CVL(i,j+1) = Complex (VL(i,j), -VL(i,j+1)); + CVL(i, j) = Complex (VL(i, j), VL(i, j+1)); + CVL(i, j+1) = Complex (VL(i, j), -VL(i, j+1)); } } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/schur.cc --- a/libinterp/corefcn/schur.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/schur.cc Sun Nov 28 21:52:08 2021 -0800 @@ -51,7 +51,7 @@ const typename Matrix::element_type zero = typename Matrix::element_type (); for (octave_idx_type i = 0; i < n; i++) - if (a(i,i) == zero) + if (a(i, i) == zero) return retval; retval.matrix_type (MatrixType::Upper); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/sparse-xdiv.cc --- a/libinterp/corefcn/sparse-xdiv.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/sparse-xdiv.cc Sun Nov 28 21:52:08 2021 -0800 @@ -336,28 +336,28 @@ // -*- 9 -*- SparseMatrix -xdiv (const SparseMatrix& a, const DiagMatrix& b, MatrixType &) +xdiv (const SparseMatrix& a, const DiagMatrix& b, MatrixType&) { return do_rightdiv_sm_dm (a, b); } // -*- 10 -*- SparseComplexMatrix -xdiv (const SparseMatrix& a, const ComplexDiagMatrix& b, MatrixType &) +xdiv (const SparseMatrix& a, const ComplexDiagMatrix& b, MatrixType&) { return do_rightdiv_sm_dm (a, b); } // -*- 11 -*- SparseComplexMatrix -xdiv (const SparseComplexMatrix& a, const DiagMatrix& b, MatrixType &) +xdiv (const SparseComplexMatrix& a, const DiagMatrix& b, MatrixType&) { return do_rightdiv_sm_dm (a, b); } // -*- 12 -*- SparseComplexMatrix -xdiv (const SparseComplexMatrix& a, const ComplexDiagMatrix& b, MatrixType &) +xdiv (const SparseComplexMatrix& a, const ComplexDiagMatrix& b, MatrixType&) { return do_rightdiv_sm_dm (a, b); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/sparse-xpow.cc --- a/libinterp/corefcn/sparse-xpow.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/sparse-xpow.cc Sun Nov 28 21:52:08 2021 -0800 @@ -267,7 +267,7 @@ for (octave_idx_type i = 0; i < nr; i++) { octave_quit (); - result(i, j) = std::pow (atmp, b(i,j)); + result(i, j) = std::pow (atmp, b(i, j)); } } @@ -282,7 +282,7 @@ for (octave_idx_type i = 0; i < nr; i++) { octave_quit (); - result(i, j) = std::pow (a, b(i,j)); + result(i, j) = std::pow (a, b(i, j)); } } @@ -307,7 +307,7 @@ for (octave_idx_type i = 0; i < nr; i++) { octave_quit (); - result(i, j) = std::pow (atmp, b(i,j)); + result(i, j) = std::pow (atmp, b(i, j)); } } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/sparse.cc --- a/libinterp/corefcn/sparse.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/sparse.cc Sun Nov 28 21:52:08 2021 -0800 @@ -222,7 +222,7 @@ idx_vector j = args(1).index_vector (); if (args(2).islogical ()) - retval = SparseBoolMatrix (args(2).bool_array_value (), i,j, + retval = SparseBoolMatrix (args(2).bool_array_value (), i, j, m, n, summation, nzmax); else if (args(2).iscomplex ()) retval = SparseComplexMatrix (args(2).complex_array_value(), diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/stack-frame.h --- a/libinterp/corefcn/stack-frame.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/stack-frame.h Sun Nov 28 21:52:08 2021 -0800 @@ -118,24 +118,24 @@ // stored in the function scope corresponding to the stack frame. enum scope_flags - { - LOCAL, - GLOBAL, - PERSISTENT - }; + { + LOCAL, + GLOBAL, + PERSISTENT + }; // Index into the list of automatic variables for user-defined // function stack frames. enum auto_var_type - { - ARG_NAMES, - IGNORED, - NARGIN, - NARGOUT, - SAVED_WARNING_STATES, - NUM_AUTO_VARS - }; + { + ARG_NAMES, + IGNORED, + NARGIN, + NARGOUT, + SAVED_WARNING_STATES, + NUM_AUTO_VARS + }; stack_frame (void) = delete; @@ -477,9 +477,9 @@ } void non_const_unary_op (octave_value::unary_op op, - const symbol_record& sym, - const std::string& type, - const std::list& idx) + const symbol_record& sym, + const std::string& type, + const std::list& idx) { if (idx.empty ()) varref (sym).non_const_unary_op (op); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/strfns.cc --- a/libinterp/corefcn/strfns.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/strfns.cc Sun Nov 28 21:52:08 2021 -0800 @@ -1083,7 +1083,7 @@ NDArray output (args(0).dims (), false); for (octave_idx_type i = 0; i < cellstr.numel (); i++) { - const uint8_t *src + const uint8_t *src = reinterpret_cast (cellstr(i).c_str ()); output(i) = octave_u8_mbsnlen_wrapper (src, cellstr(i).size ()); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/svd.cc --- a/libinterp/corefcn/svd.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/svd.cc Sun Nov 28 21:52:08 2021 -0800 @@ -43,7 +43,7 @@ template static typename math::svd::Type -svd_type (int nargin, int nargout, const octave_value_list & args, const T & A) +svd_type (int nargin, int nargout, const octave_value_list& args, const T& A) { if (nargout == 0 || nargout == 1) return math::svd::Type::sigma_only; @@ -65,11 +65,11 @@ svd_driver (void) { if (Vsvd_driver == "gejsv") - return math::svd::Driver::GEJSV; + return math::svd::Driver::GEJSV; else if (Vsvd_driver == "gesdd") - return math::svd::Driver::GESDD; + return math::svd::Driver::GESDD; else - return math::svd::Driver::GESVD; // default + return math::svd::Driver::GESVD; // default } DEFUN (svd, args, nargout, diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/symrcm.cc --- a/libinterp/corefcn/symrcm.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/symrcm.cc Sun Nov 28 21:52:08 2021 -0800 @@ -101,7 +101,7 @@ // Dequeue operation (removes a node from the head) inline static CMK_Node -Q_deq (CMK_Node * Q, octave_idx_type N, octave_idx_type& qh) +Q_deq (CMK_Node *Q, octave_idx_type N, octave_idx_type& qh) { CMK_Node r = Q[qh]; qh = (qh + 1) % (N + 1); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/symscope.h --- a/libinterp/corefcn/symscope.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/symscope.h Sun Nov 28 21:52:08 2021 -0800 @@ -56,14 +56,14 @@ public: typedef std::map::const_iterator - table_const_iterator; + table_const_iterator; typedef std::map::iterator - table_iterator; + table_iterator; typedef std::map::const_iterator - subfunctions_const_iterator; + subfunctions_const_iterator; typedef std::map::iterator - subfunctions_iterator; + subfunctions_iterator; symbol_scope_rep (const std::string& name = "") : m_name (name), m_symbols (), m_subfunctions (), @@ -258,7 +258,7 @@ std::list parent_fcn_names (void) const; - octave_user_code *user_code (void) const { return m_code; } + octave_user_code * user_code (void) const { return m_code; } void set_user_code (octave_user_code *code) { m_code = code; } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/sysdep.cc --- a/libinterp/corefcn/sysdep.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/sysdep.cc Sun Nov 28 21:52:08 2021 -0800 @@ -1141,7 +1141,7 @@ { octave_value key_val; LONG retval = get_regkey_value (h_rootkey, subkey_name, - value_name, key_val); + value_name, key_val); if (retval == ERROR_FILE_NOT_FOUND) error ("winqueryreg: no value found for '%s' at %s\\%s", value_name.c_str (), rootkey_name.c_str (), diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/text-engine.h --- a/libinterp/corefcn/text-engine.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/text-engine.h Sun Nov 28 21:52:08 2021 -0800 @@ -81,7 +81,7 @@ void accept (text_processor& p); private: - text_element_string (const text_element_string &); + text_element_string (const text_element_string&); //-------- @@ -159,7 +159,7 @@ private: text_element_subscript (void); - + //-------- text_element *m_elem; @@ -457,7 +457,7 @@ text_element *m_result; }; - inline text_element* + inline text_element * text_parser::parse (const std::string& s, const caseless_str& interpreter) { std::unique_ptr parser; diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/text-renderer.h --- a/libinterp/corefcn/text-renderer.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/text-renderer.h Sun Nov 28 21:52:08 2021 -0800 @@ -136,7 +136,7 @@ string (const std::string& s, font& f, const double x, const double y) : m_str (s), m_family (f.get_name ()), m_fnt (f), m_x (x), m_y (y), - m_z (0.0), m_xdata (), m_code (0), m_color (Matrix (1,3,0.0)), + m_z (0.0), m_xdata (), m_code (0), m_color (Matrix (1, 3, 0.0)), m_svg_element () { } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/tril.cc --- a/libinterp/corefcn/tril.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/tril.cc Sun Nov 28 21:52:08 2021 -0800 @@ -291,7 +291,7 @@ ov_idx(0) = range (1, nr); idx_tmp.push_back (ov_idx); ov_idx(1) = static_cast (nc); - tmp = tmp.resize (dim_vector (0,0)); + tmp = tmp.resize (dim_vector (0, 0)); tmp = tmp.subsasgn ("(", idx_tmp, arg.index_op (ov_idx)); tmp = tmp.resize (dims); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/variables.h --- a/libinterp/corefcn/variables.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/variables.h Sun Nov 28 21:52:08 2021 -0800 @@ -138,35 +138,41 @@ OCTAVE_DEPRECATED (7, "use 'octave::set_internal_variable' instead") inline octave_value -set_internal_variable (int& var, const octave_value_list& args, int nargout, const char *nm, int minval = std::numeric_limits::min (), int maxval = std::numeric_limits::max ()) +set_internal_variable (int& var, const octave_value_list& args, int nargout, const char *nm, + int minval = std::numeric_limits::min (), int maxval = std::numeric_limits::max ()) { return octave::set_internal_variable (var, args, nargout, nm, minval, maxval); } OCTAVE_DEPRECATED (7, "use 'octave::set_internal_variable' instead") inline octave_value -set_internal_variable (double& var, const octave_value_list& args, int nargout, const char *nm, double minval = -octave::numeric_limits::Inf (), double maxval = octave::numeric_limits::Inf ()) +set_internal_variable (double& var, const octave_value_list& args, int nargout, const char *nm, + double minval = -octave::numeric_limits::Inf (), + double maxval = octave::numeric_limits::Inf ()) { return octave::set_internal_variable (var, args, nargout, nm, minval, maxval); } OCTAVE_DEPRECATED (7, "use 'octave::set_internal_variable' instead") inline octave_value -set_internal_variable (std::string& var, const octave_value_list& args, int nargout, const char *nm, bool empty_ok = true) +set_internal_variable (std::string& var, const octave_value_list& args, int nargout, const char *nm, + bool empty_ok = true) { return octave::set_internal_variable (var, args, nargout, nm, empty_ok); } OCTAVE_DEPRECATED (7, "use 'octave::set_internal_variable' instead") inline octave_value -set_internal_variable (std::string& var, const octave_value_list& args, int nargout, const char *nm, const char **choices) +set_internal_variable (std::string& var, const octave_value_list& args, int nargout, const char *nm, + const char **choices) { return octave::set_internal_variable (var, args, nargout, nm, choices); } OCTAVE_DEPRECATED (7, "use 'octave::set_internal_variable' instead") inline octave_value -set_internal_variable (int& var, const octave_value_list& args, int nargout, const char *nm, const char **choices) +set_internal_variable (int& var, const octave_value_list& args, int nargout, const char *nm, + const char **choices) { return octave::set_internal_variable (var, args, nargout, nm, choices); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/corefcn/xdiv.h --- a/libinterp/corefcn/xdiv.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/corefcn/xdiv.h Sun Nov 28 21:52:08 2021 -0800 @@ -79,14 +79,14 @@ extern FloatComplexMatrix elem_xdiv (float a, const FloatComplexMatrix& b); extern FloatComplexMatrix elem_xdiv (const FloatComplex a, const FloatMatrix& b); extern FloatComplexMatrix elem_xdiv (const FloatComplex a, - const FloatComplexMatrix& b); + const FloatComplexMatrix& b); extern FloatNDArray elem_xdiv (float a, const FloatNDArray& b); extern FloatComplexNDArray elem_xdiv (float a, const FloatComplexNDArray& b); extern FloatComplexNDArray elem_xdiv (const FloatComplex a, - const FloatNDArray& b); + const FloatNDArray& b); extern FloatComplexNDArray elem_xdiv (const FloatComplex a, - const FloatComplexNDArray& b); + const FloatComplexNDArray& b); extern FloatMatrix xleftdiv (const FloatMatrix& a, const FloatMatrix& b, MatrixType& typ, @@ -250,21 +250,24 @@ OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead") inline ComplexMatrix -xleftdiv (const Matrix& a, const ComplexMatrix& b, MatrixType& typ, blas_trans_type transt = blas_no_trans) +xleftdiv (const Matrix& a, const ComplexMatrix& b, MatrixType& typ, + blas_trans_type transt = blas_no_trans) { return octave::xleftdiv (a, b, typ, transt); } OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead") inline ComplexMatrix -xleftdiv (const ComplexMatrix& a, const Matrix& b, MatrixType& typ, blas_trans_type transt = blas_no_trans) +xleftdiv (const ComplexMatrix& a, const Matrix& b, MatrixType& typ, + blas_trans_type transt = blas_no_trans) { return octave::xleftdiv (a, b, typ, transt); } OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead") inline ComplexMatrix -xleftdiv (const ComplexMatrix& a, const ComplexMatrix& b, MatrixType& typ, blas_trans_type transt = blas_no_trans) +xleftdiv (const ComplexMatrix& a, const ComplexMatrix& b, MatrixType& typ, + blas_trans_type transt = blas_no_trans) { return octave::xleftdiv (a, b, typ, transt); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/dldfcn/__glpk__.cc --- a/libinterp/dldfcn/__glpk__.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/dldfcn/__glpk__.cc Sun Nov 28 21:52:08 2021 -0800 @@ -128,7 +128,7 @@ // -- Set the objective coefficient of the corresponding // -- structural variable. No constant term is assumed. - glp_set_obj_coef(lp,i+1,c[i]); + glp_set_obj_coef(lp, i+1, c[i]); if (isMIP) glp_set_col_kind (lp, i+1, vartype[i]); @@ -401,12 +401,12 @@ { for (int j = 0; j < mrowsc; j++) { - if (A(i,j) != 0) + if (A(i, j) != 0) { nz++; rn(nz) = i + 1; cn(nz) = j + 1; - a(nz) = A(i,j); + a(nz) = A(i, j); } } } @@ -475,7 +475,7 @@ int isMIP = 0; for (int i = 0; i < mrowsc ; i++) { - if (VTYPE(i,0) == 'I') + if (VTYPE(i, 0) == 'I') { isMIP = 1; vartype(i) = GLP_IV; diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/dldfcn/__init_fltk__.cc --- a/libinterp/dldfcn/__init_fltk__.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/dldfcn/__init_fltk__.cc Sun Nov 28 21:52:08 2021 -0800 @@ -1277,7 +1277,7 @@ std::stringstream cbuf; cbuf.precision (4); cbuf.width (6); - Matrix v (1,2,0); + Matrix v (1, 2, 0); v = ap.get ("view").matrix_value (); cbuf << "[azimuth: " << v(0) << ", elevation: " << v(1) << ']'; @@ -1316,15 +1316,15 @@ // front point (nearest to the viewer) ColumnVector tmp = ap.get_transform ().untransform (px, py, x_zlim(0)); - pos(0,0) = tmp(0); - pos(0,1) = tmp(1); - pos(0,2) = tmp(2); + pos(0, 0) = tmp(0); + pos(0, 1) = tmp(1); + pos(0, 2) = tmp(2); // back point (furthest from the viewer) tmp = ap.get_transform ().untransform (px, py, x_zlim(1)); - pos(1,0) = tmp(0); - pos(1,1) = tmp(1); - pos(1,2) = tmp(2); + pos(1, 0) = tmp(0); + pos(1, 1) = tmp(1); + pos(1, 2) = tmp(2); ap.set_currentpoint (pos); if (ap.get_tag () != "legend" && ap.get_tag () != "colorbar") @@ -1748,7 +1748,7 @@ { pixel2status (m_ax_obj, m_pos_x, m_pos_y, Fl::event_x (), Fl::event_y () - menu_dy ()); - Matrix zoom_box (1,4,0); + Matrix zoom_box (1, 4, 0); zoom_box(0) = m_pos_x; zoom_box(1) = m_pos_y; zoom_box(2) = Fl::event_x (); @@ -1817,7 +1817,7 @@ if (m_canvas->zoom ()) { m_canvas->zoom (false); - double x0,y0,x1,y1; + double x0, y0, x1, y1; if (m_ax_obj && m_ax_obj.isa ("axes")) { axes::properties& ap = dynamic_cast @@ -1826,8 +1826,8 @@ int pos_x1 = Fl::event_x (); int pos_y1 = Fl::event_y () - menu_dy (); pixel2pos (m_ax_obj, pos_x1, pos_y1, x1, y1); - Matrix xl (1,2,0); - Matrix yl (1,2,0); + Matrix xl (1, 2, 0); + Matrix yl (1, 2, 0); int dx = abs (m_pos_x - pos_x1); int dy = abs (m_pos_y - pos_y1); // Smallest zoom box must be 4 pixels square @@ -2023,7 +2023,7 @@ static int curr_index; - typedef std::map window_map; + typedef std::map window_map; typedef window_map::iterator wm_iterator;; @@ -2201,7 +2201,7 @@ static int str2idx (const caseless_str& clstr) { int ind; - if (clstr.find (fltk_idx_header,0) == 0) + if (clstr.find (fltk_idx_header, 0) == 0) { std::istringstream istr (clstr.substr (fltk_idx_header.size ())); if (istr >> ind) diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/dldfcn/__init_gnuplot__.cc --- a/libinterp/dldfcn/__init_gnuplot__.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/dldfcn/__init_gnuplot__.cc Sun Nov 28 21:52:08 2021 -0800 @@ -82,7 +82,7 @@ be notified and will not update its internal list of open figure windows.\n\ The qt toolkit is recommended instead.\n"); - warned = true; + warned = true; } } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/dldfcn/__voronoi__.cc --- a/libinterp/dldfcn/__voronoi__.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/dldfcn/__voronoi__.cc Sun Nov 28 21:52:08 2021 -0800 @@ -251,7 +251,7 @@ Matrix F (num_voronoi_vertices+1, dim); for (octave_idx_type d = 0; d < dim; d++) - F(0,d) = numeric_limits::Inf (); + F(0, d) = numeric_limits::Inf (); // The cell array of vectors of indices into F that represent the // vertices of the Voronoi regions (cells). diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/dldfcn/audiodevinfo.cc --- a/libinterp/dldfcn/audiodevinfo.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/dldfcn/audiodevinfo.cc Sun Nov 28 21:52:08 2021 -0800 @@ -700,7 +700,7 @@ static int portaudio_play_callback (const void *, void *output, unsigned long frames, - const PaStreamCallbackTimeInfo*, + const PaStreamCallbackTimeInfo *, PaStreamCallbackFlags, void *data) { audioplayer *player = static_cast (data); @@ -1369,8 +1369,8 @@ float sample_l = input8[i*channels] / scale_factor; float sample_r = input8[i*channels + (channels - 1)] / scale_factor; - sound(i,0) = sample_l; - sound(i,1) = sample_r; + sound(i, 0) = sample_l; + sound(i, 1) = sample_r; } } // FIXME: This is a workaround for a bug in PortAudio affecting 8-Bit @@ -1389,8 +1389,8 @@ float sample_r = (input16[i*channels + (channels - 1)] >> 8) / scale_factor; - sound(i,0) = sample_l; - sound(i,1) = sample_r; + sound(i, 0) = sample_l; + sound(i, 1) = sample_r; } } else if (recorder->get_sampleFormat () == bits_to_format (16)) @@ -1404,8 +1404,8 @@ float sample_l = input16[i*channels] / scale_factor; float sample_r = input16[i*channels + (channels - 1)] / scale_factor; - sound(i,0) = sample_l; - sound(i,1) = sample_r; + sound(i, 0) = sample_l; + sound(i, 1) = sample_r; } } else if (recorder->get_sampleFormat () == bits_to_format (24)) @@ -1436,8 +1436,8 @@ if (sample_r32 & 0x00800000) sample_r32 |= 0xff000000; - sound(i,0) = sample_l32 / scale_factor; - sound(i,1) = sample_r32 / scale_factor; + sound(i, 0) = sample_l32 / scale_factor; + sound(i, 1) = sample_r32 / scale_factor; } } @@ -1742,8 +1742,8 @@ for (unsigned int i = 0; i < ls; i++) { - audio(0,i) = left[i]; - audio(1,i) = right[i]; + audio(0, i) = left[i]; + audio(1, i) = right[i]; } return audio; diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/cdef-class.cc --- a/libinterp/octave-value/cdef-class.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/cdef-class.cc Sun Nov 28 21:52:08 2021 -0800 @@ -286,7 +286,7 @@ Cell cdef_class::cdef_class_rep::get_methods (bool include_ctor) { - std::map meths; + std::map meths; find_methods (meths, false, include_ctor); @@ -395,7 +395,7 @@ Cell cdef_class::cdef_class_rep::get_properties (int mode) { - std::map props; + std::map props; props = get_property_map (mode); @@ -412,7 +412,7 @@ std::map cdef_class::cdef_class_rep::get_property_map (int mode) { - std::map props; + std::map props; find_properties (props, mode); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/cdef-class.h --- a/libinterp/octave-value/cdef-class.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/cdef-class.h Sun Nov 28 21:52:08 2021 -0800 @@ -172,7 +172,7 @@ OCTINTERP_API void find_names (std::set& names, bool all); OCTINTERP_API void - find_properties (std::map& props, + find_properties (std::map& props, int mode = 0); OCTINTERP_API void @@ -196,11 +196,11 @@ // The methods defined by this class. - std::map m_method_map; + std::map m_method_map; // The properties defined by this class. - std::map m_property_map; + std::map m_property_map; // The number of members in this class (methods, properties...) @@ -223,10 +223,10 @@ // Utility iterator typedefs. - typedef std::map::iterator method_iterator; - typedef std::map::const_iterator method_const_iterator; - typedef std::map::iterator property_iterator; - typedef std::map::const_iterator property_const_iterator; + typedef std::map::iterator method_iterator; + typedef std::map::const_iterator method_const_iterator; + typedef std::map::iterator property_iterator; + typedef std::map::const_iterator property_const_iterator; cdef_class_rep (const cdef_class_rep& c) = default; }; @@ -406,11 +406,11 @@ public: enum - { - property_normal, - property_inherited, - property_all - }; + { + property_normal, + property_inherited, + property_all + }; private: diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/cdef-manager.cc --- a/libinterp/octave-value/cdef-manager.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/cdef-manager.cc Sun Nov 28 21:52:08 2021 -0800 @@ -301,7 +301,7 @@ int i = 0; for (const auto& nm_pkg : toplevel_packages) - c(i++,0) = to_ov (nm_pkg.second); + c(i++, 0) = to_ov (nm_pkg.second); return octave_value_list (octave_value (c)); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/cdef-manager.h --- a/libinterp/octave-value/cdef-manager.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/cdef-manager.h Sun Nov 28 21:52:08 2021 -0800 @@ -102,7 +102,7 @@ make_class (const std::string& name, const cdef_class& super); OCTINTERP_API cdef_class - make_meta_class (const std::string& name, const cdef_class& super); + make_meta_class (const std::string& name, const cdef_class& super); OCTINTERP_API cdef_property make_property (const cdef_class& cls, const std::string& name, diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/cdef-method.cc --- a/libinterp/octave-value/cdef-method.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/cdef-method.cc Sun Nov 28 21:52:08 2021 -0800 @@ -183,7 +183,7 @@ } bool - cdef_method::cdef_method_rep::is_defined_in_class (const std::string &cname) const + cdef_method::cdef_method_rep::is_defined_in_class (const std::string& cname) const { return (m_function.is_function () ? m_function.function_value ()->dispatch_class () == cname diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/cdef-object.cc --- a/libinterp/octave-value/cdef-object.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/cdef-object.cc Sun Nov 28 21:52:08 2021 -0800 @@ -202,7 +202,7 @@ } } - cdef_object_rep* + cdef_object_rep * cdef_object_base::make_array (void) const { cdef_object_rep *r = new cdef_object_array (); @@ -289,8 +289,9 @@ for (octave_idx_type i = 0; i < n; i++) { - octave_value_list r = m_array(i).subsref (type, idx, 1, dummy_skip, - dummy_cls); + octave_value_list r = m_array(i).subsref (type, idx, 1, + dummy_skip, + dummy_cls); if (r.length () > 0) c(i) = r(0); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-base-diag.cc --- a/libinterp/octave-value/ov-base-diag.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-base-diag.cc Sun Nov 28 21:52:08 2021 -0800 @@ -76,7 +76,7 @@ template octave_value -octave_base_diag::diag (octave_idx_type k) const +octave_base_diag::diag (octave_idx_type k) const { octave_value retval; if (m_matrix.rows () == 1 || m_matrix.cols () == 1) @@ -485,7 +485,7 @@ octave_idx_type j) const { std::ostringstream buf; - octave_print_internal (buf, fmt, m_matrix(i,j)); + octave_print_internal (buf, fmt, m_matrix(i, j)); return buf.str (); } @@ -609,7 +609,7 @@ for (octave_idx_type j = 0; j < nc; j++) { std::ostringstream buf; - octave_print_internal (buf, m_matrix(i,j)); + octave_print_internal (buf, m_matrix(i, j)); std::string tmp = buf.str (); std::size_t pos = tmp.find_first_not_of (' '); if (pos != std::string::npos) diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-base-diag.h --- a/libinterp/octave-value/ov-base-diag.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-base-diag.h Sun Nov 28 21:52:08 2021 -0800 @@ -123,7 +123,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return to_dense ().sort (dim, mode); } - octave_value sort (Array &sidx, octave_idx_type dim = 0, + octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return to_dense ().sort (sidx, dim, mode); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-base-int.cc --- a/libinterp/octave-value/ov-base-int.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-base-int.cc Sun Nov 28 21:52:08 2021 -0800 @@ -280,7 +280,7 @@ octave_idx_type j) const { std::ostringstream buf; - octave_print_internal (buf, fmt, this->matrix(i,j)); + octave_print_internal (buf, fmt, this->matrix(i, j)); return buf.str (); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-base-int.h --- a/libinterp/octave-value/ov-base-int.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-base-int.h Sun Nov 28 21:52:08 2021 -0800 @@ -171,7 +171,7 @@ OCTINTERP_API bool save_binary (std::ostream& os, bool); OCTINTERP_API bool load_binary (std::istream& is, bool swap, - octave::mach_info::float_format); + octave::mach_info::float_format); protected: OCTINTERP_API bool diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-base-mat.cc --- a/libinterp/octave-value/ov-base-mat.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-base-mat.cc Sun Nov 28 21:52:08 2021 -0800 @@ -535,7 +535,7 @@ octave_idx_type j) const { std::ostringstream buf; - octave_print_internal (buf, fmt, matrix(i,j)); + octave_print_internal (buf, fmt, matrix(i, j)); return buf.str (); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-base-mat.h --- a/libinterp/octave-value/ov-base-mat.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-base-mat.h Sun Nov 28 21:52:08 2021 -0800 @@ -143,7 +143,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return octave_value (matrix.sort (dim, mode)); } - octave_value sort (Array &sidx, octave_idx_type dim = 0, + octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return octave_value (matrix.sort (sidx, dim, mode)); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-base-scalar.h --- a/libinterp/octave-value/ov-base-scalar.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-base-scalar.h Sun Nov 28 21:52:08 2021 -0800 @@ -111,7 +111,7 @@ octave_value sort (octave_idx_type, sortmode) const { return octave_value (scalar); } - octave_value sort (Array &sidx, octave_idx_type, + octave_value sort (Array& sidx, octave_idx_type, sortmode) const { sidx.resize (dim_vector (1, 1)); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-base-sparse.cc --- a/libinterp/octave-value/ov-base-sparse.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-base-sparse.cc Sun Nov 28 21:52:08 2021 -0800 @@ -392,7 +392,7 @@ octave_idx_type j) const { std::ostringstream buf; - octave_print_internal (buf, fmt, this->matrix(i,j)); + octave_print_internal (buf, fmt, this->matrix(i, j)); return buf.str (); } @@ -449,7 +449,7 @@ octave_idx_type i = n % nr; octave_idx_type j = n / nr; - return (i < nr && j < nc) ? octave_value (matrix(i,j)) : octave_value (); + return (i < nr && j < nc) ? octave_value (matrix(i, j)) : octave_value (); } template diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-base-sparse.h --- a/libinterp/octave-value/ov-base-sparse.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-base-sparse.h Sun Nov 28 21:52:08 2021 -0800 @@ -189,7 +189,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return octave_value (matrix.sort (dim, mode)); } - octave_value sort (Array &sidx, octave_idx_type dim = 0, + octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return octave_value (matrix.sort (sidx, dim, mode)); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-base.h --- a/libinterp/octave-value/ov-base.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-base.h Sun Nov 28 21:52:08 2021 -0800 @@ -753,7 +753,7 @@ virtual octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const; - virtual octave_value sort (Array &sidx, + virtual octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const; diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-bool-mat.cc --- a/libinterp/octave-value/ov-bool-mat.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-bool-mat.cc Sun Nov 28 21:52:08 2021 -0800 @@ -329,7 +329,7 @@ boolMatrix btmp (nr, nc); for (octave_idx_type j = 0; j < nc; j++) for (octave_idx_type i = 0; i < nr; i++) - btmp.elem (i,j) = (tmp.elem (i, j) != 0.); + btmp.elem (i, j) = (tmp.elem (i, j) != 0.); matrix = btmp; } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-cell.cc --- a/libinterp/octave-value/ov-cell.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-cell.cc Sun Nov 28 21:52:08 2021 -0800 @@ -108,7 +108,7 @@ octave_idx_type i, octave_idx_type j) const { - octave_value val = matrix(i,j); + octave_value val = matrix(i, j); std::string tname = val.type_name (); dim_vector dv = val.dims (); @@ -173,7 +173,7 @@ Cell tcell = tmp.cell_value (); if (tcell.numel () == 1) - retval(0) = tcell(0,0); + retval(0) = tcell(0, 0); else { // Return a comma-separated list. @@ -223,7 +223,7 @@ const Cell tcell = tmp.cell_value (); if (tcell.numel () == 1) - retval = tcell(0,0); + retval = tcell(0, 0); else { // Return a comma-separated list. @@ -495,7 +495,7 @@ } octave_value -octave_cell::sort (Array &sidx, octave_idx_type dim, +octave_cell::sort (Array& sidx, octave_idx_type dim, sortmode mode) const { octave_value retval; @@ -683,7 +683,7 @@ std::ostringstream buf; buf << '[' << i+1 << ',' << j+1 << ']'; - octave_value val = matrix(i,j); + octave_value val = matrix(i, j); val.print_with_name (os, buf.str ()); } @@ -1193,7 +1193,7 @@ if (current_item >= static_cast (num_obj)) retval2 = -1; else - retval2 = hdf5_h5g_iterate (loc_id, name, ¤t_item,&dsub); + retval2 = hdf5_h5g_iterate (loc_id, name, ¤t_item, &dsub); if (retval2 <= 0) break; @@ -1397,7 +1397,7 @@ // we don't need a key lookup at all. for (octave_idx_type j = 0; j < n_elts; j++) for (octave_idx_type i = 0; i < num_fields; i++) - c.xelem (i,j) = m.contents(i)(j); + c.xelem (i, j) = m.contents(i)(j); return ovl (c); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-cell.h --- a/libinterp/octave-value/ov-cell.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-cell.h Sun Nov 28 21:52:08 2021 -0800 @@ -111,7 +111,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const; - octave_value sort (Array &sidx, octave_idx_type dim = 0, + octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const; sortmode issorted (sortmode mode = UNSORTED) const; diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-class.cc --- a/libinterp/octave-value/ov-class.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-class.cc Sun Nov 28 21:52:08 2021 -0800 @@ -850,7 +850,7 @@ // add one to the value returned as the index_vector method // expects it to be one based. return octave::binary_op (octave_value::op_add, tmp (0), - octave_value (1.0)).index_vector (require_integers); + octave_value (1.0)).index_vector (require_integers); } std::size_t diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-class.h --- a/libinterp/octave-value/ov-class.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-class.h Sun Nov 28 21:52:08 2021 -0800 @@ -119,8 +119,8 @@ { m_map.assign (k, rhs); }; OCTINTERP_API octave_value - subsasgn (const std::string& type, const std::list& idx, - const octave_value& rhs); + subsasgn (const std::string& type, const std::list& idx, + const octave_value& rhs); OCTINTERP_API octave_value undef_subsasgn (const std::string& type, diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-dld-fcn.cc --- a/libinterp/octave-value/ov-dld-fcn.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-dld-fcn.cc Sun Nov 28 21:52:08 2021 -0800 @@ -114,7 +114,7 @@ // before objects have been deleted will make the "delete" code // of objects to point to an invalid code segment. -octave_dld_function* +octave_dld_function * octave_dld_function::create (octave_builtin::fcn ff, const octave::dynamic_library& shl, const std::string& nm, const std::string& ds) @@ -122,7 +122,7 @@ return new octave_dld_function (ff, shl, nm, ds); } -octave_dld_function* +octave_dld_function * octave_dld_function::create (octave_builtin::meth mm, const octave::dynamic_library& shl, const std::string& nm, const std::string& ds) diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-intx.h --- a/libinterp/octave-value/ov-intx.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-intx.h Sun Nov 28 21:52:08 2021 -0800 @@ -521,7 +521,7 @@ matrix_value (bool = false) const { Matrix retval (1, 1); - retval(0,0) = scalar.double_value (); + retval(0, 0) = scalar.double_value (); return retval; } @@ -529,7 +529,7 @@ float_matrix_value (bool = false) const { FloatMatrix retval (1, 1); - retval(0,0) = scalar.float_value (); + retval(0, 0) = scalar.float_value (); return retval; } @@ -537,7 +537,7 @@ complex_matrix_value (bool = false) const { ComplexMatrix retval (1, 1); - retval(0,0) = Complex (scalar.double_value ()); + retval(0, 0) = Complex (scalar.double_value ()); return retval; } @@ -545,7 +545,7 @@ float_complex_matrix_value (bool = false) const { FloatComplexMatrix retval (1, 1); - retval(0,0) = FloatComplex (scalar.float_value ()); + retval(0, 0) = FloatComplex (scalar.float_value ()); return retval; } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-lazy-idx.cc --- a/libinterp/octave-value/ov-lazy-idx.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-lazy-idx.cc Sun Nov 28 21:52:08 2021 -0800 @@ -116,7 +116,7 @@ } octave_value -octave_lazy_index::sort (Array &sidx, octave_idx_type dim, +octave_lazy_index::sort (Array& sidx, octave_idx_type dim, sortmode mode) const { const dim_vector odims = m_index.orig_dimensions (); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-lazy-idx.h --- a/libinterp/octave-value/ov-lazy-idx.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-lazy-idx.h Sun Nov 28 21:52:08 2021 -0800 @@ -118,7 +118,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const; - octave_value sort (Array &sidx, octave_idx_type dim = 0, + octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const; sortmode issorted (sortmode mode = UNSORTED) const; diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-mex-fcn.h --- a/libinterp/octave-value/ov-mex-fcn.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-mex-fcn.h Sun Nov 28 21:52:08 2021 -0800 @@ -100,7 +100,7 @@ octave::dynamic_library get_shlib (void) const { return m_sh_lib; } - void *mex_fcn_ptr (void) const { return m_mex_fcn_ptr; } + void * mex_fcn_ptr (void) const { return m_mex_fcn_ptr; } bool is_fmex (void) const { return m_is_fmex; } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-perm.cc --- a/libinterp/octave-value/ov-perm.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-perm.cc Sun Nov 28 21:52:08 2021 -0800 @@ -325,7 +325,7 @@ octave_idx_type j) const { std::ostringstream buf; - octave_print_internal (buf, fmt, octave_int (m_matrix(i,j))); + octave_print_internal (buf, fmt, octave_int (m_matrix(i, j))); return buf.str (); } @@ -522,7 +522,7 @@ for (octave_idx_type j = 0; j < nc; j++) { std::ostringstream buf; - octave_int tval (m_matrix(i,j)); + octave_int tval (m_matrix(i, j)); octave_print_internal (buf, tval); std::string tmp = buf.str (); std::size_t pos = tmp.find_first_not_of (' '); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-perm.h --- a/libinterp/octave-value/ov-perm.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-perm.h Sun Nov 28 21:52:08 2021 -0800 @@ -104,7 +104,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return to_dense ().sort (dim, mode); } - octave_value sort (Array &sidx, octave_idx_type dim = 0, + octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return to_dense ().sort (sidx, dim, mode); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-range.cc --- a/libinterp/octave-value/ov-range.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-range.cc Sun Nov 28 21:52:08 2021 -0800 @@ -246,7 +246,7 @@ template octave_value ov_range::do_index_op (const octave_value_list& idx, - bool resize_ok) + bool resize_ok) { if (idx.length () == 1 && ! resize_ok) { @@ -723,7 +723,7 @@ template bool ov_range::load_binary (std::istream& is, bool swap, - octave::mach_info::float_format /* fmt */) + octave::mach_info::float_format /* fmt */) { // FIXME: Not always double! diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-re-mat.cc --- a/libinterp/octave-value/ov-re-mat.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-re-mat.cc Sun Nov 28 21:52:08 2021 -0800 @@ -376,7 +376,7 @@ } octave_value -octave_matrix::sort (Array &sidx, octave_idx_type dim, +octave_matrix::sort (Array& sidx, octave_idx_type dim, sortmode mode) const { if (idx_cache) diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-re-mat.h --- a/libinterp/octave-value/ov-re-mat.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-re-mat.h Sun Nov 28 21:52:08 2021 -0800 @@ -199,7 +199,7 @@ octave_value squeeze (void) const; octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const; - octave_value sort (Array &sidx, octave_idx_type dim = 0, + octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const; sortmode issorted (sortmode mode = UNSORTED) const; diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-str-mat.h --- a/libinterp/octave-value/ov-str-mat.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-str-mat.h Sun Nov 28 21:52:08 2021 -0800 @@ -143,7 +143,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return octave_value (matrix.sort (dim, mode)); } - octave_value sort (Array &sidx, octave_idx_type dim = 0, + octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return octave_value (matrix.sort (sidx, dim, mode)); } @@ -261,7 +261,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return octave_value (matrix.sort (dim, mode), '\''); } - octave_value sort (Array &sidx, octave_idx_type dim = 0, + octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return octave_value (matrix.sort (sidx, dim, mode), '\''); } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-struct.cc --- a/libinterp/octave-value/ov-struct.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-struct.cc Sun Nov 28 21:52:08 2021 -0800 @@ -470,13 +470,13 @@ } else { - const octave_map& cmap = const_cast (m_map); + const octave_map& cmap = const_cast (m_map); // cast to const reference, avoid forced key insertion. if (idxf.all_scalars () || cmap.contents (key).index (idxf, true).numel () == 1) { m_map.assign (idxf, - key, Cell (t_rhs.storable_value ())); + key, Cell (t_rhs.storable_value ())); count++; retval = octave_value (this); @@ -699,7 +699,7 @@ // 2-d struct array. Rows and columns index individual // scalar structs. - val = m_map(r,c); + val = m_map(r, c); } std::string tname = val.type_name (); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-typeinfo.h --- a/libinterp/octave-value/ov-typeinfo.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-typeinfo.h Sun Nov 28 21:52:08 2021 -0800 @@ -289,8 +289,8 @@ typedef octave::type_info::assignany_op_fcn assignany_op_fcn; extern OCTINTERP_API int register_type (const std::string& t_name, - const std::string& c_name, - const octave_value& val); + const std::string& c_name, + const octave_value& val); extern OCTINTERP_API octave_value lookup_type (const std::string& nm); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov-usr-fcn.cc --- a/libinterp/octave-value/ov-usr-fcn.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov-usr-fcn.cc Sun Nov 28 21:52:08 2021 -0800 @@ -739,7 +739,7 @@ return retval; } -DEFMETHOD (nargout, interp,args, , +DEFMETHOD (nargout, interp, args, , doc: /* -*- texinfo -*- @deftypefn {} {} nargout () @deftypefnx {} {} nargout (@var{fcn}) diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/octave-value/ov.h --- a/libinterp/octave-value/ov.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/octave-value/ov.h Sun Nov 28 21:52:08 2021 -0800 @@ -1507,7 +1507,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return m_rep->sort (dim, mode); } - octave_value sort (Array &sidx, octave_idx_type dim = 0, + octave_value sort (Array& sidx, octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return m_rep->sort (sidx, dim, mode); } @@ -1638,7 +1638,7 @@ private: - static OCTINTERP_API octave_base_value *nil_rep (void); + static OCTINTERP_API octave_base_value * nil_rep (void); OCTINTERP_API assign_op unary_op_to_assign_op (unary_op op); diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/parse-tree/parse.h --- a/libinterp/parse-tree/parse.h Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/parse-tree/parse.h Sun Nov 28 21:52:08 2021 -0800 @@ -261,7 +261,7 @@ // Build an anonymous function handle. OCTINTERP_API tree_anon_fcn_handle * make_anon_fcn_handle (tree_parameter_list *param_list, - tree_expression * expr, const filepos& at_pos); + tree_expression *expr, const filepos& at_pos); // Build a colon expression. OCTINTERP_API tree_expression * diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/parse-tree/pt-cell.cc --- a/libinterp/parse-tree/pt-cell.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/parse-tree/pt-cell.cc Sun Nov 28 21:52:08 2021 -0800 @@ -91,7 +91,7 @@ } for (octave_idx_type j = 0; j < nc; j++) - val(i,j) = row(j); + val(i, j) = row(j); i++; } diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/parse-tree/pt-stmt.cc --- a/libinterp/parse-tree/pt-stmt.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/parse-tree/pt-stmt.cc Sun Nov 28 21:52:08 2021 -0800 @@ -95,14 +95,16 @@ tree_statement::is_breakpoint (void) const { return m_command ? m_command->is_breakpoint () - : (m_expression ? m_expression->is_breakpoint () : false); + : (m_expression ? m_expression->is_breakpoint () + : false); } bool tree_statement::is_active_breakpoint (tree_evaluator& tw) const { return m_command ? m_command->is_active_breakpoint (tw) - : (m_expression ? m_expression->is_active_breakpoint (tw) : false); + : (m_expression ? m_expression->is_active_breakpoint (tw) + : false); } std::string diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/parse-tree/pt-tm-const.cc --- a/libinterp/parse-tree/pt-tm-const.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/parse-tree/pt-tm-const.cc Sun Nov 28 21:52:08 2021 -0800 @@ -507,7 +507,7 @@ found_non_empty: if (! m_all_empty) - ctmp = ctmp.resize (dim_vector (0,0)).resize (m_dv); + ctmp = ctmp.resize (dim_vector (0, 0)).resize (m_dv); } // Now, extract the values from the individual elements and insert diff -r bf4cea7b9ba8 -r a61e1a0f6024 libinterp/parse-tree/pt-walk.cc --- a/libinterp/parse-tree/pt-walk.cc Mon Nov 29 11:15:15 2021 +0900 +++ b/libinterp/parse-tree/pt-walk.cc Sun Nov 28 21:52:08 2021 -0800 @@ -72,7 +72,7 @@ void tree_walker::visit_args_block_attribute_list (tree_args_block_attribute_list& lst) { - tree_identifier * attribute = lst.attribute (); + tree_identifier *attribute = lst.attribute (); if (attribute) attribute->accept (*this);