Mercurial > hg > octave-lojdl
changeset 10313:f3b65e1ae355
untabify src header files
line wrap: on
line diff
--- a/src/Cell.h +++ b/src/Cell.h @@ -48,7 +48,7 @@ Cell (const octave_value_list& ovl); Cell (octave_idx_type n, octave_idx_type m, - const octave_value& val = resize_fill_value ()) + const octave_value& val = resize_fill_value ()) : Array<octave_value> (dim_vector (n, m), val) { } Cell (const dim_vector& dv, const octave_value& val = resize_fill_value ()) @@ -78,7 +78,7 @@ Cell& delete_elements (const octave_value_list& idx); Cell& assign (const octave_value_list& idx, const Cell& rhs, - const octave_value& fill_val = resize_fill_value ()); + const octave_value& fill_val = resize_fill_value ()); Cell reshape (const dim_vector& new_dims) const { return Array<octave_value>::reshape (new_dims); }
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,30 @@ +2010-02-11 John W. Eaton <jwe@octave.org> + + * Cell.h, base-list.h, c-file-ptr-stream.h, comment-list.h, + debug.h, defun-int.h, dynamic-ld.h, error.h, gl-render.h, + gl2ps-renderer.h, gripes.h, load-path.h, load-save.h, ls-hdf5.h, + ls-mat-ascii.h, ls-mat4.h, ls-mat5.h, ls-oct-ascii.h, + ls-oct-binary.h, oct-fstrm.h, oct-iostrm.h, oct-lvalue.h, + oct-map.h, oct-obj.h, oct-prcstrm.h, oct-stdstrm.h, + oct-stream.h, oct-strstrm.h, octave.h, ops.h, ov-base-diag.h, + ov-base-int.h, ov-base-mat.h, ov-base-scalar.h, + ov-base-sparse.h, ov-base.h, ov-bool-mat.h, ov-bool-sparse.h, + ov-bool.h, ov-builtin.h, ov-cell.h, ov-class.h, ov-complex.h, + ov-cx-diag.h, ov-cx-mat.h, ov-cx-sparse.h, ov-dld-fcn.h, + ov-fcn-handle.h, ov-fcn-inline.h, ov-fcn.h, ov-float.h, + ov-flt-complex.h, ov-flt-cx-diag.h, ov-flt-cx-mat.h, + ov-flt-re-diag.h, ov-flt-re-mat.h, ov-intx.h, ov-mex-fcn.h, + ov-perm.h, ov-range.h, ov-re-diag.h, ov-re-mat.h, + ov-re-sparse.h, ov-scalar.h, ov-str-mat.h, ov-struct.h, + ov-type-conv.h, ov-typeinfo.h, ov-usr-fcn.h, ov.h, parse.h, + pr-output.h, pt-arg-list.h, pt-assign.h, pt-binop.h, pt-cell.h, + pt-cmd.h, pt-colon.h, pt-const.h, pt-decl.h, pt-eval.h, + pt-except.h, pt-exp.h, pt-fcn-handle.h, pt-id.h, pt-idx.h, + pt-jump.h, pt-loop.h, pt-mat.h, pt-misc.h, pt-pr-code.h, + pt-select.h, pt-stmt.h, pt-unop.h, sighandlers.h, sparse-xdiv.h, + sparse-xpow.h, symtab.h, token.h, toplev.h, txt-eng-ft.h, + txt-eng.h, utils.h, variables.h, xdiv.h: Untabify. + 2010-02-11 John W. Eaton <jwe@octave.org> * DLD-FUNCTIONS/qz.cc: Untabify.
--- a/src/base-list.h +++ b/src/base-list.h @@ -55,11 +55,11 @@ iterator e = lst.end (); while (b != e) { - iterator n = b; - n++; - if (pred (*b)) - lst.erase (b); - b = n; + iterator n = b; + n++; + if (pred (*b)) + lst.erase (b); + b = n; } }
--- a/src/c-file-ptr-stream.h +++ b/src/c-file-ptr-stream.h @@ -62,10 +62,10 @@ std::streamsize xsgetn (char *, std::streamsize); std::streampos seekoff (std::streamoff, std::ios::seekdir, - std::ios::openmode = std::ios::in | std::ios::out); + std::ios::openmode = std::ios::in | std::ios::out); std::streampos seekpos (std::streampos, - std::ios::openmode = std::ios::in | std::ios::out); + std::ios::openmode = std::ios::in | std::ios::out); int sync (void); @@ -169,10 +169,10 @@ std::streamsize xsgetn (char *, std::streamsize); std::streampos seekoff (std::streamoff, std::ios::seekdir, - std::ios::openmode = std::ios::in | std::ios::out); + std::ios::openmode = std::ios::in | std::ios::out); std::streampos seekpos (std::streampos, - std::ios::openmode = std::ios::in | std::ios::out); + std::ios::openmode = std::ios::in | std::ios::out); int sync (void);
--- a/src/comment-list.h +++ b/src/comment-list.h @@ -48,7 +48,7 @@ }; octave_comment_elt (const std::string& s = std::string (), - comment_type t = unknown) + comment_type t = unknown) : txt (s), typ (t) { } octave_comment_elt (const octave_comment_elt& oc) @@ -57,10 +57,10 @@ octave_comment_elt& operator = (const octave_comment_elt& oc) { if (this != &oc) - { - txt = oc.txt; - typ = oc.typ; - } + { + txt = oc.txt; + typ = oc.typ; + } return *this; } @@ -91,7 +91,7 @@ { octave_base_list<octave_comment_elt>::append (elt); } void append (const std::string& s, - octave_comment_elt::comment_type t = octave_comment_elt::unknown) + octave_comment_elt::comment_type t = octave_comment_elt::unknown) { append (octave_comment_elt (s, t)); } octave_comment_list *dup (void) const;
--- a/src/debug.h +++ b/src/debug.h @@ -73,7 +73,7 @@ // Add a breakpoint at the nearest executable line. static intmap add_breakpoint (const std::string& fname = "", - const intmap& lines = intmap ()) + const intmap& lines = intmap ()) { return instance_ok () ? instance->do_add_breakpoint (fname, lines) : intmap (); @@ -81,7 +81,7 @@ // Remove a breakpoint from a line in file. static int remove_breakpoint (const std::string& fname = "", - const intmap& lines = intmap ()) + const intmap& lines = intmap ()) { return instance_ok () ? instance->do_remove_breakpoint (fname, lines) : 0; @@ -89,7 +89,7 @@ // Remove all the breakpoints in a specified file. static intmap remove_all_breakpoints_in_file (const std::string& fname, - bool silent = false) + bool silent = false) { return instance_ok () ? instance->do_remove_all_breakpoints_in_file (fname, silent) : intmap (); @@ -132,7 +132,7 @@ int do_remove_breakpoint (const std::string&, const intmap& lines); intmap do_remove_all_breakpoints_in_file (const std::string& fname, - bool silent); + bool silent); void do_remove_all_breakpoints (void);
--- a/src/defun-int.h +++ b/src/defun-int.h @@ -40,17 +40,17 @@ extern OCTINTERP_API void install_builtin_function (octave_builtin::fcn f, const std::string& name, - const std::string& doc, - bool can_hide_function = true); + const std::string& doc, + bool can_hide_function = true); extern OCTINTERP_API void install_dld_function (octave_dld_function::fcn f, const std::string& name, - const octave_shlib& shl, const std::string& doc, - bool relative = false); + const octave_shlib& shl, const std::string& doc, + bool relative = false); extern OCTINTERP_API void install_mex_function (void *fptr, bool fmex, const std::string& name, - const octave_shlib& shl, bool relative = false); + const octave_shlib& shl, bool relative = false); extern OCTINTERP_API void alias_builtin (const std::string& alias, const std::string& name); @@ -101,7 +101,7 @@ \ if (! error_state) \ { \ - octave_dld_function *fcn = octave_dld_function::create (fname, shl, name, doc); \ + octave_dld_function *fcn = octave_dld_function::create (fname, shl, name, doc); \ \ if (relative) \ fcn->mark_relative (); \
--- a/src/dynamic-ld.h +++ b/src/dynamic-ld.h @@ -43,13 +43,13 @@ static octave_function * load_oct (const std::string& fcn_name, - const std::string& file_name = std::string (), - bool relative = false); + const std::string& file_name = std::string (), + bool relative = false); static octave_function * load_mex (const std::string& fcn_name, - const std::string& file_name = std::string (), - bool relative = false); + const std::string& file_name = std::string (), + bool relative = false); static bool remove_oct (const std::string& fcn_name, octave_shlib& shl); @@ -69,13 +69,13 @@ octave_function * do_load_oct (const std::string& fcn_name, - const std::string& file_name = std::string (), - bool relative = false); + const std::string& file_name = std::string (), + bool relative = false); octave_function * do_load_mex (const std::string& fcn_name, - const std::string& file_name = std::string (), - bool relative = false); + const std::string& file_name = std::string (), + bool relative = false); bool do_remove_oct (const std::string& fcn_name, octave_shlib& shl);
--- a/src/error.h +++ b/src/error.h @@ -29,7 +29,7 @@ #define panic_impossible() \ panic ("impossible state reached in file `%s' at line %d", \ - __FILE__, __LINE__) + __FILE__, __LINE__) extern OCTINTERP_API void reset_error_handler (void);
--- a/src/gl-render.h +++ b/src/gl-render.h @@ -65,12 +65,12 @@ int len = hlist.length (); for (int i = len-1; i >= 0; i--) - { - graphics_handle h = gh_manager::lookup (hlist(i)); + { + graphics_handle h = gh_manager::lookup (hlist(i)); - if (h.ok ()) - draw (h); - } + if (h.ok ()) + draw (h); + } } virtual void set_viewport (int w, int h); @@ -90,27 +90,27 @@ virtual void set_linewidth (float w); virtual void set_linestyle (const std::string& s, bool stipple = false); virtual void set_clipbox (double x1, double x2, double y1, double y2, - double z1, double z2); + double z1, double z2); virtual void set_clipping (bool on); virtual void set_font (const base_properties& props); virtual void init_marker (const std::string& m, double size, float width); virtual void end_marker (void); virtual void draw_marker (double x, double y, double z, - const Matrix& lc, const Matrix& fc); + const Matrix& lc, const Matrix& fc); virtual void text_to_pixels (const std::string& txt, - double rotation, - uint8NDArray& pixels, - Matrix& bbox, - int& rot_mode); + double rotation, + uint8NDArray& pixels, + Matrix& bbox, + int& rot_mode); virtual Matrix render_text (const std::string& txt, - double x, double y, double z, - int halign, int valign, double rotation = 0.0); + double x, double y, double z, + int halign, int valign, double rotation = 0.0); virtual void draw_pixels (GLsizei w, GLsizei h, GLenum format, - GLenum type, const GLvoid *data); + GLenum type, const GLvoid *data); private: opengl_renderer (const opengl_renderer&) { } @@ -121,22 +121,22 @@ bool is_nan_or_inf (double x, double y, double z) const { return (xisnan (x) || xisnan (y) || xisnan (z) - || xisinf (x) || xisinf (y) || xisinf (z)); + || xisinf (x) || xisinf (y) || xisinf (z)); } octave_uint8 clip_code (double x, double y, double z) const { return ((x < xmin ? 1 : 0) - | (x > xmax ? 1 : 0) << 1 - | (y < ymin ? 1 : 0) << 2 - | (y > ymax ? 1 : 0) << 3 - | (z < zmin ? 1 : 0) << 4 - | (z > zmax ? 1 : 0) << 5 - | (is_nan_or_inf (x, y, z) ? 0 : 1) << 6); + | (x > xmax ? 1 : 0) << 1 + | (y < ymin ? 1 : 0) << 2 + | (y > ymax ? 1 : 0) << 3 + | (z < zmin ? 1 : 0) << 4 + | (z > zmax ? 1 : 0) << 5 + | (is_nan_or_inf (x, y, z) ? 0 : 1) << 6); } unsigned int make_marker_list (const std::string& m, double size, - bool filled) const; + bool filled) const; private: // the backend associated with the figure being rendered
--- a/src/gl2ps-renderer.h +++ b/src/gl2ps-renderer.h @@ -41,14 +41,14 @@ protected: virtual Matrix render_text (const std::string& txt, - double x, double y, double z, - int halign, int valign, double rotation = 0.0); + double x, double y, double z, + int halign, int valign, double rotation = 0.0); virtual void set_font (const base_properties& props); virtual void draw_pixels (GLsizei w, GLsizei h, GLenum format, - GLenum type, const GLvoid *data); + GLenum type, const GLvoid *data); virtual void set_linestyle (const std::string& s, bool use_stipple) {
--- a/src/gripes.h +++ b/src/gripes.h @@ -78,19 +78,19 @@ extern OCTINTERP_API void gripe_wrong_type_arg (const char *name, const char *s, - bool is_error = true); + bool is_error = true); extern OCTINTERP_API void gripe_wrong_type_arg (const char *name, const std::string& s, - bool is_error = true); + bool is_error = true); extern OCTINTERP_API void gripe_wrong_type_arg (const char *name, const octave_value& tc, - bool is_error = true); + bool is_error = true); extern OCTINTERP_API void gripe_wrong_type_arg (const std::string& name, const octave_value& tc, - bool is_error = true); + bool is_error = true); extern OCTINTERP_API void gripe_wrong_type_arg_for_unary_op (const octave_value& op); @@ -103,7 +103,7 @@ extern OCTINTERP_API void gripe_implicit_conversion (const std::string& id, const std::string& from, - const std::string& to); + const std::string& to); extern OCTINTERP_API void gripe_truncated_conversion (const char *srctype, const char *desttype);
--- a/src/load-path.h +++ b/src/load-path.h @@ -88,15 +88,15 @@ } static std::string find_method (const std::string& class_name, - const std::string& meth, - std::string& dir_name) + const std::string& meth, + std::string& dir_name) { return instance_ok () ? instance->do_find_method (class_name, meth, dir_name) : std::string (); } static std::string find_method (const std::string& class_name, - const std::string& meth) + const std::string& meth) { std::string dir_name; return find_method (class_name, meth, dir_name); @@ -127,7 +127,7 @@ } static std::string find_private_fcn (const std::string& dir, - const std::string& fcn) + const std::string& fcn) { return instance_ok () ? instance->do_find_private_fcn (dir, fcn) : std::string (); @@ -279,29 +279,29 @@ dir_info (const dir_info& di) : dir_name (di.dir_name), abs_dir_name (di.abs_dir_name), - is_relative (di.is_relative), - dir_mtime (di.dir_mtime), - dir_time_last_checked (di.dir_time_last_checked), - all_files (di.all_files), fcn_files (di.fcn_files), - private_file_map (di.private_file_map), - method_file_map (di.method_file_map) { } + is_relative (di.is_relative), + dir_mtime (di.dir_mtime), + dir_time_last_checked (di.dir_time_last_checked), + all_files (di.all_files), fcn_files (di.fcn_files), + private_file_map (di.private_file_map), + method_file_map (di.method_file_map) { } ~dir_info (void) { } dir_info& operator = (const dir_info& di) { if (&di != this) - { - dir_name = di.dir_name; - abs_dir_name = di.abs_dir_name; - is_relative = di.is_relative; - dir_mtime = di.dir_mtime; - dir_time_last_checked = di.dir_time_last_checked; - all_files = di.all_files; - fcn_files = di.fcn_files; - private_file_map = di.private_file_map; - method_file_map = di.method_file_map; - } + { + dir_name = di.dir_name; + abs_dir_name = di.abs_dir_name; + is_relative = di.is_relative; + dir_mtime = di.dir_mtime; + dir_time_last_checked = di.dir_time_last_checked; + all_files = di.all_files; + fcn_files = di.fcn_files; + private_file_map = di.private_file_map; + method_file_map = di.method_file_map; + } return *this; } @@ -327,7 +327,7 @@ void get_private_file_map (const std::string& d); void get_method_file_map (const std::string& d, - const std::string& class_name); + const std::string& class_name); friend fcn_file_map_type get_fcn_files (const std::string& d); }; @@ -346,10 +346,10 @@ file_info& operator = (const file_info& fi) { if (&fi != this) - { - dir_name = fi.dir_name; - types = fi.types; - } + { + dir_name = fi.dir_name; + types = fi.types; + } return *this; } @@ -432,7 +432,7 @@ bool contains (const std::string& dir) const; void move_fcn_map (const std::string& dir, - const string_vector& fcn_files, bool at_end); + const string_vector& fcn_files, bool at_end); void move_method_map (const std::string& dir, bool at_end); @@ -462,20 +462,20 @@ static bool check_file_type (std::string& fname, int type, int possible_types, - const std::string& fcn, const char *who); + const std::string& fcn, const char *who); std::string do_find_fcn (const std::string& fcn, - std::string& dir_name, - int type = M_FILE | OCT_FILE | MEX_FILE) const; + std::string& dir_name, + int type = M_FILE | OCT_FILE | MEX_FILE) const; std::string do_find_private_fcn (const std::string& dir, - const std::string& fcn, - int type = M_FILE | OCT_FILE | MEX_FILE) const; + const std::string& fcn, + int type = M_FILE | OCT_FILE | MEX_FILE) const; std::string do_find_method (const std::string& class_name, - const std::string& meth, - std::string& dir_name, - int type = M_FILE | OCT_FILE | MEX_FILE) const; + const std::string& meth, + std::string& dir_name, + int type = M_FILE | OCT_FILE | MEX_FILE) const; std::list<std::string> do_methods (const std::string& class_name) const;
--- a/src/load-save.h +++ b/src/load-save.h @@ -72,18 +72,18 @@ extern int read_binary_file_header (std::istream& is, bool& swap, - oct_mach_info::float_format& flt_fmt, - bool quiet = false); + oct_mach_info::float_format& flt_fmt, + bool quiet = false); extern octave_value do_load (std::istream& stream, const std::string& orig_fname, bool force, - load_save_format format, oct_mach_info::float_format flt_fmt, - bool list_only, bool swap, bool verbose, - const string_vector& argv, int argv_idx, int argc, int nargout); + load_save_format format, oct_mach_info::float_format flt_fmt, + bool list_only, bool swap, bool verbose, + const string_vector& argv, int argv_idx, int argc, int nargout); extern void do_save (std::ostream& os, const symbol_table::symbol_record& sr, - load_save_format fmt, bool save_as_floats); + load_save_format fmt, bool save_as_floats); extern void write_header (std::ostream& os, load_save_format format);
--- a/src/ls-hdf5.h +++ b/src/ls-hdf5.h @@ -50,17 +50,17 @@ hdf5_fstreambase (const char *name, int mode, int /* prot */ = 0) { if (mode & std::ios::in) - file_id = H5Fopen (name, H5F_ACC_RDONLY, H5P_DEFAULT); + file_id = H5Fopen (name, H5F_ACC_RDONLY, H5P_DEFAULT); else if (mode & std::ios::out) - { - if (mode & std::ios::app && H5Fis_hdf5 (name) > 0) - file_id = H5Fopen (name, H5F_ACC_RDWR, H5P_DEFAULT); - else - file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT, - H5P_DEFAULT); - } + { + if (mode & std::ios::app && H5Fis_hdf5 (name) > 0) + file_id = H5Fopen (name, H5F_ACC_RDWR, H5P_DEFAULT); + else + file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT, + H5P_DEFAULT); + } if (file_id < 0) - std::ios::setstate (std::ios::badbit); + std::ios::setstate (std::ios::badbit); current_item = 0; } @@ -68,11 +68,11 @@ void close () { if (file_id >= 0) - { - if (H5Fclose (file_id) < 0) - std::ios::setstate (std::ios::badbit); - file_id = -1; - } + { + if (H5Fclose (file_id) < 0) + std::ios::setstate (std::ios::badbit); + file_id = -1; + } } void open (const char *name, int mode, int) @@ -80,17 +80,17 @@ clear (); if (mode & std::ios::in) - file_id = H5Fopen (name, H5F_ACC_RDONLY, H5P_DEFAULT); + file_id = H5Fopen (name, H5F_ACC_RDONLY, H5P_DEFAULT); else if (mode & std::ios::out) - { - if (mode & std::ios::app && H5Fis_hdf5 (name) > 0) - file_id = H5Fopen (name, H5F_ACC_RDWR, H5P_DEFAULT); - else - file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT, - H5P_DEFAULT); - } + { + if (mode & std::ios::app && H5Fis_hdf5 (name) > 0) + file_id = H5Fopen (name, H5F_ACC_RDWR, H5P_DEFAULT); + else + file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT, + H5P_DEFAULT); + } if (file_id < 0) - std::ios::setstate (std::ios::badbit); + std::ios::setstate (std::ios::badbit); current_item = 0; } @@ -106,11 +106,11 @@ hdf5_ifstream () : hdf5_fstreambase (), std::istream (0) { } hdf5_ifstream (const char *name, int mode = std::ios::in|std::ios::binary, - int prot = 0) + int prot = 0) : hdf5_fstreambase (name, mode, prot), std::istream (0) { } void open (const char *name, int mode = std::ios::in|std::ios::binary, - int prot = 0) + int prot = 0) { hdf5_fstreambase::open (name, mode, prot); } }; @@ -121,11 +121,11 @@ hdf5_ofstream () : hdf5_fstreambase (), std::ostream (0) { } hdf5_ofstream (const char *name, int mode = std::ios::out|std::ios::binary, - int prot = 0) + int prot = 0) : hdf5_fstreambase (name, mode, prot), std::ostream (0) { } void open (const char *name, int mode = std::ios::out|std::ios::binary, - int prot = 0) + int prot = 0) { hdf5_fstreambase::open (name, mode, prot); } }; @@ -168,8 +168,8 @@ extern OCTINTERP_API bool add_hdf5_data (hid_t loc_id, const octave_value& tc, - const std::string& name, const std::string& doc, - bool mark_as_global, bool save_as_floats); + const std::string& name, const std::string& doc, + bool mark_as_global, bool save_as_floats); extern OCTINTERP_API int save_hdf5_empty (hid_t loc_id, const char *name, const dim_vector d); @@ -179,12 +179,12 @@ extern OCTINTERP_API std::string read_hdf5_data (std::istream& is, const std::string& filename, bool& global, - octave_value& tc, std::string& doc); + octave_value& tc, std::string& doc); extern OCTINTERP_API bool save_hdf5_data (std::ostream& os, const octave_value& tc, - const std::string& name, const std::string& doc, - bool mark_as_global, bool save_as_floats); + const std::string& name, const std::string& doc, + bool mark_as_global, bool save_as_floats); #ifdef IDX_TYPE_LONG #define H5T_NATIVE_IDX H5T_NATIVE_LONG
--- a/src/ls-mat-ascii.h +++ b/src/ls-mat-ascii.h @@ -25,10 +25,10 @@ extern std::string read_mat_ascii_data (std::istream& is, const std::string& filename, - octave_value& tc); + octave_value& tc); extern bool save_mat_ascii_data (std::ostream& os, const octave_value& val_arg, - int precision, bool tabs = false); + int precision, bool tabs = false); #endif
--- a/src/ls-mat4.h +++ b/src/ls-mat4.h @@ -31,15 +31,15 @@ extern int read_mat_file_header (std::istream& is, bool& swap, int32_t& mopt, - int32_t& nr, int32_t& nc, int32_t& imag, - int32_t& len, int quiet = 0); + int32_t& nr, int32_t& nc, int32_t& imag, + int32_t& len, int quiet = 0); extern std::string read_mat_binary_data (std::istream& is, const std::string& filename, - octave_value& tc); + octave_value& tc); extern bool save_mat_binary_data (std::ostream& os, const octave_value& tc, - const std::string& name) ; + const std::string& name) ; #endif
--- a/src/ls-mat5.h +++ b/src/ls-mat5.h @@ -25,37 +25,37 @@ enum mat5_data_type { - miINT8 = 1, // 8 bit signed - miUINT8, // 8 bit unsigned - miINT16, // 16 bit signed - miUINT16, // 16 bit unsigned - miINT32, // 32 bit signed - miUINT32, // 32 bit unsigned - miSINGLE, // IEEE 754 single precision float + miINT8 = 1, // 8 bit signed + miUINT8, // 8 bit unsigned + miINT16, // 16 bit signed + miUINT16, // 16 bit unsigned + miINT32, // 32 bit signed + miUINT32, // 32 bit unsigned + miSINGLE, // IEEE 754 single precision float miRESERVE1, - miDOUBLE, // IEEE 754 double precision float + miDOUBLE, // IEEE 754 double precision float miRESERVE2, miRESERVE3, - miINT64, // 64 bit signed - miUINT64, // 64 bit unsigned - miMATRIX, // MATLAB array - miCOMPRESSED, // Compressed data - miUTF8, // Unicode UTF-8 Encoded Character Data - miUTF16, // Unicode UTF-16 Encoded Character Data - miUTF32 // Unicode UTF-32 Encoded Character Data + miINT64, // 64 bit signed + miUINT64, // 64 bit unsigned + miMATRIX, // MATLAB array + miCOMPRESSED, // Compressed data + miUTF8, // Unicode UTF-8 Encoded Character Data + miUTF16, // Unicode UTF-16 Encoded Character Data + miUTF32 // Unicode UTF-32 Encoded Character Data }; extern int read_mat5_binary_file_header (std::istream& is, bool& swap, - bool quiet = false, - const std::string& filename = std::string()); + bool quiet = false, + const std::string& filename = std::string()); extern std::string read_mat5_binary_element (std::istream& is, const std::string& filename, - bool swap, bool& global, octave_value& tc); + bool swap, bool& global, octave_value& tc); extern bool save_mat5_binary_element (std::ostream& os, - const octave_value& tc, const std::string& name, - bool mark_as_global, bool mat7_format, - bool save_as_floats, bool compressing = false); + const octave_value& tc, const std::string& name, + bool mark_as_global, bool mat7_format, + bool save_as_floats, bool compressing = false); #endif
--- a/src/ls-oct-ascii.h +++ b/src/ls-oct-ascii.h @@ -43,23 +43,23 @@ extern OCTINTERP_API std::string extract_keyword (std::istream& is, const char *keyword, - const bool next_only = false); + const bool next_only = false); extern OCTINTERP_API std::string read_ascii_data (std::istream& is, const std::string& filename, bool& global, - octave_value& tc, octave_idx_type count); + octave_value& tc, octave_idx_type count); extern OCTINTERP_API bool save_ascii_data (std::ostream& os, const octave_value& val_arg, - const std::string& name, bool mark_as_global, int precision); + const std::string& name, bool mark_as_global, int precision); extern OCTINTERP_API bool save_ascii_data_for_plotting (std::ostream& os, const octave_value& t, - const std::string& name); + const std::string& name); extern OCTINTERP_API bool save_three_d (std::ostream& os, const octave_value& t, - bool parametric = false); + bool parametric = false); // Match KEYWORD on stream IS, placing the associated value in VALUE, // returning TRUE if successful and FALSE otherwise. @@ -71,7 +71,7 @@ template <class T> bool extract_keyword (std::istream& is, const char *keyword, T& value, - const bool next_only = false) + const bool next_only = false) { bool status = false; value = T(); @@ -80,37 +80,37 @@ while (is.get (c)) { if (c == '%' || c == '#') - { - std::ostringstream buf; + { + std::ostringstream buf; - while (is.get (c) && (c == ' ' || c == '\t' || c == '%' || c == '#')) - ; // Skip whitespace and comment characters. + while (is.get (c) && (c == ' ' || c == '\t' || c == '%' || c == '#')) + ; // Skip whitespace and comment characters. - if (isalpha (c)) - buf << c; + if (isalpha (c)) + buf << c; - while (is.get (c) && isalpha (c)) - buf << c; + while (is.get (c) && isalpha (c)) + buf << c; - std::string tmp = buf.str (); - bool match = (tmp.compare (0, strlen (keyword), keyword) == 0); + std::string tmp = buf.str (); + bool match = (tmp.compare (0, strlen (keyword), keyword) == 0); - if (match) - { - while (is.get (c) && (c == ' ' || c == '\t' || c == ':')) - ; // Skip whitespace and the colon. + if (match) + { + while (is.get (c) && (c == ' ' || c == '\t' || c == ':')) + ; // Skip whitespace and the colon. - is.putback (c); - if (c != '\n' && c != '\r') - is >> value; - if (is) - status = true; - skip_until_newline (is, false); - break; - } - else if (next_only) - break; - } + is.putback (c); + if (c != '\n' && c != '\r') + is >> value; + if (is) + status = true; + skip_until_newline (is, false); + break; + } + else if (next_only) + break; + } } return status; } @@ -118,7 +118,7 @@ template <class T> bool extract_keyword (std::istream& is, const std::string& kw, T& value, - const bool next_only = false) + const bool next_only = false) { return extract_keyword (is, kw.c_str (), value, next_only); } @@ -134,7 +134,7 @@ template <class T> bool extract_keyword (std::istream& is, const string_vector& keywords, - std::string& kw, T& value, const bool next_only = false) + std::string& kw, T& value, const bool next_only = false) { bool status = false; kw = ""; @@ -144,44 +144,44 @@ while (is.get (c)) { if (c == '%' || c == '#') - { - std::ostringstream buf; + { + std::ostringstream buf; - while (is.get (c) && (c == ' ' || c == '\t' || c == '%' || c == '#')) - ; // Skip whitespace and comment characters. + while (is.get (c) && (c == ' ' || c == '\t' || c == '%' || c == '#')) + ; // Skip whitespace and comment characters. - if (isalpha (c)) - buf << c; + if (isalpha (c)) + buf << c; - while (is.get (c) && isalpha (c)) - buf << c; + while (is.get (c) && isalpha (c)) + buf << c; - std::string tmp = buf.str (); + std::string tmp = buf.str (); - for (int i = 0; i < keywords.length (); i++) - { - int match = (tmp == keywords[i]); + for (int i = 0; i < keywords.length (); i++) + { + int match = (tmp == keywords[i]); - if (match) - { - kw = keywords[i]; + if (match) + { + kw = keywords[i]; - while (is.get (c) && (c == ' ' || c == '\t' || c == ':')) - ; // Skip whitespace and the colon. + while (is.get (c) && (c == ' ' || c == '\t' || c == ':')) + ; // Skip whitespace and the colon. - is.putback (c); - if (c != '\n' && c != '\r') - is >> value; - if (is) - status = true; - skip_until_newline (is, false); - return status; - } - } + is.putback (c); + if (c != '\n' && c != '\r') + is >> value; + if (is) + status = true; + skip_until_newline (is, false); + return status; + } + } - if (next_only) - break; - } + if (next_only) + break; + } } return status; }
--- a/src/ls-oct-binary.h +++ b/src/ls-oct-binary.h @@ -25,13 +25,13 @@ extern OCTINTERP_API bool save_binary_data (std::ostream& os, const octave_value& tc, - const std::string& name, const std::string& doc, - bool mark_as_global, bool save_as_floats); + const std::string& name, const std::string& doc, + bool mark_as_global, bool save_as_floats); extern OCTINTERP_API std::string read_binary_data (std::istream& is, bool swap, - oct_mach_info::float_format fmt, - const std::string& filename, bool& global, - octave_value& tc, std::string& doc); + oct_mach_info::float_format fmt, + const std::string& filename, bool& global, + octave_value& tc, std::string& doc); #endif
--- a/src/oct-fstrm.h +++ b/src/oct-fstrm.h @@ -35,15 +35,15 @@ public: octave_fstream (const std::string& nm_arg, - std::ios::openmode arg_md = std::ios::in|std::ios::out, - oct_mach_info::float_format flt_fmt - = oct_mach_info::native_float_format ()); + std::ios::openmode arg_md = std::ios::in|std::ios::out, + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); static octave_stream create (const std::string& nm_arg, - std::ios::openmode arg_md = std::ios::in|std::ios::out, - oct_mach_info::float_format flt_fmt - = oct_mach_info::native_float_format ()); + std::ios::openmode arg_md = std::ios::in|std::ios::out, + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); // Position a stream at OFFSET relative to ORIGIN.
--- a/src/oct-iostrm.h +++ b/src/oct-iostrm.h @@ -34,9 +34,9 @@ public: octave_base_iostream (const std::string& n = std::string (), - std::ios::openmode m = std::ios::in|std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format ()) + std::ios::openmode m = std::ios::in|std::ios::out, + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : octave_base_stream (m, ff), nm (n) { } // Position a stream at OFFSET relative to ORIGIN. @@ -81,7 +81,7 @@ octave_istream (std::istream *arg = 0, const std::string& n = std::string ()) : octave_base_iostream (n, std::ios::in, - oct_mach_info::native_float_format ()), + oct_mach_info::native_float_format ()), is (arg) { } @@ -120,7 +120,7 @@ octave_ostream (std::ostream *arg, const std::string& n = std::string ()) : octave_base_iostream (n, std::ios::out, - oct_mach_info::native_float_format ()), + oct_mach_info::native_float_format ()), os (arg) { }
--- a/src/oct-lvalue.h +++ b/src/oct-lvalue.h @@ -49,12 +49,12 @@ octave_lvalue& operator = (const octave_lvalue& vr) { if (this != &vr) - { - val = vr.val; - type = vr.type; - idx = vr.idx; - nel = vr.nel; - } + { + val = vr.val; + type = vr.type; + idx = vr.idx; + nel = vr.nel; + } return *this; }
--- a/src/oct-map.h +++ b/src/oct-map.h @@ -47,7 +47,7 @@ // Warning! You should always use at least two dimensions. Octave_map (const dim_vector& dv = dim_vector (0, 0), - const Cell& key_vals = Cell ()); + const Cell& key_vals = Cell ()); Octave_map (const std::string& k, const octave_value& value) : map (), key_list (), dimensions (1, 1) @@ -61,9 +61,9 @@ { for (octave_idx_type i = 0; i < sv.length (); i++) { - std::string k = sv[i]; - map[k] = Cell (); - key_list.push_back (k); + std::string k = sv[i]; + map[k] = Cell (); + key_list.push_back (k); } } @@ -87,11 +87,11 @@ Octave_map& operator = (const Octave_map& m) { if (this != &m) - { - map = m.map; - key_list = m.key_list; - dimensions = m.dimensions; - } + { + map = m.map; + key_list = m.key_list; + dimensions = m.dimensions; + } return *this; } @@ -110,16 +110,16 @@ iterator p = map.find (k); if (p != map.end ()) - { - map.erase (p); + { + map.erase (p); - key_list_iterator q - = std::find (key_list.begin (), key_list.end (), k); + key_list_iterator q + = std::find (key_list.begin (), key_list.end (), k); - assert (q != key_list.end ()); + assert (q != key_list.end ()); - key_list.erase (q); - } + key_list.erase (q); + } } iterator begin (void) { return iterator (map.begin ()); } @@ -142,7 +142,7 @@ int intfield (const std::string& k, int def_val = 0) const; std::string stringfield (const std::string& k, - const std::string& def_val = std::string ()) const; + const std::string& def_val = std::string ()) const; iterator seek (const std::string& k) { return map.find (k); } const_iterator seek (const std::string& k) const { return map.find (k); } @@ -181,14 +181,14 @@ Octave_map& assign (const octave_value_list& idx, const Octave_map& rhs); Octave_map& assign (const octave_value_list& idx, const std::string& k, - const Cell& rhs); + const Cell& rhs); Octave_map& assign (const std::string& k, const octave_value& rhs); Octave_map& assign (const std::string& k, const Cell& rhs); Octave_map index (const octave_value_list& idx, - bool resize_ok = false) const; + bool resize_ok = false) const; private: @@ -205,7 +205,7 @@ void maybe_add_to_key_list (const std::string& k) { if (! contains (k)) - key_list.push_back (k); + key_list.push_back (k); } };
--- a/src/oct-obj.h +++ b/src/oct-obj.h @@ -90,10 +90,10 @@ octave_value_list& operator = (const octave_value_list& obj) { if (this != &obj) - { - data = obj.data; - names = obj.names; - } + { + data = obj.data; + names = obj.names; + } return *this; } @@ -131,7 +131,7 @@ octave_value_list splice (octave_idx_type offset, octave_idx_type len, - const octave_value_list& lst = octave_value_list ()) const; + const octave_value_list& lst = octave_value_list ()) const; bool all_strings_p (void) const; @@ -172,7 +172,7 @@ octave_value& elem (octave_idx_type n) { if (n >= length ()) - resize (n + 1); + resize (n + 1); return data(n); }
--- a/src/oct-prcstrm.h +++ b/src/oct-prcstrm.h @@ -35,14 +35,14 @@ public: octave_iprocstream (const std::string& n, - std::ios::openmode arg_md = std::ios::in, - oct_mach_info::float_format flt_fmt - = oct_mach_info::native_float_format ()); + std::ios::openmode arg_md = std::ios::in, + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); static octave_stream create (const std::string& n, std::ios::openmode arg_md = std::ios::in, - oct_mach_info::float_format flt_fmt - = oct_mach_info::native_float_format ()); + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); protected: @@ -63,14 +63,14 @@ public: octave_oprocstream (const std::string& n, - std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format flt_fmt - = oct_mach_info::native_float_format ()); + std::ios::openmode arg_md = std::ios::out, + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); static octave_stream create (const std::string& n, std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format flt_fmt - = oct_mach_info::native_float_format ()); + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); protected:
--- a/src/oct-stdstrm.h +++ b/src/oct-stdstrm.h @@ -34,20 +34,20 @@ public: octave_tstdiostream (const std::string& n, FILE_T f = 0, - std::ios::openmode m = std::ios::in|std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format (), - typename BUF_T::close_fcn cf = BUF_T::file_close) + std::ios::openmode m = std::ios::in|std::ios::out, + oct_mach_info::float_format ff + = oct_mach_info::native_float_format (), + typename BUF_T::close_fcn cf = BUF_T::file_close) : octave_base_stream (m, ff), nm (n), md (m), s (f ? new STREAM_T (f, cf) : 0) { } static octave_stream create (const std::string& n, FILE_T f = 0, - std::ios::openmode m = std::ios::in|std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format (), - typename BUF_T::close_fcn cf = BUF_T::file_close) + std::ios::openmode m = std::ios::in|std::ios::out, + oct_mach_info::float_format ff + = oct_mach_info::native_float_format (), + typename BUF_T::close_fcn cf = BUF_T::file_close) { return octave_stream (new octave_tstdiostream (n, f, m, ff, cf)); }
--- a/src/oct-stream.h +++ b/src/oct-stream.h @@ -52,8 +52,8 @@ }; scanf_format_elt (const char *txt = 0, int w = 0, bool d = false, - char typ = '\0', char mod = '\0', - const std::string& ch_class = std::string ()) + char typ = '\0', char mod = '\0', + const std::string& ch_class = std::string ()) : text (strsave (txt)), width (w), discard (d), type (typ), modifier (mod), char_class (ch_class) { } @@ -64,14 +64,14 @@ scanf_format_elt& operator = (const scanf_format_elt& e) { if (this != &e) - { - text = strsave (e.text); - width = e.width; - discard = e.discard; - type = e.type; - modifier = e.modifier; - char_class = e.char_class; - } + { + text = strsave (e.text); + width = e.width; + discard = e.discard; + type = e.type; + modifier = e.modifier; + char_class = e.char_class; + } return *this; } @@ -131,12 +131,12 @@ curr_idx++; if (curr_idx >= list.length ()) - { - if (cycle) - curr_idx = 0; - else - return 0; - } + { + if (cycle) + curr_idx = 0; + else + return 0; + } return current (); } @@ -166,8 +166,8 @@ std::ostringstream *buf; void add_elt_to_list (int width, bool discard, char type, char modifier, - octave_idx_type& num_elts, - const std::string& char_class = std::string ()); + octave_idx_type& num_elts, + const std::string& char_class = std::string ()); void process_conversion (const std::string& s, size_t& i, size_t n, int& width, bool& discard, char& type, @@ -189,8 +189,8 @@ public: printf_format_elt (const char *txt = 0, int n = 0, int w = 0, - int p = 0, const std::string& f = std::string (), - char typ = '\0', char mod = '\0') + int p = 0, const std::string& f = std::string (), + char typ = '\0', char mod = '\0') : text (strsave (txt)), args (n), fw (w), prec (p), flags (f), type (typ), modifier (mod) { } @@ -201,15 +201,15 @@ printf_format_elt& operator = (const printf_format_elt& e) { if (this != &e) - { - text = strsave (e.text); - args = e.args; - fw = e.fw; - prec = e.prec; - flags = e.flags; - type = e.type; - modifier = e.modifier; - } + { + text = strsave (e.text); + args = e.args; + fw = e.fw; + prec = e.prec; + flags = e.flags; + type = e.type; + modifier = e.modifier; + } return *this; } @@ -265,12 +265,12 @@ curr_idx++; if (curr_idx >= list.length ()) - { - if (cycle) - curr_idx = 0; - else - return 0; - } + { + if (cycle) + curr_idx = 0; + else + return 0; + } return current (); } @@ -299,17 +299,17 @@ std::ostringstream *buf; void add_elt_to_list (int args, const std::string& flags, int fw, - int prec, char type, char modifier, - octave_idx_type& num_elts); + int prec, char type, char modifier, + octave_idx_type& num_elts); void process_conversion (const std::string& s, size_t& i, size_t n, - int& args, std::string& flags, int& fw, - int& prec, char& modifier, char& type, - octave_idx_type& num_elts); + int& args, std::string& flags, int& fw, + int& prec, char& modifier, char& type, + octave_idx_type& num_elts); void finish_conversion (const std::string& s, size_t& i, int args, - const std::string& flags, int fw, int prec, - char modifier, char& type, + const std::string& flags, int fw, int prec, + char modifier, char& type, octave_idx_type& num_elts); // No copying! @@ -330,8 +330,8 @@ public: octave_base_stream (std::ios::openmode arg_md = std::ios::in|std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format ()) + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : count (0), md (arg_md), flt_fmt (ff), fail (false), open_state (true) { } @@ -377,10 +377,10 @@ void close (void) { if (is_open ()) - { - open_state = false; - do_close (); - } + { + open_state = false; + do_close (); + } } int file_number (void); @@ -435,24 +435,24 @@ // are those that define is). std::string do_gets (octave_idx_type max_len, bool& err, bool strip_newline, - const std::string& who /* = "gets" */); + const std::string& who /* = "gets" */); std::string getl (octave_idx_type max_len, bool& err, const std::string& who /* = "getl" */); std::string gets (octave_idx_type max_len, bool& err, const std::string& who /* = "gets" */); long skipl (long count, bool& err, const std::string& who /* = "skipl" */); octave_value do_scanf (scanf_format_list& fmt_list, octave_idx_type nr, octave_idx_type nc, - bool one_elt_size_spec, octave_idx_type& count, - const std::string& who /* = "scanf" */); + bool one_elt_size_spec, octave_idx_type& count, + const std::string& who /* = "scanf" */); octave_value scanf (const std::string& fmt, const Array<double>& size, - octave_idx_type& count, const std::string& who /* = "scanf" */); + octave_idx_type& count, const std::string& who /* = "scanf" */); bool do_oscanf (const scanf_format_elt *elt, octave_value&, - const std::string& who /* = "scanf" */); + const std::string& who /* = "scanf" */); octave_value_list oscanf (const std::string& fmt, - const std::string& who /* = "scanf" */); + const std::string& who /* = "scanf" */); // Functions that are defined for all output streams (output streams // are those that define os). @@ -460,10 +460,10 @@ int flush (void); int do_printf (printf_format_list& fmt_list, const octave_value_list& args, - const std::string& who /* = "printf" */); + const std::string& who /* = "printf" */); int printf (const std::string& fmt, const octave_value_list& args, - const std::string& who /* = "printf" */); + const std::string& who /* = "printf" */); int puts (const std::string& s, const std::string& who /* = "puts" */); @@ -497,11 +497,11 @@ std::string getl (octave_idx_type max_len, bool& err, const std::string& who /* = "getl" */); std::string getl (const octave_value& max_len, bool& err, - const std::string& who /* = "getl" */); + const std::string& who /* = "getl" */); std::string gets (octave_idx_type max_len, bool& err, const std::string& who /* = "gets" */); std::string gets (const octave_value& max_len, bool& err, - const std::string& who /* = "gets" */); + const std::string& who /* = "gets" */); long skipl (long count, bool& err, const std::string& who /* = "skipl" */); long skipl (const octave_value& count, bool& err, const std::string& who /* = "skipl" */); @@ -518,37 +518,37 @@ void close (void); octave_value read (const Array<double>& size, octave_idx_type block_size, - oct_data_conv::data_type input_type, - oct_data_conv::data_type output_type, - octave_idx_type skip, oct_mach_info::float_format flt_fmt, - octave_idx_type& count); + oct_data_conv::data_type input_type, + oct_data_conv::data_type output_type, + octave_idx_type skip, oct_mach_info::float_format flt_fmt, + octave_idx_type& count); octave_idx_type write (const octave_value& data, octave_idx_type block_size, - oct_data_conv::data_type output_type, - octave_idx_type skip, oct_mach_info::float_format flt_fmt); + oct_data_conv::data_type output_type, + octave_idx_type skip, oct_mach_info::float_format flt_fmt); template <class T> octave_idx_type write (const Array<T>&, octave_idx_type block_size, - oct_data_conv::data_type output_type, - octave_idx_type skip, oct_mach_info::float_format flt_fmt); + oct_data_conv::data_type output_type, + octave_idx_type skip, oct_mach_info::float_format flt_fmt); octave_value scanf (const std::string& fmt, const Array<double>& size, - octave_idx_type& count, const std::string& who /* = "scanf" */); + octave_idx_type& count, const std::string& who /* = "scanf" */); octave_value scanf (const octave_value& fmt, const Array<double>& size, - octave_idx_type& count, const std::string& who /* = "scanf" */); + octave_idx_type& count, const std::string& who /* = "scanf" */); octave_value_list oscanf (const std::string& fmt, - const std::string& who /* = "scanf" */); + const std::string& who /* = "scanf" */); octave_value_list oscanf (const octave_value& fmt, - const std::string& who /* = "scanf" */); + const std::string& who /* = "scanf" */); int printf (const std::string& fmt, const octave_value_list& args, - const std::string& who /* = "printf" */); + const std::string& who /* = "printf" */); int printf (const octave_value& fmt, const octave_value_list& args, - const std::string& who /* = "printf" */); + const std::string& who /* = "printf" */); int puts (const std::string& s, const std::string& who /* = "puts" */); int puts (const octave_value& s, const std::string& who /* = "puts" */); @@ -568,7 +568,7 @@ void error (const std::string& msg) { if (rep) - rep->error (msg); + rep->error (msg); } void error (const char *msg) { error (std::string (msg)); } @@ -611,12 +611,12 @@ bool retval = true; if (rep) - { - if (clear) - rep->clear (); - } + { + if (clear) + rep->clear (); + } else - retval = false; + retval = false; return retval; } @@ -624,7 +624,7 @@ void invalid_operation (const std::string& who, const char *rw) { if (rep) - rep->invalid_operation (who, rw); + rep->invalid_operation (who, rw); } }; @@ -652,7 +652,7 @@ static int remove (int fid, const std::string& who = std::string ()); static int remove (const octave_value& fid, - const std::string& who = std::string ()); + const std::string& who = std::string ()); static void clear (bool flush = true); @@ -679,7 +679,7 @@ octave_stream do_lookup (int fid, const std::string& who = std::string ()) const; octave_stream do_lookup (const octave_value& fid, - const std::string& who = std::string ()) const; + const std::string& who = std::string ()) const; int do_remove (int fid, const std::string& who = std::string ()); int do_remove (const octave_value& fid, const std::string& who = std::string ());
--- a/src/oct-strstrm.h +++ b/src/oct-strstrm.h @@ -35,8 +35,8 @@ public: octave_base_strstream (std::ios::openmode m = std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format ()) + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : octave_base_stream (m, ff) { } // Position a stream at OFFSET relative to ORIGIN. @@ -76,26 +76,26 @@ public: octave_istrstream (const char *data, - std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format ()) + std::ios::openmode arg_md = std::ios::out, + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : octave_base_strstream (arg_md, ff), is (data) { } octave_istrstream (const std::string& data, - std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format ()) + std::ios::openmode arg_md = std::ios::out, + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : octave_base_strstream (arg_md, ff), is (data.c_str ()) { } static octave_stream create (const char *data, std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format ()); + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()); static octave_stream create (const std::string& data, std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format ()); + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()); // Return non-zero if EOF has been reached on this stream. @@ -134,14 +134,14 @@ public: octave_ostrstream (std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format ()) + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : octave_base_strstream (arg_md, ff) { } static octave_stream create (std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff - = oct_mach_info::native_float_format ()); + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()); // Return non-zero if EOF has been reached on this stream.
--- a/src/octave.h +++ b/src/octave.h @@ -23,13 +23,13 @@ #if !defined (octave_octave_h) #define octave_octave_h 1 -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif extern OCTINTERP_API int octave_main (int argc, char **argv, int embedded); -#ifdef __cplusplus +#ifdef __cplusplus } #endif
--- a/src/ops.h +++ b/src/ops.h @@ -78,7 +78,7 @@ t v = dynamic_cast<t> (a) #define CAST_BINOP_ARGS(t1, t2) \ - t1 v1 = dynamic_cast<t1> (a1); \ + t1 v1 = dynamic_cast<t1> (a1); \ t2 v2 = dynamic_cast<t2> (a2) #define CAST_CONV_ARG(t) \ @@ -87,20 +87,20 @@ #define ASSIGNOPDECL(name) \ static octave_value \ CONCAT2(oct_assignop_, name) (octave_base_value& a1, \ - const octave_value_list& idx, \ - const octave_base_value& a2) + const octave_value_list& idx, \ + const octave_base_value& a2) #define NULLASSIGNOPDECL(name) \ static octave_value \ CONCAT2(oct_assignop_, name) (octave_base_value& a, \ - const octave_value_list& idx, \ - const octave_base_value&) + const octave_value_list& idx, \ + const octave_base_value&) #define ASSIGNANYOPDECL(name) \ static octave_value \ CONCAT2(oct_assignop_, name) (octave_base_value& a1, \ - const octave_value_list& idx, \ - const octave_value& a2) + const octave_value_list& idx, \ + const octave_value& a2) #define DEFASSIGNOP(name, t1, t2) \ ASSIGNOPDECL (name) @@ -344,19 +344,19 @@ #define BINOP_NONCONFORMANT(msg) \ gripe_nonconformant (msg, \ - a1.rows (), a1.columns (), \ - a2.rows (), a2.columns ()); \ + a1.rows (), a1.columns (), \ + a2.rows (), a2.columns ()); \ return octave_value () -#define CATOPDECL(name, a1, a2) \ +#define CATOPDECL(name, a1, a2) \ static octave_value \ CONCAT2(oct_catop_, name) (octave_base_value& a1, const octave_base_value& a2, \ - const Array<octave_idx_type>& ra_idx) + const Array<octave_idx_type>& ra_idx) -#define DEFCATOPX(name, t1, t2) \ +#define DEFCATOPX(name, t1, t2) \ CATOPDECL (name, , ) -#define DEFCATOP(name, t1, t2) \ +#define DEFCATOP(name, t1, t2) \ CATOPDECL (name, a1, a2) // FIXME -- in some cases, the constructor isn't necessary. @@ -381,8 +381,8 @@ CAST_BINOP_ARGS (CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \ \ return octave_value (v1.char_array_value () . f (v2.char_array_value (), ra_idx), \ - ((a1.is_sq_string () || a2.is_sq_string ()) \ - ? '\'' : '"')); \ + ((a1.is_sq_string () || a2.is_sq_string ()) \ + ? '\'' : '"')); \ } // For compatibility, the second arg is always converted to the type @@ -397,8 +397,8 @@ #define CATOP_NONCONFORMANT(msg) \ gripe_nonconformant (msg, \ - a1.rows (), a1.columns (), \ - a2.rows (), a2.columns ()); \ + a1.rows (), a1.columns (), \ + a2.rows (), a2.columns ()); \ return octave_value () #endif
--- a/src/ov-base-diag.h +++ b/src/ov-base-diag.h @@ -65,18 +65,18 @@ octave_value full_value (void) const { return to_dense (); } octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx); + const std::list<octave_value_list>& idx); octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, int) + const std::list<octave_value_list>& idx, int) { return subsref (type, idx); } octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); octave_value subsasgn (const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); dim_vector dims (void) const { return matrix.dims (); } @@ -103,7 +103,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return to_dense ().sort (dim, mode); } octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const + sortmode mode = ASCENDING) const { return to_dense ().sort (sidx, dim, mode); } sortmode is_sorted (sortmode mode = UNSORTED) const @@ -197,8 +197,8 @@ bool load_ascii (std::istream& is); int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const; + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const; mxArray *as_mxArray (void) const;
--- a/src/ov-base-int.h +++ b/src/ov-base-int.h @@ -74,7 +74,7 @@ bool save_binary (std::ostream& os, bool& ); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format ); + oct_mach_info::float_format ); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool); @@ -117,7 +117,7 @@ bool save_binary (std::ostream& os, bool& ); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format ); + oct_mach_info::float_format ); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool );
--- a/src/ov-base-mat.h +++ b/src/ov-base-mat.h @@ -81,18 +81,18 @@ void maybe_economize (void) { matrix.maybe_economize (); } octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx); + const std::list<octave_value_list>& idx); octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, int) + const std::list<octave_value_list>& idx, int) { return subsref (type, idx); } octave_value subsasgn (const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); void assign (const octave_value_list& idx, const MT& rhs); @@ -126,7 +126,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return octave_value (matrix.sort (dim, mode)); } octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const + sortmode mode = ASCENDING) const { return octave_value (matrix.sort (sidx, dim, mode)); } sortmode is_sorted (sortmode mode = UNSORTED) const
--- a/src/ov-base-scalar.h +++ b/src/ov-base-scalar.h @@ -65,15 +65,15 @@ octave_value full_value (void) const { return scalar; } octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx); + const std::list<octave_value_list>& idx); octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, int) + const std::list<octave_value_list>& idx, int) { return subsref (type, idx); } octave_value subsasgn (const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); bool is_constant (void) const { return true; } @@ -101,7 +101,7 @@ octave_value sort (octave_idx_type, sortmode) const { return octave_value (scalar); } octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type, - sortmode) const + sortmode) const { sidx.resize (dim_vector (1, 1)); sidx(0) = 0;
--- a/src/ov-base-sparse.h +++ b/src/ov-base-sparse.h @@ -54,14 +54,14 @@ octave_base_sparse (void) : octave_base_value (), typ (MatrixType ()) { } octave_base_sparse (const T& a) : octave_base_value (), matrix (a), - typ (MatrixType ()) + typ (MatrixType ()) { if (matrix.ndims () == 0) matrix.resize (dim_vector (0, 0)); } octave_base_sparse (const T& a, const MatrixType& t) : octave_base_value (), - matrix (a), typ (t) + matrix (a), typ (t) { if (matrix.ndims () == 0) matrix.resize (dim_vector (0, 0)); @@ -87,15 +87,15 @@ octave_value full_value (void) const { return matrix.matrix_value (); } octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx); + const std::list<octave_value_list>& idx); octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, int) + const std::list<octave_value_list>& idx, int) { return subsref (type, idx); } octave_value subsasgn (const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); void assign (const octave_value_list& idx, const T& rhs); @@ -104,7 +104,7 @@ dim_vector dims (void) const { return matrix.dims (); } octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); octave_value reshape (const dim_vector& new_dims) const { return T (matrix.reshape (new_dims)); } @@ -123,7 +123,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return octave_value (matrix.sort (dim, mode)); } octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const + sortmode mode = ASCENDING) const { return octave_value (matrix.sort (sidx, dim, mode)); } sortmode is_sorted (sortmode mode = UNSORTED) const
--- a/src/ov-base.h +++ b/src/ov-base.h @@ -167,8 +167,8 @@ void t::register_type (void) \ { \ t_id = octave_value_typeinfo::register_type (t::t_name, \ - t::c_name, \ - octave_value (new t ())); \ + t::c_name, \ + octave_value (new t ())); \ } // A base value type, so that derived types only have to redefine what @@ -245,16 +245,16 @@ virtual octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx); + const std::list<octave_value_list>& idx); virtual octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, - int nargout); + const std::list<octave_value_list>& idx, + int nargout); virtual octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx, + const std::list<octave_value_list>& idx, bool auto_add); virtual octave_value @@ -267,8 +267,8 @@ virtual octave_value subsasgn (const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); virtual idx_vector index_vector (void) const; @@ -571,7 +571,7 @@ virtual octave_value_list list_value (void) const; virtual octave_value convert_to_str (bool pad = false, bool force = false, - char type = '\'') const; + char type = '\'') const; virtual octave_value convert_to_str_internal (bool pad, bool force, char type) const; @@ -589,7 +589,7 @@ virtual void print_with_name (std::ostream& output_buf, const std::string& name, - bool print_padding = true); + bool print_padding = true); virtual void print_info (std::ostream& os, const std::string& prefix) const; @@ -600,7 +600,7 @@ virtual bool save_binary (std::ostream& os, bool& save_as_floats); virtual bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) virtual bool @@ -612,8 +612,8 @@ virtual int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const; + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const; virtual void *mex_get_data (void) const { return 0; } @@ -626,10 +626,10 @@ virtual octave_value diag (octave_idx_type k = 0) const; virtual octave_value sort (octave_idx_type dim = 0, - sortmode mode = ASCENDING) const; + sortmode mode = ASCENDING) const; virtual octave_value sort (Array<octave_idx_type> &sidx, - octave_idx_type dim = 0, - sortmode mode = ASCENDING) const; + octave_idx_type dim = 0, + sortmode mode = ASCENDING) const; virtual sortmode is_sorted (sortmode mode = UNSORTED) const; @@ -715,8 +715,8 @@ // This should only be called for derived types. octave_value numeric_assign (const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); void reset_indent_level (void) const { curr_print_indent_level = 0; }
--- a/src/ov-bool-mat.h +++ b/src/ov-bool-mat.h @@ -197,7 +197,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -206,8 +206,8 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { return os.write (matrix, block_size, output_type, skip, flt_fmt); } // Unsafe. This function exists to support the MEX interface.
--- a/src/ov-bool-sparse.h +++ b/src/ov-bool-sparse.h @@ -60,7 +60,7 @@ : octave_base_sparse<SparseBoolMatrix> (bnda) { } octave_sparse_bool_matrix (const SparseBoolMatrix& bnda, - const MatrixType& t) + const MatrixType& t) : octave_base_sparse<SparseBoolMatrix> (bnda, t) { } octave_sparse_bool_matrix (const boolNDArray& m) @@ -129,7 +129,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
--- a/src/ov-bool.h +++ b/src/ov-bool.h @@ -69,7 +69,7 @@ type_conv_info numeric_conversion_function (void) const; octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); idx_vector index_vector (void) const { return idx_vector (scalar); } @@ -192,7 +192,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -201,11 +201,11 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { return os.write (bool_array_value (), block_size, output_type, - skip, flt_fmt); + skip, flt_fmt); } mxArray *as_mxArray (void) const;
--- a/src/ov-builtin.h +++ b/src/ov-builtin.h @@ -45,21 +45,21 @@ typedef octave_value_list (*fcn) (const octave_value_list&, int); octave_builtin (fcn ff, const std::string& nm = std::string (), - const std::string& ds = std::string ()) + const std::string& ds = std::string ()) : octave_function (nm, ds), f (ff) { } ~octave_builtin (void) { } octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx) + const std::list<octave_value_list>& idx) { octave_value_list tmp = subsref (type, idx, 1); return tmp.length () > 0 ? tmp(0) : octave_value (); } octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, - int nargout); + const std::list<octave_value_list>& idx, + int nargout); octave_function *function_value (bool = false) { return this; }
--- a/src/ov-cell.h +++ b/src/ov-cell.h @@ -73,22 +73,22 @@ #endif octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx) + const std::list<octave_value_list>& idx) { octave_value_list tmp = subsref (type, idx, 1); return tmp.length () > 0 ? tmp(0) : octave_value (); } octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, int); + const std::list<octave_value_list>& idx, int); octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx, + const std::list<octave_value_list>& idx, bool auto_add); octave_value subsasgn (const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); void assign (const octave_value_list& idx, const Cell& rhs); @@ -101,7 +101,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const; octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const; + sortmode mode = ASCENDING) const; sortmode is_sorted (sortmode mode = UNSORTED) const; @@ -150,7 +150,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
--- a/src/ov-class.h +++ b/src/ov-class.h @@ -79,25 +79,25 @@ octave_idx_type numel (const octave_value_list&); octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx) + const std::list<octave_value_list>& idx) { octave_value_list tmp = subsref (type, idx, 1); return tmp.length () > 0 ? tmp(0) : octave_value (); } octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, - int nargout); + const std::list<octave_value_list>& idx, + int nargout); static octave_value numeric_conv (const Cell& val, - const std::string& type); + const std::string& type); void assign(const std::string& k, const octave_value& rhs) { map.assign (k, rhs); }; octave_value subsasgn (const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); idx_vector index_vector (void) const; @@ -150,7 +150,7 @@ bool print_name_tag (std::ostream& os, const std::string& name) const; void print_with_name (std::ostream& os, const std::string& name, - bool print_padding = true); + bool print_padding = true); bool reconstruct_exemplar (void); @@ -165,7 +165,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -215,15 +215,15 @@ exemplar_info (const exemplar_info& x) : field_names (x.field_names), - parent_class_names (x.parent_class_names) { } + parent_class_names (x.parent_class_names) { } exemplar_info& operator = (const exemplar_info& x) { if (&x != this) - { - field_names = x.field_names; - parent_class_names = x.parent_class_names; - } + { + field_names = x.field_names; + parent_class_names = x.parent_class_names; + } return *this; }
--- a/src/ov-complex.h +++ b/src/ov-complex.h @@ -79,13 +79,13 @@ octave_base_value *try_narrowing_conversion (void); octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); octave_value any (int = 0) const { return (scalar != Complex (0, 0) - && ! (lo_ieee_isnan (std::real (scalar)) - || lo_ieee_isnan (std::imag (scalar)))); + && ! (lo_ieee_isnan (std::real (scalar)) + || lo_ieee_isnan (std::imag (scalar)))); } builtin_type_t builtin_type (void) const { return btyp_complex; } @@ -167,7 +167,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -176,12 +176,12 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { // Yes, for compatibility, we drop the imaginary part here. return os.write (array_value (true), block_size, output_type, - skip, flt_fmt); + skip, flt_fmt); } mxArray *as_mxArray (void) const;
--- a/src/ov-cx-diag.h +++ b/src/ov-cx-diag.h @@ -78,7 +78,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); octave_value map (unary_mapper_t umap) const;
--- a/src/ov-cx-mat.h +++ b/src/ov-cx-mat.h @@ -149,7 +149,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -158,12 +158,12 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { // Yes, for compatibility, we drop the imaginary part here. return os.write (matrix_value (true), block_size, output_type, - skip, flt_fmt); + skip, flt_fmt); } void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
--- a/src/ov-cx-sparse.h +++ b/src/ov-cx-sparse.h @@ -66,18 +66,18 @@ : octave_base_sparse<SparseComplexMatrix> (m) { } octave_sparse_complex_matrix (const SparseComplexMatrix& m, - const MatrixType &t) + const MatrixType &t) : octave_base_sparse<SparseComplexMatrix> (m, t) { } octave_sparse_complex_matrix (const MSparse<Complex>& m) : octave_base_sparse<SparseComplexMatrix> (m) { } octave_sparse_complex_matrix (const MSparse<Complex>& m, - const MatrixType &t) + const MatrixType &t) : octave_base_sparse<SparseComplexMatrix> (m, t) { } octave_sparse_complex_matrix (const Sparse<Complex>& m, - const MatrixType &t) + const MatrixType &t) : octave_base_sparse<SparseComplexMatrix> (SparseComplexMatrix (m), t) { } octave_sparse_complex_matrix (const Sparse<Complex>& m) @@ -131,19 +131,19 @@ #if 0 int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { // Yes, for compatibility, we drop the imaginary part here. return os.write (matrix_value (true), block_size, output_type, - skip, flt_fmt); + skip, flt_fmt); } #endif bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
--- a/src/ov-dld-fcn.h +++ b/src/ov-dld-fcn.h @@ -48,8 +48,8 @@ octave_dld_function (void) { } octave_dld_function (octave_builtin::fcn ff, const octave_shlib& shl, - const std::string& nm = std::string (), - const std::string& ds = std::string ()); + const std::string& nm = std::string (), + const std::string& ds = std::string ()); ~octave_dld_function (void);
--- a/src/ov-fcn-handle.h +++ b/src/ov-fcn-handle.h @@ -73,15 +73,15 @@ octave_base_value *empty_clone (void) const { return new octave_fcn_handle (); } octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx) + const std::list<octave_value_list>& idx) { octave_value_list tmp = subsref (type, idx, 1); return tmp.length () > 0 ? tmp(0) : octave_value (); } octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, - int nargout); + const std::list<octave_value_list>& idx, + int nargout); octave_value_list do_multi_index_op (int nargout, const octave_value_list& args); @@ -115,7 +115,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
--- a/src/ov-fcn-inline.h +++ b/src/ov-fcn-inline.h @@ -47,7 +47,7 @@ : octave_fcn_handle (), iftext (), ifargs () { } octave_fcn_inline (const std::string& f, const string_vector& a, - const std::string& n = std::string ()); + const std::string& n = std::string ()); octave_fcn_inline (const octave_fcn_inline& fi) : octave_fcn_handle (fi), iftext (fi.iftext), ifargs (fi.ifargs) { } @@ -76,7 +76,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
--- a/src/ov-fcn.h +++ b/src/ov-fcn.h @@ -140,7 +140,7 @@ protected: octave_function (const std::string& nm, - const std::string& ds = std::string ()) + const std::string& ds = std::string ()) : relative (false), locked (false), private_function (false), xdispatch_class (), my_name (nm), my_dir_name (), doc (ds) { }
--- a/src/ov-float.h +++ b/src/ov-float.h @@ -75,7 +75,7 @@ octave_base_value *empty_clone (void) const { return new octave_matrix (); } octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); idx_vector index_vector (void) const { return idx_vector (scalar); } @@ -226,7 +226,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -235,11 +235,11 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { return os.write (array_value (), block_size, output_type, - skip, flt_fmt); + skip, flt_fmt); } mxArray *as_mxArray (void) const;
--- a/src/ov-flt-complex.h +++ b/src/ov-flt-complex.h @@ -77,13 +77,13 @@ octave_base_value *try_narrowing_conversion (void); octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); octave_value any (int = 0) const { return (scalar != FloatComplex (0, 0) - && ! (lo_ieee_isnan (std::real (scalar)) - || lo_ieee_isnan (std::imag (scalar)))); + && ! (lo_ieee_isnan (std::real (scalar)) + || lo_ieee_isnan (std::imag (scalar)))); } builtin_type_t builtin_type (void) const { return btyp_float_complex; } @@ -165,7 +165,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -174,12 +174,12 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { // Yes, for compatibility, we drop the imaginary part here. return os.write (array_value (true), block_size, output_type, - skip, flt_fmt); + skip, flt_fmt); } mxArray *as_mxArray (void) const;
--- a/src/ov-flt-cx-diag.h +++ b/src/ov-flt-cx-diag.h @@ -76,7 +76,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); octave_value map (unary_mapper_t umap) const;
--- a/src/ov-flt-cx-mat.h +++ b/src/ov-flt-cx-mat.h @@ -147,7 +147,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -156,12 +156,12 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { // Yes, for compatibility, we drop the imaginary part here. return os.write (matrix_value (true), block_size, output_type, - skip, flt_fmt); + skip, flt_fmt); } void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
--- a/src/ov-flt-re-diag.h +++ b/src/ov-flt-re-diag.h @@ -76,7 +76,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); octave_value map (unary_mapper_t umap) const;
--- a/src/ov-flt-re-mat.h +++ b/src/ov-flt-re-mat.h @@ -183,7 +183,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -192,8 +192,8 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { return os.write (matrix, block_size, output_type, skip, flt_fmt); } // Unsafe. This function exists to support the MEX interface.
--- a/src/ov-intx.h +++ b/src/ov-intx.h @@ -80,8 +80,8 @@ dest_el_type::clear_conv_flag (); IM retval (matrix); if (dest_el_type::get_trunc_flag ()) - gripe_truncated_conversion (src_el_type::type_name (), - dest_el_type::type_name ()); + gripe_truncated_conversion (src_el_type::type_name (), + dest_el_type::type_name ()); dest_el_type::clear_conv_flag (); return retval; } @@ -118,14 +118,14 @@ double retval = lo_ieee_nan_value (); if (numel () > 0) - { - gripe_implicit_conversion ("Octave:array-as-scalar", - type_name (), "real scalar"); + { + gripe_implicit_conversion ("Octave:array-as-scalar", + type_name (), "real scalar"); - retval = matrix(0).double_value (); - } + retval = matrix(0).double_value (); + } else - gripe_invalid_conversion (type_name (), "real scalar"); + gripe_invalid_conversion (type_name (), "real scalar"); return retval; @@ -137,14 +137,14 @@ float retval = lo_ieee_float_nan_value (); if (numel () > 0) - { - gripe_implicit_conversion ("Octave:array-as-scalar", - type_name (), "real scalar"); + { + gripe_implicit_conversion ("Octave:array-as-scalar", + type_name (), "real scalar"); - retval = matrix(0).float_value (); - } + retval = matrix(0).float_value (); + } else - gripe_invalid_conversion (type_name (), "real scalar"); + gripe_invalid_conversion (type_name (), "real scalar"); return retval; @@ -160,15 +160,15 @@ Matrix retval; dim_vector dv = dims (); if (dv.length () > 2) - error ("invalid conversion of %s to Matrix", type_name().c_str ()); + error ("invalid conversion of %s to Matrix", type_name().c_str ()); else - { - retval = Matrix (dv(0), dv(1)); - double *vec = retval.fortran_vec (); - octave_idx_type nel = matrix.numel (); - for (octave_idx_type i = 0; i < nel; i++) - vec[i] = matrix(i).double_value (); - } + { + retval = Matrix (dv(0), dv(1)); + double *vec = retval.fortran_vec (); + octave_idx_type nel = matrix.numel (); + for (octave_idx_type i = 0; i < nel; i++) + vec[i] = matrix(i).double_value (); + } return retval; } @@ -178,15 +178,15 @@ FloatMatrix retval; dim_vector dv = dims (); if (dv.length () > 2) - error ("invalid conversion of %s to FloatMatrix", type_name().c_str ()); + error ("invalid conversion of %s to FloatMatrix", type_name().c_str ()); else - { - retval = FloatMatrix (dv(0), dv(1)); - float *vec = retval.fortran_vec (); - octave_idx_type nel = matrix.numel (); - for (octave_idx_type i = 0; i < nel; i++) - vec[i] = matrix(i).float_value (); - } + { + retval = FloatMatrix (dv(0), dv(1)); + float *vec = retval.fortran_vec (); + octave_idx_type nel = matrix.numel (); + for (octave_idx_type i = 0; i < nel; i++) + vec[i] = matrix(i).float_value (); + } return retval; } @@ -196,15 +196,15 @@ ComplexMatrix retval; dim_vector dv = dims(); if (dv.length () > 2) - error ("invalid conversion of %s to Matrix", type_name().c_str ()); + error ("invalid conversion of %s to Matrix", type_name().c_str ()); else - { - retval = ComplexMatrix (dv(0), dv(1)); - Complex *vec = retval.fortran_vec (); - octave_idx_type nel = matrix.numel (); - for (octave_idx_type i = 0; i < nel; i++) - vec[i] = Complex (matrix(i).double_value ()); - } + { + retval = ComplexMatrix (dv(0), dv(1)); + Complex *vec = retval.fortran_vec (); + octave_idx_type nel = matrix.numel (); + for (octave_idx_type i = 0; i < nel; i++) + vec[i] = Complex (matrix(i).double_value ()); + } return retval; } @@ -214,15 +214,15 @@ FloatComplexMatrix retval; dim_vector dv = dims(); if (dv.length () > 2) - error ("invalid conversion of %s to FloatMatrix", type_name().c_str ()); + error ("invalid conversion of %s to FloatMatrix", type_name().c_str ()); else - { - retval = FloatComplexMatrix (dv(0), dv(1)); - FloatComplex *vec = retval.fortran_vec (); - octave_idx_type nel = matrix.numel (); - for (octave_idx_type i = 0; i < nel; i++) - vec[i] = FloatComplex (matrix(i).float_value ()); - } + { + retval = FloatComplexMatrix (dv(0), dv(1)); + FloatComplex *vec = retval.fortran_vec (); + octave_idx_type nel = matrix.numel (); + for (octave_idx_type i = 0; i < nel; i++) + vec[i] = FloatComplex (matrix(i).float_value ()); + } return retval; } @@ -331,8 +331,8 @@ { return idx_cache ? *idx_cache : set_idx_cache (idx_vector (matrix)); } int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { return os.write (matrix, block_size, output_type, skip, flt_fmt); } // Unsafe. This function exists to support the MEX interface. @@ -416,7 +416,7 @@ { return new OCTAVE_VALUE_INT_MATRIX_T (); } octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false) + bool resize_ok = false) { // FIXME -- this doesn't solve the problem of // @@ -452,8 +452,8 @@ IS retval (scalar); if (dest_el_type::get_trunc_flag ()) - gripe_truncated_conversion (src_el_type::type_name (), - dest_el_type::type_name ()); + gripe_truncated_conversion (src_el_type::type_name (), + dest_el_type::type_name ()); dest_el_type::clear_conv_flag (); return retval; } @@ -519,19 +519,19 @@ octave_value resize (const dim_vector& dv, bool fill = false) const { if (fill) - { - intNDArray<OCTAVE_INT_T> retval (dv, 0); - if (dv.numel()) - retval(0) = scalar; - return retval; - } + { + intNDArray<OCTAVE_INT_T> retval (dv, 0); + if (dv.numel()) + retval(0) = scalar; + return retval; + } else - { - intNDArray<OCTAVE_INT_T> retval (dv); - if (dv.numel()) - retval(0) = scalar; - return retval; - } + { + intNDArray<OCTAVE_INT_T> retval (dv); + if (dv.numel()) + retval(0) = scalar; + return retval; + } } double double_value (bool = false) const { return scalar.double_value (); } @@ -646,11 +646,11 @@ idx_vector index_vector (void) const { return idx_vector (scalar); } int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, octave_idx_type skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, octave_idx_type skip, + oct_mach_info::float_format flt_fmt) const { return os.write (OCTAVE_VALUE_INT_NDARRAY_EXTRACTOR_FUNCTION (), - block_size, output_type, skip, flt_fmt); + block_size, output_type, skip, flt_fmt); } // Unsafe. This function exists to support the MEX interface.
--- a/src/ov-mex-fcn.h +++ b/src/ov-mex-fcn.h @@ -46,20 +46,20 @@ octave_mex_function (void) { } octave_mex_function (void *fptr, bool fmex, const octave_shlib& shl, - const std::string& nm = std::string ()); + const std::string& nm = std::string ()); ~octave_mex_function (void); octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx) + const std::list<octave_value_list>& idx) { octave_value_list tmp = subsref (type, idx, 1); return tmp.length () > 0 ? tmp(0) : octave_value (); } octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, - int nargout); + const std::list<octave_value_list>& idx, + int nargout); octave_function *function_value (bool = false) { return this; }
--- a/src/ov-perm.h +++ b/src/ov-perm.h @@ -53,14 +53,14 @@ octave_value full_value (void) const { return to_dense (); } octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx); + const std::list<octave_value_list>& idx); octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, int) + const std::list<octave_value_list>& idx, int) { return subsref (type, idx); } octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); dim_vector dims (void) const { return matrix.dims (); } @@ -88,7 +88,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return to_dense ().sort (dim, mode); } octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const + sortmode mode = ASCENDING) const { return to_dense ().sort (sidx, dim, mode); } sortmode is_sorted (sortmode mode = UNSORTED) const @@ -197,11 +197,11 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const; + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const; mxArray *as_mxArray (void) const;
--- a/src/ov-range.h +++ b/src/ov-range.h @@ -61,15 +61,15 @@ octave_range (double base, double limit, double inc) : octave_base_value (), range (base, limit, inc), idx_cache () { - if (range.nelem () < 0) - ::error ("invalid range"); + if (range.nelem () < 0) + ::error ("invalid range"); } octave_range (const Range& r) : octave_base_value (), range (r), idx_cache () { - if (range.nelem () < 0 && range.nelem () != -2) - ::error ("invalid range"); + if (range.nelem () < 0 && range.nelem () != -2) + ::error ("invalid range"); } octave_range (const octave_range& r) @@ -97,14 +97,14 @@ octave_base_value *try_narrowing_conversion (void); octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx); + const std::list<octave_value_list>& idx); octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, int) + const std::list<octave_value_list>& idx, int) { return subsref (type, idx); } octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); idx_vector index_vector (void) const { return idx_cache ? *idx_cache : set_idx_cache (idx_vector (range)); } @@ -146,7 +146,7 @@ { return range.sort (dim, mode); } octave_value sort (Array<octave_idx_type>& sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const + sortmode mode = ASCENDING) const { return range.sort (sidx, dim, mode); } sortmode is_sorted (sortmode mode = UNSORTED) const @@ -273,7 +273,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -282,14 +282,14 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { // FIXME -- could be more memory efficient by having a // special case of the octave_stream::write method for ranges. return os.write (matrix_value (), block_size, output_type, skip, - flt_fmt); + flt_fmt); } mxArray *as_mxArray (void) const;
--- a/src/ov-re-diag.h +++ b/src/ov-re-diag.h @@ -58,7 +58,7 @@ octave_base_value *try_narrowing_conversion (void); octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); builtin_type_t builtin_type (void) const { return btyp_double; } @@ -81,7 +81,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); octave_value map (unary_mapper_t umap) const;
--- a/src/ov-re-mat.h +++ b/src/ov-re-mat.h @@ -181,7 +181,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const; octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const; + sortmode mode = ASCENDING) const; // Use matrix_ref here to clear index cache. void increment (void) { matrix_ref () += 1.0; } @@ -201,7 +201,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -210,8 +210,8 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { return os.write (matrix, block_size, output_type, skip, flt_fmt); } // Unsafe. This function exists to support the MEX interface.
--- a/src/ov-re-sparse.h +++ b/src/ov-re-sparse.h @@ -134,15 +134,15 @@ #if 0 int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { return os.write (matrix, block_size, output_type, skip, flt_fmt); } #endif bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
--- a/src/ov-scalar.h +++ b/src/ov-scalar.h @@ -74,7 +74,7 @@ octave_base_value *empty_clone (void) const { return new octave_matrix (); } octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); type_conv_info numeric_demotion_function (void) const; @@ -227,7 +227,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -236,11 +236,11 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { return os.write (array_value (), block_size, output_type, - skip, flt_fmt); + skip, flt_fmt); } mxArray *as_mxArray (void) const;
--- a/src/ov-str-mat.h +++ b/src/ov-str-mat.h @@ -88,7 +88,7 @@ type_conv_info numeric_conversion_function (void) const; octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false) + bool resize_ok = false) { return do_index_op_internal (idx, resize_ok); } octave_value squeeze (void) const @@ -129,7 +129,7 @@ { return octave_value (matrix.sort (dim, mode)); } octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const + sortmode mode = ASCENDING) const { return octave_value (matrix.sort (sidx, dim, mode)); } bool print_as_scalar (void) const { return (rows () <= 1); } @@ -143,7 +143,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); @@ -152,14 +152,14 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const { return os.write (matrix, block_size, output_type, skip, flt_fmt); } protected: octave_value do_index_op_internal (const octave_value_list& idx, - bool resize_ok, char type = '"'); + bool resize_ok, char type = '"'); private: @@ -229,7 +229,7 @@ bool is_sq_string (void) const { return true; } octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false) + bool resize_ok = false) { return do_index_op_internal (idx, resize_ok, '\''); } @@ -237,7 +237,7 @@ { return octave_value (matrix.sort (dim, mode), '\''); } octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const + sortmode mode = ASCENDING) const { return octave_value (matrix.sort (sidx, dim, mode), '\''); } private:
--- a/src/ov-struct.h +++ b/src/ov-struct.h @@ -66,25 +66,25 @@ Cell dotref (const octave_value_list& idx, bool auto_add = false); octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx) + const std::list<octave_value_list>& idx) { octave_value_list tmp = subsref (type, idx, 1); return tmp.length () > 0 ? tmp(0) : octave_value (); } octave_value_list subsref (const std::string&, - const std::list<octave_value_list>&, int); + const std::list<octave_value_list>&, int); octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx, + const std::list<octave_value_list>& idx, bool auto_add); static octave_value numeric_conv (const octave_value& val, - const std::string& type); + const std::string& type); octave_value subsasgn (const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); octave_value squeeze (void) const { return map.squeeze (); } @@ -92,7 +92,7 @@ { return map.permute (vec, inv); } octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false); + bool resize_ok = false); dim_vector dims (void) const { return map.dims (); } @@ -139,7 +139,7 @@ bool save_binary (std::ostream& os, bool& save_as_floats); bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt); + oct_mach_info::float_format fmt); #if defined (HAVE_HDF5) bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
--- a/src/ov-type-conv.h +++ b/src/ov-type-conv.h @@ -104,6 +104,6 @@ #define OCTAVE_TYPE_CONV_BODY(NAME) \ OCTAVE_TYPE_CONV_BODY3 (NAME, octave_ ## NAME ## _matrix, \ - octave_ ## NAME ## _scalar) + octave_ ## NAME ## _scalar) #endif
--- a/src/ov-typeinfo.h +++ b/src/ov-typeinfo.h @@ -64,35 +64,35 @@ static bool instance_ok (void); static int register_type (const std::string&, const std::string&, - const octave_value&); + const octave_value&); static bool register_unary_class_op (octave_value::unary_op, - unary_class_op_fcn); + unary_class_op_fcn); static bool register_unary_op (octave_value::unary_op, int, unary_op_fcn); static bool register_non_const_unary_op (octave_value::unary_op, int, - non_const_unary_op_fcn); + non_const_unary_op_fcn); static bool register_binary_class_op (octave_value::binary_op, - binary_class_op_fcn); + binary_class_op_fcn); static bool register_binary_op (octave_value::binary_op, int, int, - binary_op_fcn); + binary_op_fcn); static bool register_binary_class_op (octave_value::compound_binary_op, - binary_class_op_fcn); + binary_class_op_fcn); static bool register_binary_op (octave_value::compound_binary_op, int, int, - binary_op_fcn); + binary_op_fcn); static bool register_cat_op (int, int, cat_op_fcn); static bool register_assign_op (octave_value::assign_op, int, int, - assign_op_fcn); + assign_op_fcn); static bool register_assignany_op (octave_value::assign_op, int, - assignany_op_fcn); + assignany_op_fcn); static bool register_pref_assign_conv (int, int, int); @@ -247,34 +247,34 @@ Array2<void *> widening_ops; int do_register_type (const std::string&, const std::string&, - const octave_value&); + const octave_value&); bool do_register_unary_class_op (octave_value::unary_op, unary_class_op_fcn); bool do_register_unary_op (octave_value::unary_op, int, unary_op_fcn); bool do_register_non_const_unary_op (octave_value::unary_op, int, - non_const_unary_op_fcn); + non_const_unary_op_fcn); bool do_register_binary_class_op (octave_value::binary_op, - binary_class_op_fcn); + binary_class_op_fcn); bool do_register_binary_op (octave_value::binary_op, int, int, - binary_op_fcn); + binary_op_fcn); bool do_register_binary_class_op (octave_value::compound_binary_op, - binary_class_op_fcn); + binary_class_op_fcn); bool do_register_binary_op (octave_value::compound_binary_op, int, int, - binary_op_fcn); + binary_op_fcn); bool do_register_cat_op (int, int, cat_op_fcn); bool do_register_assign_op (octave_value::assign_op, int, int, - assign_op_fcn); + assign_op_fcn); bool do_register_assignany_op (octave_value::assign_op, int, - assignany_op_fcn); + assignany_op_fcn); bool do_register_pref_assign_conv (int, int, int);
--- a/src/ov-usr-fcn.h +++ b/src/ov-usr-fcn.h @@ -59,7 +59,7 @@ protected: octave_user_code (const std::string& nm, - const std::string& ds = std::string ()) + const std::string& ds = std::string ()) : octave_function (nm, ds) { } private: @@ -81,11 +81,11 @@ octave_user_script (void); octave_user_script (const std::string& fnm, const std::string& nm, - tree_statement_list *cmds, - const std::string& ds = std::string ()); + tree_statement_list *cmds, + const std::string& ds = std::string ()); octave_user_script (const std::string& fnm, const std::string& nm, - const std::string& ds = std::string ()); + const std::string& ds = std::string ()); ~octave_user_script (void); @@ -117,15 +117,15 @@ octave_time time_checked (void) const { return t_checked; } octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx) + const std::list<octave_value_list>& idx) { octave_value_list tmp = subsref (type, idx, 1); return tmp.length () > 0 ? tmp(0) : octave_value (); } octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, - int nargout); + const std::list<octave_value_list>& idx, + int nargout); octave_value_list do_multi_index_op (int nargout, const octave_value_list& args); @@ -171,9 +171,9 @@ public: octave_user_function (symbol_table::scope_id sid = -1, - tree_parameter_list *pl = 0, - tree_parameter_list *rl = 0, - tree_statement_list *cl = 0); + tree_parameter_list *pl = 0, + tree_parameter_list *rl = 0, + tree_statement_list *cl = 0); ~octave_user_function (void); @@ -257,15 +257,15 @@ bool is_class_method (void) const { return class_method; } octave_value subsref (const std::string& type, - const std::list<octave_value_list>& idx) + const std::list<octave_value_list>& idx) { octave_value_list tmp = subsref (type, idx, 1); return tmp.length () > 0 ? tmp(0) : octave_value (); } octave_value_list subsref (const std::string& type, - const std::list<octave_value_list>& idx, - int nargout); + const std::list<octave_value_list>& idx, + int nargout); octave_value_list do_multi_index_op (int nargout, const octave_value_list& args); @@ -366,7 +366,7 @@ void print_code_function_trailer (void); void bind_automatic_vars (const string_vector& arg_names, int nargin, - int nargout, const octave_value_list& va_args); + int nargout, const octave_value_list& va_args); // No copying!
--- a/src/ov.h +++ b/src/ov.h @@ -156,7 +156,7 @@ static std::string assign_op_as_string (assign_op); static octave_value empty_conv (const std::string& type, - const octave_value& rhs = octave_value ()); + const octave_value& rhs = octave_value ()); enum magic_colon { magic_colon_t }; @@ -227,22 +227,22 @@ octave_value (const char *s, char type = '\''); octave_value (const std::string& s, char type = '\''); octave_value (const string_vector& s, char type = '\''); - octave_value (const charMatrix& chm, char type = '\''); + octave_value (const charMatrix& chm, char type = '\''); octave_value (const charNDArray& chnda, char type = '\''); octave_value (const Array<char>& chnda, char type = '\''); octave_value (const charMatrix& chm, bool is_string, - char type = '\'') GCC_ATTR_DEPRECATED; + char type = '\'') GCC_ATTR_DEPRECATED; octave_value (const charNDArray& chnda, bool is_string, - char type = '\'') GCC_ATTR_DEPRECATED; + char type = '\'') GCC_ATTR_DEPRECATED; octave_value (const Array<char>& chnda, bool is_string, - char type = '\'') GCC_ATTR_DEPRECATED; + char type = '\'') GCC_ATTR_DEPRECATED; octave_value (const SparseMatrix& m, const MatrixType& t = MatrixType ()); octave_value (const Sparse<double>& m, const MatrixType& t = MatrixType ()); octave_value (const SparseComplexMatrix& m, - const MatrixType& t = MatrixType ()); + const MatrixType& t = MatrixType ()); octave_value (const Sparse<Complex>& m, const MatrixType& t = MatrixType ()); octave_value (const SparseBoolMatrix& bm, - const MatrixType& t = MatrixType ()); + const MatrixType& t = MatrixType ()); octave_value (const Sparse<bool>& m, const MatrixType& t = MatrixType ()); octave_value (const octave_int8& i); octave_value (const octave_int16& i); @@ -309,10 +309,10 @@ void make_unique (void) { if (rep->count > 1) - { - --rep->count; - rep = rep->unique_clone (); - } + { + --rep->count; + rep = rep->unique_clone (); + } } // This uniquifies the value if it is referenced by more than a certain @@ -321,10 +321,10 @@ void make_unique (int obsolete_copies) { if (rep->count > obsolete_copies + 1) - { - --rep->count; - rep = rep->unique_clone (); - } + { + --rep->count; + rep = rep->unique_clone (); + } } // Simple assignment. @@ -332,13 +332,13 @@ octave_value& operator = (const octave_value& a) { if (rep != a.rep) - { - if (--rep->count == 0) - delete rep; + { + if (--rep->count == 0) + delete rep; - rep = a.rep; - rep->count++; - } + rep = a.rep; + rep->count++; + } return *this; } @@ -371,7 +371,7 @@ { return rep->numel (idx); } octave_value single_subsref (const std::string& type, - const octave_value_list& idx); + const octave_value_list& idx); octave_value subsref (const std::string& type, const std::list<octave_value_list>& idx) @@ -387,32 +387,32 @@ int nargout); octave_value next_subsref (const std::string& type, const - std::list<octave_value_list>& idx, - size_t skip = 1); + std::list<octave_value_list>& idx, + size_t skip = 1); octave_value_list next_subsref (int nargout, - const std::string& type, const - std::list<octave_value_list>& idx, - size_t skip = 1); + const std::string& type, const + std::list<octave_value_list>& idx, + size_t skip = 1); octave_value next_subsref (bool auto_add, const std::string& type, const - std::list<octave_value_list>& idx, - size_t skip = 1); + std::list<octave_value_list>& idx, + size_t skip = 1); octave_value do_index_op (const octave_value_list& idx, - bool resize_ok = false) + bool resize_ok = false) { return rep->do_index_op (idx, resize_ok); } octave_value_list do_multi_index_op (int nargout, const octave_value_list& idx); octave_value subsasgn (const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); octave_value assign (assign_op op, const std::string& type, - const std::list<octave_value_list>& idx, - const octave_value& rhs); + const std::list<octave_value_list>& idx, + const octave_value& rhs); const octave_value& assign (assign_op, const octave_value& rhs); @@ -872,57 +872,57 @@ octave_value_list list_value (void) const; ColumnVector column_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; ComplexColumnVector complex_column_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; RowVector row_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; ComplexRowVector complex_row_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; FloatColumnVector float_column_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; FloatComplexColumnVector float_complex_column_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; FloatRowVector float_row_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; FloatComplexRowVector float_complex_row_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; Array<int> int_vector_value (bool req_int = false, - bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_str_conv = false, + bool frc_vec_conv = false) const; Array<octave_idx_type> octave_idx_type_vector_value (bool req_int = false, - bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_str_conv = false, + bool frc_vec_conv = false) const; Array<double> vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; Array<Complex> complex_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; Array<float> float_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; Array<FloatComplex> float_complex_vector_value (bool frc_str_conv = false, - bool frc_vec_conv = false) const; + bool frc_vec_conv = false) const; // Possibly economize a lazy-indexed value. @@ -945,7 +945,7 @@ // it, and we should convert it if possible. octave_value convert_to_str (bool pad = false, bool force = false, - char type = '\'') const + char type = '\'') const { return rep->convert_to_str (pad, force, type); } octave_value @@ -962,14 +962,14 @@ { rep->print (os, pr_as_read_syntax); } void print_raw (std::ostream& os, - bool pr_as_read_syntax = false) const + bool pr_as_read_syntax = false) const { rep->print_raw (os, pr_as_read_syntax); } bool print_name_tag (std::ostream& os, const std::string& name) const { return rep->print_name_tag (os, name); } void print_with_name (std::ostream& os, const std::string& name, - bool print_padding = true) const + bool print_padding = true) const { rep->print_with_name (os, name, print_padding); } int type_id (void) const { return rep->type_id (); } @@ -981,33 +981,33 @@ // Unary and binary operations. friend OCTINTERP_API octave_value do_unary_op (unary_op op, - const octave_value& a); + const octave_value& a); const octave_value& do_non_const_unary_op (unary_op op); void do_non_const_unary_op (unary_op op, const octave_value_list& idx); octave_value do_non_const_unary_op (unary_op op, const std::string& type, - const std::list<octave_value_list>& idx); + const std::list<octave_value_list>& idx); friend OCTINTERP_API octave_value do_binary_op (binary_op op, - const octave_value& a, - const octave_value& b); + const octave_value& a, + const octave_value& b); friend OCTINTERP_API octave_value do_binary_op (compound_binary_op op, const octave_value& a, const octave_value& b); friend OCTINTERP_API octave_value do_cat_op (const octave_value& a, - const octave_value& b, - const Array<octave_idx_type>& ra_idx); + const octave_value& b, + const Array<octave_idx_type>& ra_idx); const octave_base_value& get_rep (void) const { return *rep; } bool is_copy_of (const octave_value &val) const { return rep == val.rep; } void print_info (std::ostream& os, - const std::string& prefix = std::string ()) const; + const std::string& prefix = std::string ()) const; bool save_ascii (std::ostream& os) { return rep->save_ascii (os); } @@ -1017,7 +1017,7 @@ { return rep->save_binary (os, save_as_floats); } bool load_binary (std::istream& is, bool swap, - oct_mach_info::float_format fmt) + oct_mach_info::float_format fmt) { return rep->load_binary (is, swap, fmt); } #if defined (HAVE_HDF5) @@ -1029,8 +1029,8 @@ #endif int write (octave_stream& os, int block_size, - oct_data_conv::data_type output_type, int skip, - oct_mach_info::float_format flt_fmt) const; + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const; octave_base_value *internal_rep (void) const { return rep; } @@ -1050,7 +1050,7 @@ octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const { return rep->sort (dim, mode); } octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const + sortmode mode = ASCENDING) const { return rep->sort (sidx, dim, mode); } sortmode is_sorted (sortmode mode = UNSORTED) const @@ -1163,7 +1163,7 @@ extern OCTINTERP_API octave_value do_binary_op (octave_value::binary_op op, - const octave_value& a, const octave_value& b); + const octave_value& a, const octave_value& b); extern OCTINTERP_API octave_value do_binary_op (octave_value::compound_binary_op op,
--- a/src/parse.h +++ b/src/parse.h @@ -71,7 +71,7 @@ extern OCTINTERP_API std::string get_help_from_file (const std::string& nm, bool& symbol_found, - std::string& file); + std::string& file); extern OCTINTERP_API std::string get_help_from_file (const std::string& nm, bool& symbol_found); @@ -84,16 +84,16 @@ extern OCTINTERP_API octave_function * load_fcn_from_file (const std::string& file_name, - const std::string& dir_name = std::string (), - const std::string& dispatch_type = std::string (), - const std::string& fcn_name = std::string (), - bool autoload = false); + const std::string& dir_name = std::string (), + const std::string& dispatch_type = std::string (), + const std::string& fcn_name = std::string (), + bool autoload = false); extern OCTINTERP_API void source_file (const std::string& file_name, - const std::string& context = std::string (), - bool verbose = false, bool require_file = true, - const std::string& warn_for = std::string ()); + const std::string& context = std::string (), + bool verbose = false, bool require_file = true, + const std::string& warn_for = std::string ()); extern OCTINTERP_API octave_value_list feval (const std::string& name,
--- a/src/pr-output.h +++ b/src/pr-output.h @@ -55,203 +55,203 @@ extern OCTINTERP_API void octave_print_internal (std::ostream& os, bool d, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, double d, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, float d, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const Matrix& m, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const DiagMatrix& m, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const FloatMatrix& m, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const FloatDiagMatrix& m, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const NDArray& nda, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const FloatNDArray& nda, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const Complex& c, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const FloatComplex& c, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const ComplexMatrix& cm, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const ComplexDiagMatrix& cm, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const FloatComplexMatrix& cm, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const FloatComplexDiagMatrix& cm, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const ComplexNDArray& nda, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const FloatComplexNDArray& nda, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const PermMatrix& m, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const Range& r, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const boolMatrix& m, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const boolNDArray& m, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const charMatrix& chm, - bool pr_as_read_syntax = false, - int extra_indent = 0, - bool pr_as_string = false); + bool pr_as_read_syntax = false, + int extra_indent = 0, + bool pr_as_string = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const charNDArray& nda, - bool pr_as_read_syntax = false, - int extra_indent = 0, - bool pr_as_string = false); + bool pr_as_read_syntax = false, + int extra_indent = 0, + bool pr_as_string = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const std::string& s, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const Array<std::string>& sa, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const intNDArray<octave_int8>& sa, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const intNDArray<octave_uint8>& sa, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const intNDArray<octave_int16>& sa, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const intNDArray<octave_uint16>& sa, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const intNDArray<octave_int32>& sa, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const intNDArray<octave_uint32>& sa, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const intNDArray<octave_int64>& sa, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const intNDArray<octave_uint64>& sa, - bool pr_as_read_syntax = false, - int extra_indent = 0); + bool pr_as_read_syntax = false, + int extra_indent = 0); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const octave_int<int8_t>& sa, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const octave_int<uint8_t>& sa, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const octave_int<int16_t>& sa, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const octave_int<uint16_t>& sa, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const octave_int<int32_t>& sa, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const octave_int<uint32_t>& sa, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const octave_int<int64_t>& sa, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const octave_int<uint64_t>& sa, - bool pr_as_read_syntax = false); + bool pr_as_read_syntax = false); extern OCTINTERP_API void octave_print_internal (std::ostream& os, const Cell& cell, - bool pr_as_read_syntax = false, - int extra_indent = 0, - bool pr_as_string = false); + bool pr_as_read_syntax = false, + int extra_indent = 0, + bool pr_as_string = false); // TRUE means that the dimensions of empty objects should be printed // like this: x = [](2x0).
--- a/src/pt-arg-list.h +++ b/src/pt-arg-list.h @@ -84,7 +84,7 @@ string_vector get_arg_names (void) const; tree_argument_list *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-assign.h +++ b/src/pt-assign.h @@ -46,13 +46,13 @@ public: tree_simple_assignment (bool plhs = false, int l = -1, int c = -1, - octave_value::assign_op t = octave_value::op_asn_eq) + octave_value::assign_op t = octave_value::op_asn_eq) : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs), etype (t), first_execution (true) { } tree_simple_assignment (tree_expression *le, tree_expression *re, - bool plhs = false, int l = -1, int c = -1, - octave_value::assign_op t = octave_value::op_asn_eq); + bool plhs = false, int l = -1, int c = -1, + octave_value::assign_op t = octave_value::op_asn_eq); ~tree_simple_assignment (void); @@ -73,7 +73,7 @@ tree_expression *right_hand_side (void) { return rhs; } tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -82,7 +82,7 @@ private: void do_assign (octave_lvalue& ult, const octave_value_list& args, - const octave_value& rhs_val); + const octave_value& rhs_val); void do_assign (octave_lvalue& ult, const octave_value& rhs_val); @@ -123,7 +123,7 @@ first_execution (true) { } tree_multi_assignment (tree_argument_list *lst, tree_expression *r, - bool plhs = false, int l = -1, int c = -1); + bool plhs = false, int l = -1, int c = -1); ~tree_multi_assignment (void); @@ -144,7 +144,7 @@ tree_expression *right_hand_side (void) { return rhs; } tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-binop.h +++ b/src/pt-binop.h @@ -44,14 +44,14 @@ public: tree_binary_expression (int l = -1, int c = -1, - octave_value::binary_op t - = octave_value::unknown_binary_op) + octave_value::binary_op t + = octave_value::unknown_binary_op) : tree_expression (l, c), op_lhs (0), op_rhs (0), etype (t) { } tree_binary_expression (tree_expression *a, tree_expression *b, - int l = -1, int c = -1, - octave_value::binary_op t - = octave_value::unknown_binary_op) + int l = -1, int c = -1, + octave_value::binary_op t + = octave_value::unknown_binary_op) : tree_expression (l, c), op_lhs (a), op_rhs (b), etype (t) { } ~tree_binary_expression (void) @@ -63,7 +63,7 @@ bool has_magic_end (void) const { return ((op_lhs && op_lhs->has_magic_end ()) - || (op_rhs && op_rhs->has_magic_end ())); + || (op_rhs && op_rhs->has_magic_end ())); } bool is_binary_expression (void) const { return true; } @@ -82,7 +82,7 @@ tree_expression *rhs (void) { return op_rhs; } tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -122,7 +122,7 @@ : tree_binary_expression (l, c), etype (t) { } tree_boolean_expression (tree_expression *a, tree_expression *b, - int l = -1, int c = -1, type t = unknown) + int l = -1, int c = -1, type t = unknown) : tree_binary_expression (a, b, l, c), etype (t) { } ~tree_boolean_expression (void) { } @@ -140,7 +140,7 @@ type op_type (void) const { return etype; } tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; private:
--- a/src/pt-cell.h +++ b/src/pt-cell.h @@ -54,7 +54,7 @@ octave_value_list rvalue (int); tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-cmd.h +++ b/src/pt-cmd.h @@ -46,7 +46,7 @@ virtual ~tree_command (void) { } virtual tree_command *dup (symbol_table::scope_id, - symbol_table::context_id context) const = 0; + symbol_table::context_id context) const = 0; private: @@ -71,7 +71,7 @@ ~tree_no_op_command (void) { } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -105,7 +105,7 @@ ~tree_function_def (void) { } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-colon.h +++ b/src/pt-colon.h @@ -51,14 +51,14 @@ op_increment (0), save_base (false) { } tree_colon_expression (tree_expression *bas, tree_expression *lim, - tree_expression *inc, int l = -1, int c = -1) + tree_expression *inc, int l = -1, int c = -1) : tree_expression (l, c), op_base (bas), op_limit (lim), op_increment (inc), save_base (false) { } ~tree_colon_expression (void) { if (! save_base) - delete op_base; + delete op_base; delete op_limit; delete op_increment; @@ -67,8 +67,8 @@ bool has_magic_end (void) const { return ((op_base && op_base->has_magic_end ()) - || (op_limit && op_limit->has_magic_end ()) - || (op_increment && op_increment->has_magic_end ())); + || (op_limit && op_limit->has_magic_end ()) + || (op_increment && op_increment->has_magic_end ())); } void preserve_base (void) { save_base = true; } @@ -93,7 +93,7 @@ int column (void) const; tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -108,12 +108,12 @@ octave_value make_range (const Matrix& m_base, const Matrix& m_limit, - const Matrix& m_increment, bool result_is_str, - bool dq_str) const; + const Matrix& m_increment, bool result_is_str, + bool dq_str) const; octave_value make_range (const octave_value& ov_base, const octave_value& ov_limit, - const octave_value& ov_increment) const; + const octave_value& ov_increment) const; // No copying!
--- a/src/pt-const.h +++ b/src/pt-const.h @@ -49,7 +49,7 @@ : tree_expression (l, c), val (v), orig_text () { } tree_constant (const octave_value& v, const std::string& ot, - int l = -1, int c = -1) + int l = -1, int c = -1) : tree_expression (l, c), val (v), orig_text (ot) { } ~tree_constant (void) { } @@ -67,10 +67,10 @@ void maybe_mutate (void) { val.maybe_mutate (); } void print (std::ostream& os, bool pr_as_read_syntax = false, - bool pr_orig_txt = true); + bool pr_orig_txt = true); void print_raw (std::ostream& os, bool pr_as_read_syntax = false, - bool pr_orig_txt = true); + bool pr_orig_txt = true); bool rvalue_ok (void) const { return true; } @@ -79,7 +79,7 @@ octave_value_list rvalue (int nargout); tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-decl.h +++ b/src/pt-decl.h @@ -88,7 +88,7 @@ tree_expression *expression (void) { return expr; } tree_decl_elt *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -119,15 +119,15 @@ ~tree_decl_init_list (void) { while (! empty ()) - { - iterator p = begin (); - delete *p; - erase (p); - } + { + iterator p = begin (); + delete *p; + erase (p); + } } tree_decl_init_list *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -151,7 +151,7 @@ : tree_command (l, c), cmd_name (n), init_list (0) { } tree_decl_command (const std::string& n, tree_decl_init_list *t, - int l = -1, int c = -1) + int l = -1, int c = -1) : tree_command (l, c), cmd_name (n), init_list (t) { } ~tree_decl_command (void); @@ -193,7 +193,7 @@ ~tree_global_command (void) { } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -224,7 +224,7 @@ ~tree_static_command (void) { } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-eval.h +++ b/src/pt-eval.h @@ -156,12 +156,12 @@ private: void do_decl_init_list (decl_elt_init_fcn fcn, - tree_decl_init_list *init_list); + tree_decl_init_list *init_list); void do_breakpoint (tree_statement& stmt) const; void do_breakpoint (bool is_breakpoint, - bool is_end_of_fcn_or_script = false) const; + bool is_end_of_fcn_or_script = false) const; virtual octave_value do_keyboard (const octave_value_list& args = octave_value_list ()) const;
--- a/src/pt-except.h +++ b/src/pt-except.h @@ -44,10 +44,10 @@ mid_comm (0), trail_comm (0) { } tree_try_catch_command (tree_statement_list *tc, tree_statement_list *cc, - octave_comment_list *cl = 0, - octave_comment_list *cm = 0, - octave_comment_list *ct = 0, - int l = -1, int c = -1) + octave_comment_list *cl = 0, + octave_comment_list *cm = 0, + octave_comment_list *ct = 0, + int l = -1, int c = -1) : tree_command (l, c), try_code (tc), catch_code (cc), lead_comm (cl), mid_comm (cm), trail_comm (ct) { } @@ -64,7 +64,7 @@ octave_comment_list *trailing_comment (void) { return trail_comm; } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -104,11 +104,11 @@ lead_comm (0), mid_comm (0), trail_comm (0) { } tree_unwind_protect_command (tree_statement_list *tc, - tree_statement_list *cc, - octave_comment_list *cl = 0, - octave_comment_list *cm = 0, - octave_comment_list *ct = 0, - int l = -1, int c = -1) + tree_statement_list *cc, + octave_comment_list *cl = 0, + octave_comment_list *cm = 0, + octave_comment_list *ct = 0, + int l = -1, int c = -1) : tree_command (l, c), unwind_protect_code (tc), cleanup_code (cc), lead_comm (cl), mid_comm (cm), trail_comm (ct) { } @@ -125,7 +125,7 @@ octave_comment_list *trailing_comment (void) { return trail_comm; } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-exp.h +++ b/src/pt-exp.h @@ -48,7 +48,7 @@ virtual bool has_magic_end (void) const = 0; virtual tree_expression *dup (symbol_table::scope_id, - symbol_table::context_id context) const = 0; + symbol_table::context_id context) const = 0; virtual bool is_constant (void) const { return false; }
--- a/src/pt-fcn-handle.h +++ b/src/pt-fcn-handle.h @@ -56,10 +56,10 @@ bool has_magic_end (void) const { return false; } void print (std::ostream& os, bool pr_as_read_syntax = false, - bool pr_orig_txt = true); + bool pr_orig_txt = true); void print_raw (std::ostream& os, bool pr_as_read_syntax = false, - bool pr_orig_txt = true); + bool pr_orig_txt = true); std::string name (void) const { return nm; } @@ -70,7 +70,7 @@ octave_value_list rvalue (int nargout); tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -95,8 +95,8 @@ : tree_expression (l, c), fcn (0) { } tree_anon_fcn_handle (tree_parameter_list *pl, tree_parameter_list *rl, - tree_statement_list *cl, symbol_table::scope_id sid, - int l = -1, int c = -1) + tree_statement_list *cl, symbol_table::scope_id sid, + int l = -1, int c = -1) : tree_expression (l, c), fcn (new octave_user_function (sid, pl, rl, cl)) { } @@ -131,7 +131,7 @@ } tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-id.h +++ b/src/pt-id.h @@ -50,8 +50,8 @@ : tree_expression (l, c), sym (), scope (-1) { } tree_identifier (const symbol_table::symbol_record& s, - int l = -1, int c = -1, - symbol_table::scope_id sc = symbol_table::current_scope ()) + int l = -1, int c = -1, + symbol_table::scope_id sc = symbol_table::current_scope ()) : tree_expression (l, c), sym (s), scope (sc) { } ~tree_identifier (void) { } @@ -111,7 +111,7 @@ void eval_undefined_error (void); tree_identifier *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -131,8 +131,8 @@ if (scope != curr_scope) { - scope = curr_scope; - sym = symbol_table::insert (sym.name ()); + scope = curr_scope; + sym = symbol_table::insert (sym.name ()); } return sym;
--- a/src/pt-idx.h +++ b/src/pt-idx.h @@ -48,13 +48,13 @@ public: tree_index_expression (tree_expression *e = 0, tree_argument_list *lst = 0, - int l = -1, int c = -1, char t = '('); + int l = -1, int c = -1, char t = '('); tree_index_expression (tree_expression *e, const std::string& n, - int l = -1, int c = -1); + int l = -1, int c = -1); tree_index_expression (tree_expression *e, tree_expression* df, - int l = -1, int c = -1); + int l = -1, int c = -1); ~tree_index_expression (void); @@ -89,7 +89,7 @@ octave_lvalue lvalue (void); tree_index_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-jump.h +++ b/src/pt-jump.h @@ -42,7 +42,7 @@ ~tree_break_command (void) { } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -70,7 +70,7 @@ ~tree_continue_command (void) { } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -98,7 +98,7 @@ ~tree_return_command (void) { } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-loop.h +++ b/src/pt-loop.h @@ -49,16 +49,16 @@ trail_comm (0) { } tree_while_command (tree_expression *e, - octave_comment_list *lc = 0, - octave_comment_list *tc = 0, - int l = -1, int c = -1) + octave_comment_list *lc = 0, + octave_comment_list *tc = 0, + int l = -1, int c = -1) : tree_command (l, c), expr (e), list (0), lead_comm (lc), trail_comm (tc) { } tree_while_command (tree_expression *e, tree_statement_list *lst, - octave_comment_list *lc = 0, - octave_comment_list *tc = 0, - int l = -1, int c = -1) + octave_comment_list *lc = 0, + octave_comment_list *tc = 0, + int l = -1, int c = -1) : tree_command (l, c), expr (e), list (lst), lead_comm (lc), trail_comm (tc) { } @@ -73,7 +73,7 @@ octave_comment_list *trailing_comment (void) { return trail_comm; } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -111,21 +111,21 @@ : tree_while_command (l, c) { } tree_do_until_command (tree_expression *e, - octave_comment_list *lc = 0, - octave_comment_list *tc = 0, - int l = -1, int c = -1) + octave_comment_list *lc = 0, + octave_comment_list *tc = 0, + int l = -1, int c = -1) : tree_while_command (e, lc, tc, l, c) { } tree_do_until_command (tree_expression *e, tree_statement_list *lst, - octave_comment_list *lc = 0, - octave_comment_list *tc = 0, - int l = -1, int c = -1) + octave_comment_list *lc = 0, + octave_comment_list *tc = 0, + int l = -1, int c = -1) : tree_while_command (e, lst, lc, tc, l, c) { } ~tree_do_until_command (void) { } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -150,10 +150,10 @@ trail_comm (0) { } tree_simple_for_command (tree_expression *le, tree_expression *re, - tree_statement_list *lst, - octave_comment_list *lc = 0, - octave_comment_list *tc = 0, - int l = -1, int c = -1) + tree_statement_list *lst, + octave_comment_list *lc = 0, + octave_comment_list *tc = 0, + int l = -1, int c = -1) : tree_command (l, c), lhs (le), expr (re), list (lst), lead_comm (lc), trail_comm (tc) { } @@ -170,7 +170,7 @@ octave_comment_list *trailing_comment (void) { return trail_comm; } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -208,10 +208,10 @@ trail_comm (0) { } tree_complex_for_command (tree_argument_list *le, tree_expression *re, - tree_statement_list *lst, - octave_comment_list *lc = 0, - octave_comment_list *tc = 0, - int l = -1, int c = -1) + tree_statement_list *lst, + octave_comment_list *lc = 0, + octave_comment_list *tc = 0, + int l = -1, int c = -1) : tree_command (l, c), lhs (le), expr (re), list (lst), lead_comm (lc), trail_comm (tc) { } @@ -228,7 +228,7 @@ octave_comment_list *trailing_comment (void) { return trail_comm; } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-mat.h +++ b/src/pt-mat.h @@ -41,7 +41,7 @@ class tree_matrix : public tree_expression, - public octave_base_list<tree_argument_list *> + public octave_base_list<tree_argument_list *> { public: @@ -65,7 +65,7 @@ octave_value_list rvalue (int nargout); tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-misc.h +++ b/src/pt-misc.h @@ -71,7 +71,7 @@ bool varargs_only (void) { return (marked_for_varargs < 0); } void initialize_undefined_elements (const std::string& warnfor, - int nargout, const octave_value& val); + int nargout, const octave_value& val); void define_from_arg_vector (const octave_value_list& args); @@ -82,7 +82,7 @@ octave_value_list convert_to_const_vector (int nargout, const Cell& varargout); tree_parameter_list *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -116,7 +116,7 @@ ~tree_return_list (void); tree_return_list *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-pr-code.h +++ b/src/pt-pr-code.h @@ -41,8 +41,8 @@ public: tree_print_code (std::ostream& os_arg, - const std::string& pfx = std::string (), - bool pr_orig_txt = true) + const std::string& pfx = std::string (), + bool pr_orig_txt = true) : os (os_arg), prefix (pfx), nesting (), print_original_text (pr_orig_txt), curr_print_indent_level (0), beginning_of_line (true),
--- a/src/pt-select.h +++ b/src/pt-select.h @@ -45,12 +45,12 @@ : tree (l, c), expr (0), list (0), lead_comm (0) { } tree_if_clause (tree_statement_list *sl, octave_comment_list *lc = 0, - int l = -1, int c = -1) + int l = -1, int c = -1) : tree (l, c), expr (0), list (sl), lead_comm (lc) { } tree_if_clause (tree_expression *e, tree_statement_list *sl, - octave_comment_list *lc = 0, - int l = -1, int c = -1) + octave_comment_list *lc = 0, + int l = -1, int c = -1) : tree (l, c), expr (e), list (sl), lead_comm (lc) { } ~tree_if_clause (void); @@ -64,7 +64,7 @@ octave_comment_list *leading_comment (void) { return lead_comm; } tree_if_clause *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -98,15 +98,15 @@ ~tree_if_command_list (void) { while (! empty ()) - { - iterator p = begin (); - delete *p; - erase (p); - } + { + iterator p = begin (); + delete *p; + erase (p); + } } tree_if_command_list *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -128,7 +128,7 @@ : tree_command (l, c), list (0), lead_comm (0), trail_comm (0) { } tree_if_command (tree_if_command_list *lst, octave_comment_list *lc, - octave_comment_list *tc, int l = -1, int c = -1) + octave_comment_list *tc, int l = -1, int c = -1) : tree_command (l, c), list (lst), lead_comm (lc), trail_comm (tc) { } ~tree_if_command (void); @@ -144,7 +144,7 @@ octave_comment_list *trailing_comment (void) { return trail_comm; } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -177,12 +177,12 @@ : tree (l, c), label (0), list (0), lead_comm (0) { } tree_switch_case (tree_statement_list *sl, octave_comment_list *lc = 0, - int l = -1, int c = -1) + int l = -1, int c = -1) : tree (l, c), label (0), list (sl), lead_comm (lc) { } tree_switch_case (tree_expression *e, tree_statement_list *sl, - octave_comment_list *lc = 0, - int l = -1, int c = -1) + octave_comment_list *lc = 0, + int l = -1, int c = -1) : tree (l, c), label (e), list (sl), lead_comm (lc) { } ~tree_switch_case (void); @@ -198,7 +198,7 @@ octave_comment_list *leading_comment (void) { return lead_comm; } tree_switch_case *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -232,15 +232,15 @@ ~tree_switch_case_list (void) { while (! empty ()) - { - iterator p = begin (); - delete *p; - erase (p); - } + { + iterator p = begin (); + delete *p; + erase (p); + } } tree_switch_case_list *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -263,8 +263,8 @@ trail_comm (0) { } tree_switch_command (tree_expression *e, tree_switch_case_list *lst, - octave_comment_list *lc, octave_comment_list *tc, - int l = -1, int c = -1) + octave_comment_list *lc, octave_comment_list *tc, + int l = -1, int c = -1) : tree_command (l, c), expr (e), list (lst), lead_comm (lc), trail_comm (tc) { } @@ -283,7 +283,7 @@ octave_comment_list *trailing_comment (void) { return trail_comm; } tree_command *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-stmt.h +++ b/src/pt-stmt.h @@ -94,7 +94,7 @@ void set_expression (tree_expression *e) { expr = e; } tree_statement *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -135,11 +135,11 @@ ~tree_statement_list (void) { while (! empty ()) - { - iterator p = begin (); - delete *p; - erase (p); - } + { + iterator p = begin (); + delete *p; + erase (p); + } } void mark_as_function_body (void) { function_body = true; } @@ -161,7 +161,7 @@ octave_value_list list_breakpoints (void); tree_statement_list *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/pt-unop.h +++ b/src/pt-unop.h @@ -43,13 +43,13 @@ public: tree_unary_expression (int l = -1, int c = -1, - octave_value::unary_op t - = octave_value::unknown_unary_op) + octave_value::unary_op t + = octave_value::unknown_unary_op) : tree_expression (l, c), op (0), etype (t) { } tree_unary_expression (tree_expression *e, int l = -1, int c = -1, - octave_value::unary_op t - = octave_value::unknown_unary_op) + octave_value::unary_op t + = octave_value::unknown_unary_op) : tree_expression (l, c), op (e), etype (t) { } ~tree_unary_expression (void) { delete op; } @@ -92,8 +92,8 @@ : tree_unary_expression (l, c, octave_value::unknown_unary_op) { } tree_prefix_expression (tree_expression *e, int l = -1, int c = -1, - octave_value::unary_op t - = octave_value::unknown_unary_op) + octave_value::unary_op t + = octave_value::unknown_unary_op) : tree_unary_expression (e, l, c, t) { } ~tree_prefix_expression (void) { } @@ -105,7 +105,7 @@ octave_value_list rvalue (int nargout); tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw); @@ -129,8 +129,8 @@ : tree_unary_expression (l, c, octave_value::unknown_unary_op) { } tree_postfix_expression (tree_expression *e, int l = -1, int c = -1, - octave_value::unary_op t - = octave_value::unknown_unary_op) + octave_value::unary_op t + = octave_value::unknown_unary_op) : tree_unary_expression (e, l, c, t) { } ~tree_postfix_expression (void) { } @@ -142,7 +142,7 @@ octave_value_list rvalue (int nargout); tree_expression *dup (symbol_table::scope_id scope, - symbol_table::context_id context) const; + symbol_table::context_id context) const; void accept (tree_walker& tw);
--- a/src/sighandlers.h +++ b/src/sighandlers.h @@ -90,7 +90,7 @@ extern OCTINTERP_API bool can_interrupt; extern OCTINTERP_API sig_handler *octave_set_signal_handler (int, sig_handler *, - bool restart_syscalls = true); + bool restart_syscalls = true); extern OCTINTERP_API void install_signal_handlers (void); @@ -102,7 +102,7 @@ extern OCTINTERP_API octave_interrupt_handler octave_set_interrupt_handler (const volatile octave_interrupt_handler&, - bool restart_syscalls = true); + bool restart_syscalls = true); // extern void ignore_sigchld (void); @@ -132,12 +132,12 @@ octave_child& operator = (const octave_child& oc) { if (&oc != this) - { - pid = oc.pid; - handler = oc.handler; - have_status = oc.have_status; - status = oc.status; - } + { + pid = oc.pid; + handler = oc.handler; + have_status = oc.have_status; + status = oc.status; + } return *this; }
--- a/src/sparse-xdiv.h +++ b/src/sparse-xdiv.h @@ -34,60 +34,60 @@ extern Matrix xdiv (const Matrix& a, const SparseMatrix& b, MatrixType &typ); extern ComplexMatrix xdiv (const Matrix& a, const SparseComplexMatrix& b, - MatrixType &typ); + MatrixType &typ); extern ComplexMatrix xdiv (const ComplexMatrix& a, const SparseMatrix& b, - MatrixType &typ); + MatrixType &typ); extern ComplexMatrix xdiv (const ComplexMatrix& a, - const SparseComplexMatrix& b, MatrixType &typ); + const SparseComplexMatrix& b, MatrixType &typ); extern SparseMatrix xdiv (const SparseMatrix& a, const SparseMatrix& b, - MatrixType &typ); + MatrixType &typ); extern SparseComplexMatrix xdiv (const SparseMatrix& a, - const SparseComplexMatrix& b, MatrixType &typ); + const SparseComplexMatrix& b, MatrixType &typ); extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, - const SparseMatrix& b, MatrixType &typ); + const SparseMatrix& b, MatrixType &typ); extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, - const SparseComplexMatrix& b, MatrixType &typ); + const SparseComplexMatrix& b, MatrixType &typ); extern SparseMatrix xdiv (const SparseMatrix& a, - const DiagMatrix& b, MatrixType &typ); + const DiagMatrix& b, MatrixType &typ); extern SparseComplexMatrix xdiv (const SparseMatrix& a, - const ComplexDiagMatrix& b, MatrixType &typ); + const ComplexDiagMatrix& b, MatrixType &typ); extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, - const DiagMatrix& b, MatrixType &typ); + const DiagMatrix& b, MatrixType &typ); extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, - const ComplexDiagMatrix& b, MatrixType &typ); + const ComplexDiagMatrix& b, MatrixType &typ); extern Matrix x_el_div (double a, const SparseMatrix& b); extern ComplexMatrix x_el_div (double a, const SparseComplexMatrix& b); extern ComplexMatrix x_el_div (const Complex a, const SparseMatrix& b); extern ComplexMatrix x_el_div (const Complex a, - const SparseComplexMatrix& b); + const SparseComplexMatrix& b); extern Matrix xleftdiv (const SparseMatrix& a, const Matrix& b, - MatrixType& typ); + MatrixType& typ); extern ComplexMatrix xleftdiv (const SparseMatrix& a, const ComplexMatrix& b, - MatrixType &typ); + MatrixType &typ); extern ComplexMatrix xleftdiv (const SparseComplexMatrix& a, const Matrix& b, - MatrixType &typ); + MatrixType &typ); extern ComplexMatrix xleftdiv (const SparseComplexMatrix& a, - const ComplexMatrix& b, MatrixType &typ); + const ComplexMatrix& b, MatrixType &typ); extern SparseMatrix xleftdiv (const SparseMatrix& a, const SparseMatrix& b, - MatrixType &typ); + MatrixType &typ); extern SparseComplexMatrix xleftdiv (const SparseMatrix& a, - const SparseComplexMatrix& b, MatrixType &typ); + const SparseComplexMatrix& b, MatrixType &typ); extern SparseComplexMatrix xleftdiv (const SparseComplexMatrix& a, - const SparseMatrix& b, MatrixType &typ); + const SparseMatrix& b, MatrixType &typ); extern SparseComplexMatrix xleftdiv (const SparseComplexMatrix& a, - const SparseComplexMatrix& b, MatrixType &typ); + const SparseComplexMatrix& b, MatrixType &typ); extern SparseMatrix xleftdiv (const DiagMatrix&, const SparseMatrix&, MatrixType&); extern SparseComplexMatrix xleftdiv (const ComplexDiagMatrix&, const SparseMatrix&, - MatrixType&); + MatrixType&); extern SparseComplexMatrix xleftdiv (const DiagMatrix&, const SparseComplexMatrix&, - MatrixType&); + MatrixType&); extern SparseComplexMatrix xleftdiv (const ComplexDiagMatrix&, const SparseComplexMatrix&, - MatrixType&); + MatrixType&); #endif
--- a/src/sparse-xpow.h +++ b/src/sparse-xpow.h @@ -40,18 +40,18 @@ extern octave_value elem_xpow (const SparseMatrix& a, const SparseMatrix& b); extern octave_value elem_xpow (const SparseMatrix& a, const Complex& b); extern octave_value elem_xpow (const SparseMatrix& a, - const SparseComplexMatrix& b); + const SparseComplexMatrix& b); extern octave_value elem_xpow (const Complex& a, const SparseMatrix& b); extern octave_value elem_xpow (const Complex& a, - const SparseComplexMatrix& b); + const SparseComplexMatrix& b); extern octave_value elem_xpow (const SparseComplexMatrix& a, double b); extern octave_value elem_xpow (const SparseComplexMatrix& a, - const SparseMatrix& b); + const SparseMatrix& b); extern octave_value elem_xpow (const SparseComplexMatrix& a, - const Complex& b); + const Complex& b); extern octave_value elem_xpow (const SparseComplexMatrix& a, - const SparseComplexMatrix& b); + const SparseComplexMatrix& b); #endif
--- a/src/symtab.h +++ b/src/symtab.h @@ -73,7 +73,7 @@ static void free (scope_id scope) { if (instance_ok ()) - return instance->do_free (scope); + return instance->do_free (scope); } static std::list<scope_id> scopes (void) @@ -86,14 +86,14 @@ bool retval = true; if (! instance) - instance = new scope_id_cache (); + instance = new scope_id_cache (); if (! instance) - { - ::error ("unable to create scope_id_cache object!"); - - retval = false; - } + { + ::error ("unable to create scope_id_cache object!"); + + retval = false; + } return retval; } @@ -118,12 +118,12 @@ set_iterator p = free_list.begin (); if (p != free_list.end ()) - { - retval = *p; - free_list.erase (p); - } + { + retval = *p; + free_list.erase (p); + } else - retval = next_available++; + retval = next_available++; in_use.insert (retval); @@ -135,12 +135,12 @@ set_iterator p = in_use.find (scope); if (p != in_use.end ()) - { - in_use.erase (p); - free_list.insert (scope); - } + { + in_use.erase (p); + free_list.insert (scope); + } else - error ("free_scope: scope %d not found!", scope); + error ("free_scope: scope %d not found!", scope); } std::list<scope_id> do_scopes (void) const @@ -148,7 +148,7 @@ std::list<scope_id> retval; for (set_const_iterator p = in_use.begin (); p != in_use.end (); p++) - retval.push_back (*p); + retval.push_back (*p); retval.sort (); @@ -196,55 +196,55 @@ public: symbol_record_rep (const std::string& nm, const octave_value& v, - unsigned int sc) - : name (nm), value_stack (), storage_class (sc), finfo (), count (1) + unsigned int sc) + : name (nm), value_stack (), storage_class (sc), finfo (), count (1) { - value_stack.push_back (v); + value_stack.push_back (v); } void force_variable (context_id context) { - octave_value& val = varref (context); - - if (! val.is_defined ()) - mark_forced (); + octave_value& val = varref (context); + + if (! val.is_defined ()) + mark_forced (); } octave_value& varref (context_id context) { - if (is_global ()) - return symbol_table::global_varref (name); - else if (is_persistent ()) - return symbol_table::persistent_varref (name); - else - { - context_id n = value_stack.size (); - while (n++ <= context) - value_stack.push_back (octave_value ()); - - return value_stack[context]; - } + if (is_global ()) + return symbol_table::global_varref (name); + else if (is_persistent ()) + return symbol_table::persistent_varref (name); + else + { + context_id n = value_stack.size (); + while (n++ <= context) + value_stack.push_back (octave_value ()); + + return value_stack[context]; + } } octave_value varval (context_id context) const { - if (is_global ()) - return symbol_table::global_varval (name); - else if (is_persistent ()) - return symbol_table::persistent_varval (name); - else - { - if (context < value_stack.size ()) - return value_stack[context]; - else - return octave_value (); - } + if (is_global ()) + return symbol_table::global_varval (name); + else if (is_persistent ()) + return symbol_table::persistent_varval (name); + else + { + if (context < value_stack.size ()) + return value_stack[context]; + else + return octave_value (); + } } void push_context (void) { - if (! (is_persistent () || is_global ())) - value_stack.push_back (octave_value ()); + if (! (is_persistent () || is_global ())) + value_stack.push_back (octave_value ()); } // If pop_context returns 0, we are out of values and this element @@ -263,44 +263,44 @@ size_t pop_context (void) { - size_t retval = 1; - - if (! (is_persistent () || is_global ())) - { - value_stack.pop_back (); - retval = value_stack.size (); - } - - return retval; + size_t retval = 1; + + if (! (is_persistent () || is_global ())) + { + value_stack.pop_back (); + retval = value_stack.size (); + } + + return retval; } void clear (void) { - if (! (is_hidden () || is_inherited ())) - { - if (is_global ()) - unmark_global (); - - if (is_persistent ()) - { - symbol_table::persistent_varref (name) - = varval (xcurrent_context); - - unmark_persistent (); - } - - varref (xcurrent_context) = octave_value (); - } + if (! (is_hidden () || is_inherited ())) + { + if (is_global ()) + unmark_global (); + + if (is_persistent ()) + { + symbol_table::persistent_varref (name) + = varval (xcurrent_context); + + unmark_persistent (); + } + + varref (xcurrent_context) = octave_value (); + } } bool is_defined (context_id context) const { - return varval (context).is_defined (); + return varval (context).is_defined (); } bool is_variable (context_id context) const { - return (! is_local () || is_defined (context) || is_forced ()); + return (! is_local () || is_defined (context) || is_forced ()); } bool is_local (void) const { return storage_class & local; } @@ -319,17 +319,17 @@ void mark_inherited (void) { storage_class |= inherited; } void mark_global (void) { - if (is_persistent ()) - error ("can't make persistent variable %s global", name.c_str ()); - else - storage_class |= global; + if (is_persistent ()) + error ("can't make persistent variable %s global", name.c_str ()); + else + storage_class |= global; } void mark_persistent (void) { - if (is_global ()) - error ("can't make global variable %s persistent", name.c_str ()); - else - storage_class |= persistent; + if (is_global ()) + error ("can't make global variable %s persistent", name.c_str ()); + else + storage_class |= persistent; } void mark_forced (void) { storage_class |= forced; } @@ -344,27 +344,27 @@ void init_persistent (void) { - if (! is_defined (xcurrent_context)) - { - mark_persistent (); - - varref (xcurrent_context) = symbol_table::persistent_varval (name); - } - // FIXME -- this causes trouble with recursive calls. - // else - // error ("unable to declare existing variable persistent"); + if (! is_defined (xcurrent_context)) + { + mark_persistent (); + + varref (xcurrent_context) = symbol_table::persistent_varval (name); + } + // FIXME -- this causes trouble with recursive calls. + // else + // error ("unable to declare existing variable persistent"); } void erase_persistent (void) { - unmark_persistent (); - symbol_table::erase_persistent (name); + unmark_persistent (); + symbol_table::erase_persistent (name); } symbol_record_rep *dup (void) const { - return new symbol_record_rep (name, varval (xcurrent_context), - storage_class); + return new symbol_record_rep (name, varval (xcurrent_context), + storage_class); } void dump (std::ostream& os, const std::string& prefix) const; @@ -391,8 +391,8 @@ public: symbol_record (const std::string& nm = std::string (), - const octave_value& v = octave_value (), - unsigned int sc = local) + const octave_value& v = octave_value (), + unsigned int sc = local) : rep (new symbol_record_rep (nm, v, sc)) { } symbol_record (const symbol_record& sr) @@ -404,13 +404,13 @@ symbol_record& operator = (const symbol_record& sr) { if (this != &sr) - { - if (--rep->count == 0) - delete rep; - - rep = sr.rep; - rep->count++; - } + { + if (--rep->count == 0) + delete rep; + + rep = sr.rep; + rep->count++; + } return *this; } @@ -418,7 +418,7 @@ ~symbol_record (void) { if (--rep->count == 0) - delete rep; + delete rep; } symbol_record dup (void) const { return symbol_record (rep->dup ()); } @@ -528,10 +528,10 @@ public: fcn_info_rep (const std::string& nm) - : name (nm), subfunctions (), private_functions (), - class_constructors (), class_methods (), cmdline_function (), - autoload_function (), function_on_path (), built_in_function (), - count (1) { } + : name (nm), subfunctions (), private_functions (), + class_constructors (), class_methods (), cmdline_function (), + autoload_function (), function_on_path (), built_in_function (), + count (1) { } octave_value load_private_function (const std::string& dir_name); @@ -551,135 +551,135 @@ bool is_user_function_defined (void) const { - return function_on_path.is_defined (); + return function_on_path.is_defined (); } octave_value find_function (const octave_value_list& args, bool local_funcs) { - return find (args, local_funcs); + return find (args, local_funcs); } void lock_subfunction (scope_id scope) { - scope_val_iterator p = subfunctions.find (scope); - - if (p != subfunctions.end ()) - p->second.lock (); + scope_val_iterator p = subfunctions.find (scope); + + if (p != subfunctions.end ()) + p->second.lock (); } void unlock_subfunction (scope_id scope) { - scope_val_iterator p = subfunctions.find (scope); - - if (p != subfunctions.end ()) - p->second.unlock (); + scope_val_iterator p = subfunctions.find (scope); + + if (p != subfunctions.end ()) + p->second.unlock (); } std::pair<std::string, octave_value> subfunction_defined_in_scope (scope_id scope) const { - scope_val_const_iterator p = subfunctions.find (scope); - - return p == subfunctions.end () - ? std::pair<std::string, octave_value> () - : std::pair<std::string, octave_value> (name, p->second); - } + scope_val_const_iterator p = subfunctions.find (scope); + + return p == subfunctions.end () + ? std::pair<std::string, octave_value> () + : std::pair<std::string, octave_value> (name, p->second); + } void erase_subfunction (scope_id scope) { - scope_val_iterator p = subfunctions.find (scope); - - if (p != subfunctions.end ()) - subfunctions.erase (p); + scope_val_iterator p = subfunctions.find (scope); + + if (p != subfunctions.end ()) + subfunctions.erase (p); } void install_cmdline_function (const octave_value& f) { - cmdline_function = f; + cmdline_function = f; } void install_subfunction (const octave_value& f, scope_id scope) { - subfunctions[scope] = f; + subfunctions[scope] = f; } void install_user_function (const octave_value& f) { - function_on_path = f; + function_on_path = f; } void install_built_in_function (const octave_value& f) { - built_in_function = f; + built_in_function = f; } template <class T> void clear_unlocked (std::map<T, octave_value>& map) { - typename std::map<T, octave_value>::iterator p = map.begin (); - - while (p != map.end ()) - { - if (p->second.islocked ()) - p++; - else - map.erase (p++); - } + typename std::map<T, octave_value>::iterator p = map.begin (); + + while (p != map.end ()) + { + if (p->second.islocked ()) + p++; + else + map.erase (p++); + } } void clear_cmdline_function (void) { - if (! cmdline_function.islocked ()) - cmdline_function = octave_value (); + if (! cmdline_function.islocked ()) + cmdline_function = octave_value (); } void clear_autoload_function (void) { - if (! autoload_function.islocked ()) - autoload_function = octave_value (); + if (! autoload_function.islocked ()) + autoload_function = octave_value (); } // FIXME -- should this also clear the cmdline and other "user // defined" functions? void clear_user_function (void) { - if (! function_on_path.islocked ()) - { - function_on_path.erase_subfunctions (); - - function_on_path = octave_value (); - } + if (! function_on_path.islocked ()) + { + function_on_path.erase_subfunctions (); + + function_on_path = octave_value (); + } } void clear_mex_function (void) { - if (function_on_path.is_mex_function ()) - clear_user_function (); + if (function_on_path.is_mex_function ()) + clear_user_function (); } void clear (void) { - clear_unlocked (subfunctions); - clear_unlocked (private_functions); - clear_unlocked (class_constructors); - clear_unlocked (class_methods); - clear_cmdline_function (); - clear_autoload_function (); - clear_user_function (); + clear_unlocked (subfunctions); + clear_unlocked (private_functions); + clear_unlocked (class_constructors); + clear_unlocked (class_methods); + clear_cmdline_function (); + clear_autoload_function (); + clear_user_function (); } void add_dispatch (const std::string& type, const std::string& fname) { - dispatch_map[type] = fname; + dispatch_map[type] = fname; } void clear_dispatch (const std::string& type) { - dispatch_map_iterator p = dispatch_map.find (type); - - if (p != dispatch_map.end ()) - dispatch_map.erase (p); + dispatch_map_iterator p = dispatch_map.find (type); + + if (p != dispatch_map.end ()) + dispatch_map.erase (p); } void print_dispatch (std::ostream& os) const; @@ -743,13 +743,13 @@ fcn_info& operator = (const fcn_info& fi) { if (this != &fi) - { - if (--rep->count == 0) - delete rep; - - rep = fi.rep; - rep->count++; - } + { + if (--rep->count == 0) + delete rep; + + rep = fi.rep; + rep->count++; + } return *this; } @@ -757,7 +757,7 @@ ~fcn_info (void) { if (--rep->count == 0) - delete rep; + delete rep; } octave_value find (const octave_value_list& args = octave_value_list (), @@ -816,7 +816,7 @@ subfunction_defined_in_scope (scope_id scope = xcurrent_scope) const { return rep->subfunction_defined_in_scope (scope); - } + } void erase_subfunction (scope_id scope) { @@ -899,20 +899,20 @@ error ("can't set scope to global"); else if (scope != xcurrent_scope) { - all_instances_iterator p = all_instances.find (scope); - - if (p == all_instances.end ()) - { - symbol_table *inst = new symbol_table (); - - if (inst) - all_instances[scope] = instance = inst; - } - else - instance = p->second; - - xcurrent_scope = scope; - xcurrent_context = 0; + all_instances_iterator p = all_instances.find (scope); + + if (p == all_instances.end ()) + { + symbol_table *inst = new symbol_table (); + + if (inst) + all_instances[scope] = instance = inst; + } + else + instance = p->second; + + xcurrent_scope = scope; + xcurrent_context = 0; } } @@ -922,21 +922,21 @@ error ("can't set scope to global"); else { - if (scope != xcurrent_scope) - { - all_instances_iterator p = all_instances.find (scope); - - if (p == all_instances.end ()) - error ("scope not found!"); - else - { - instance = p->second; - - xcurrent_scope = scope; + if (scope != xcurrent_scope) + { + all_instances_iterator p = all_instances.find (scope); + + if (p == all_instances.end ()) + error ("scope not found!"); + else + { + instance = p->second; + + xcurrent_scope = scope; xcurrent_context = context; - } - } + } + } else xcurrent_context = context; } @@ -950,18 +950,18 @@ if (p != all_instances.end ()) { - delete p->second; - - all_instances.erase (p); - - free_scope (scope); + delete p->second; + + all_instances.erase (p); + + free_scope (scope); } } static void erase_subfunctions_in_scope (scope_id scope) { for (fcn_table_iterator q = fcn_table.begin (); - q != fcn_table.end (); q++) + q != fcn_table.end (); q++) q->second.erase_subfunction (scope); } @@ -973,18 +973,18 @@ if (inst) { - scope_id new_scope = alloc_scope (); - - symbol_table *new_symbol_table = new symbol_table (); - - if (new_symbol_table) - { - all_instances[new_scope] = new_symbol_table; - - inst->do_dup_scope (*new_symbol_table); - - retval = new_scope; - } + scope_id new_scope = alloc_scope (); + + symbol_table *new_symbol_table = new symbol_table (); + + if (new_symbol_table) + { + all_instances[new_scope] = new_symbol_table; + + inst->do_dup_scope (*new_symbol_table); + + retval = new_scope; + } } return retval; @@ -1010,10 +1010,10 @@ if (inst) { - symbol_table *donor_symbol_table = get_instance (donor_scope); - - if (donor_symbol_table) - inst->do_inherit (*donor_symbol_table, donor_context); + symbol_table *donor_symbol_table = get_instance (donor_scope); + + if (donor_symbol_table) + inst->do_inherit (*donor_symbol_table, donor_context); } } @@ -1023,7 +1023,7 @@ static octave_value find (const std::string& name, const octave_value_list& args = octave_value_list (), - bool skip_variables = false, + bool skip_variables = false, bool local_funcs = true); static octave_value builtin_find (const std::string& name); @@ -1039,8 +1039,8 @@ } static void force_variable (const std::string& name, - scope_id scope = xcurrent_scope, - context_id context = xcurrent_context) + scope_id scope = xcurrent_scope, + context_id context = xcurrent_context) { symbol_table *inst = get_instance (scope); @@ -1049,8 +1049,8 @@ } static octave_value& varref (const std::string& name, - scope_id scope = xcurrent_scope, - context_id context = xcurrent_context) + scope_id scope = xcurrent_scope, + context_id context = xcurrent_context) { static octave_value foobar; @@ -1060,8 +1060,8 @@ } static octave_value varval (const std::string& name, - scope_id scope = xcurrent_scope, - context_id context = xcurrent_context) + scope_id scope = xcurrent_scope, + context_id context = xcurrent_context) { symbol_table *inst = get_instance (scope); @@ -1144,14 +1144,14 @@ return p->second.find_method (dispatch_type); else { - fcn_info finfo (name); - - octave_value fcn = finfo.find_method (dispatch_type); - - if (fcn.is_defined ()) - fcn_table[name] = finfo; - - return fcn; + fcn_info finfo (name); + + octave_value fcn = finfo.find_method (dispatch_type); + + if (fcn.is_defined ()) + fcn_table[name] = finfo; + + return fcn; } } @@ -1187,87 +1187,87 @@ } static void install_cmdline_function (const std::string& name, - const octave_value& fcn) + const octave_value& fcn) { fcn_table_iterator p = fcn_table.find (name); if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - finfo.install_cmdline_function (fcn); + fcn_info& finfo = p->second; + + finfo.install_cmdline_function (fcn); } else { - fcn_info finfo (name); - - finfo.install_cmdline_function (fcn); - - fcn_table[name] = finfo; + fcn_info finfo (name); + + finfo.install_cmdline_function (fcn); + + fcn_table[name] = finfo; } } static void install_subfunction (const std::string& name, - const octave_value& fcn, - scope_id scope) + const octave_value& fcn, + scope_id scope) { fcn_table_iterator p = fcn_table.find (name); if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - finfo.install_subfunction (fcn, scope); + fcn_info& finfo = p->second; + + finfo.install_subfunction (fcn, scope); } else { - fcn_info finfo (name); - - finfo.install_subfunction (fcn, scope); - - fcn_table[name] = finfo; + fcn_info finfo (name); + + finfo.install_subfunction (fcn, scope); + + fcn_table[name] = finfo; } } static void install_user_function (const std::string& name, - const octave_value& fcn) + const octave_value& fcn) { fcn_table_iterator p = fcn_table.find (name); if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - finfo.install_user_function (fcn); + fcn_info& finfo = p->second; + + finfo.install_user_function (fcn); } else { - fcn_info finfo (name); - - finfo.install_user_function (fcn); - - fcn_table[name] = finfo; + fcn_info finfo (name); + + finfo.install_user_function (fcn); + + fcn_table[name] = finfo; } } static void install_built_in_function (const std::string& name, - const octave_value& fcn) + const octave_value& fcn) { fcn_table_iterator p = fcn_table.find (name); if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - finfo.install_built_in_function (fcn); + fcn_info& finfo = p->second; + + finfo.install_built_in_function (fcn); } else { - fcn_info finfo (name); - - finfo.install_built_in_function (fcn); - - fcn_table[name] = finfo; + fcn_info finfo (name); + + finfo.install_built_in_function (fcn); + + fcn_table[name] = finfo; } } @@ -1354,8 +1354,8 @@ for (fcn_table_iterator p = fcn_table.begin (); p != fcn_table.end (); p++) { - if (pattern.match (p->first)) - p->second.clear_user_function (); + if (pattern.match (p->first)) + p->second.clear_user_function (); } } @@ -1397,9 +1397,9 @@ if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - finfo.clear_user_function (); + fcn_info& finfo = p->second; + + finfo.clear_user_function (); } // FIXME -- is this necessary, or even useful? // else @@ -1413,10 +1413,10 @@ if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - finfo.clear_autoload_function (); - finfo.clear_user_function (); + fcn_info& finfo = p->second; + + finfo.clear_autoload_function (); + finfo.clear_user_function (); } } @@ -1424,52 +1424,52 @@ { for (fcn_table_iterator p = fcn_table.begin (); p != fcn_table.end (); p++) { - fcn_info& finfo = p->second; - - finfo.clear_mex_function (); + fcn_info& finfo = p->second; + + finfo.clear_mex_function (); } } static bool set_class_relationship (const std::string& sup_class, - const std::string& inf_class); + const std::string& inf_class); static bool is_superiorto (const std::string& a, const std::string& b); static void alias_built_in_function (const std::string& alias, - const std::string& name) + const std::string& name) { octave_value fcn = find_built_in_function (name); if (fcn.is_defined ()) { - fcn_info finfo (alias); - - finfo.install_built_in_function (fcn); - - fcn_table[alias] = finfo; + fcn_info finfo (alias); + + finfo.install_built_in_function (fcn); + + fcn_table[alias] = finfo; } else panic ("alias: `%s' is undefined", name.c_str ()); } static void add_dispatch (const std::string& name, const std::string& type, - const std::string& fname) + const std::string& fname) { fcn_table_iterator p = fcn_table.find (name); if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - finfo.add_dispatch (type, fname); + fcn_info& finfo = p->second; + + finfo.add_dispatch (type, fname); } else { - fcn_info finfo (name); - - finfo.add_dispatch (type, fname); - - fcn_table[name] = finfo; + fcn_info finfo (name); + + finfo.add_dispatch (type, fname); + + fcn_table[name] = finfo; } } @@ -1479,9 +1479,9 @@ if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - finfo.clear_dispatch (type); + fcn_info& finfo = p->second; + + finfo.clear_dispatch (type); } } @@ -1491,9 +1491,9 @@ if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - finfo.print_dispatch (os); + fcn_info& finfo = p->second; + + finfo.print_dispatch (os); } } @@ -1505,9 +1505,9 @@ if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - retval = finfo.get_dispatch (); + fcn_info& finfo = p->second; + + retval = finfo.get_dispatch (); } return retval; @@ -1521,9 +1521,9 @@ if (p != fcn_table.end ()) { - fcn_info& finfo = p->second; - - retval = finfo.help_for_dispatch (); + fcn_info& finfo = p->second; + + retval = finfo.help_for_dispatch (); } return retval; @@ -1535,10 +1535,10 @@ error ("invalid call to xymtab::push_context"); else { - symbol_table *inst = get_instance (xcurrent_scope); - - if (inst) - inst->do_push_context (); + symbol_table *inst = get_instance (xcurrent_scope); + + if (inst) + inst->do_push_context (); } } @@ -1548,10 +1548,10 @@ error ("invalid call to xymtab::pop_context"); else { - symbol_table *inst = get_instance (xcurrent_scope); - - if (inst) - inst->do_pop_context (); + symbol_table *inst = get_instance (xcurrent_scope); + + if (inst) + inst->do_pop_context (); } } @@ -1576,8 +1576,8 @@ static std::list<symbol_record> all_variables (scope_id scope = xcurrent_scope, - context_id context = xcurrent_context, - bool defined_only = true) + context_id context = xcurrent_context, + bool defined_only = true) { symbol_table *inst = get_instance (scope); @@ -1621,15 +1621,15 @@ glob_match pat (pattern); for (global_table_const_iterator p = global_table.begin (); - p != global_table.end (); p++) + p != global_table.end (); p++) { - // We generate a list of symbol_record objects so that - // the results from glob_variables and glob_global_variables - // may be handled the same way. - - if (pat.match (p->first)) - retval.push_back (symbol_record (p->first, p->second, - symbol_record::global)); + // We generate a list of symbol_record objects so that + // the results from glob_variables and glob_global_variables + // may be handled the same way. + + if (pat.match (p->first)) + retval.push_back (symbol_record (p->first, p->second, + symbol_record::global)); } return retval; @@ -1643,15 +1643,15 @@ regex_match pat (pattern); for (global_table_const_iterator p = global_table.begin (); - p != global_table.end (); p++) + p != global_table.end (); p++) { - // We generate a list of symbol_record objects so that - // the results from regexp_variables and regexp_global_variables - // may be handled the same way. - - if (pat.match (p->first)) - retval.push_back (symbol_record (p->first, p->second, - symbol_record::global)); + // We generate a list of symbol_record objects so that + // the results from regexp_variables and regexp_global_variables + // may be handled the same way. + + if (pat.match (p->first)) + retval.push_back (symbol_record (p->first, p->second, + symbol_record::global)); } return retval; @@ -1665,9 +1665,9 @@ for (size_t i = 0; i < len; i++) { - std::list<symbol_record> tmp = glob_variables (patterns[i]); - - retval.insert (retval.begin (), tmp.begin (), tmp.end ()); + std::list<symbol_record> tmp = glob_variables (patterns[i]); + + retval.insert (retval.begin (), tmp.begin (), tmp.end ()); } return retval; @@ -1682,9 +1682,9 @@ for (size_t i = 0; i < len; i++) { - std::list<symbol_record> tmp = regexp_variables (patterns[i]); - - retval.insert (retval.begin (), tmp.begin (), tmp.end ()); + std::list<symbol_record> tmp = regexp_variables (patterns[i]); + + retval.insert (retval.begin (), tmp.begin (), tmp.end ()); } return retval; @@ -1695,10 +1695,10 @@ std::list<std::string> retval; for (fcn_table_iterator p = fcn_table.begin (); - p != fcn_table.end (); p++) + p != fcn_table.end (); p++) { - if (p->second.is_user_function_defined ()) - retval.push_back (p->first); + if (p->second.is_user_function_defined ()) + retval.push_back (p->first); } if (! retval.empty ()) @@ -1712,7 +1712,7 @@ std::list<std::string> retval; for (global_table_const_iterator p = global_table.begin (); - p != global_table.end (); p++) + p != global_table.end (); p++) retval.push_back (p->first); retval.sort (); @@ -1739,12 +1739,12 @@ std::list<std::string> retval; for (fcn_table_const_iterator p = fcn_table.begin (); - p != fcn_table.end (); p++) + p != fcn_table.end (); p++) { - octave_value fcn = p->second.find_built_in_function (); - - if (fcn.is_defined ()) - retval.push_back (p->first); + octave_value fcn = p->second.find_built_in_function (); + + if (fcn.is_defined ()) + retval.push_back (p->first); } if (! retval.empty ()) @@ -1759,9 +1759,9 @@ return false; else { - symbol_table *inst = get_instance (xcurrent_scope); - - return inst ? inst->do_is_local_variable (name) : false; + symbol_table *inst = get_instance (xcurrent_scope); + + return inst ? inst->do_is_local_variable (name) : false; } } @@ -1771,9 +1771,9 @@ return true; else { - symbol_table *inst = get_instance (xcurrent_scope); - - return inst ? inst->do_is_global (name) : false; + symbol_table *inst = get_instance (xcurrent_scope); + + return inst ? inst->do_is_global (name) : false; } } @@ -1794,14 +1794,14 @@ static void lock_subfunctions (scope_id scope = xcurrent_scope) { for (fcn_table_iterator p = fcn_table.begin (); - p != fcn_table.end (); p++) + p != fcn_table.end (); p++) p->second.lock_subfunction (scope); } static void unlock_subfunctions (scope_id scope = xcurrent_scope) { for (fcn_table_iterator p = fcn_table.begin (); - p != fcn_table.end (); p++) + p != fcn_table.end (); p++) p->second.unlock_subfunction (scope); } @@ -1814,10 +1814,10 @@ } static void stash_dir_name_for_subfunctions (scope_id scope, - const std::string& dir_name); + const std::string& dir_name); static void add_to_parent_map (const std::string& classname, - const std::list<std::string>& parent_list) + const std::list<std::string>& parent_list) { parent_map[classname] = parent_list; } @@ -1918,52 +1918,52 @@ if (scope != xglobal_scope) { - if (scope == xcurrent_scope) - { - if (! instance && create) - { - symbol_table *inst = new symbol_table (); - - if (inst) - { - all_instances[scope] = instance = inst; - - if (scope == xtop_scope) - instance->do_cache_name ("top-level"); - } - } - - if (! instance) - ok = false; - - retval = instance; - } - else - { - all_instances_iterator p = all_instances.find (scope); - - if (p == all_instances.end ()) - { - if (create) - { - retval = new symbol_table (); - - if (retval) - all_instances[scope] = retval; - else - ok = false; - } - else - ok = false; - } - else - retval = p->second; - } + if (scope == xcurrent_scope) + { + if (! instance && create) + { + symbol_table *inst = new symbol_table (); + + if (inst) + { + all_instances[scope] = instance = inst; + + if (scope == xtop_scope) + instance->do_cache_name ("top-level"); + } + } + + if (! instance) + ok = false; + + retval = instance; + } + else + { + all_instances_iterator p = all_instances.find (scope); + + if (p == all_instances.end ()) + { + if (create) + { + retval = new symbol_table (); + + if (retval) + all_instances[scope] = retval; + else + ok = false; + } + else + ok = false; + } + else + retval = p->second; + } } if (! ok) error ("unable to %s symbol_table object for scope %d!", - create ? "create" : "find", scope); + create ? "create" : "find", scope); return retval; } @@ -1994,24 +1994,24 @@ { for (table_iterator p = table.begin (); p != table.end (); p++) { - symbol_record& sr = p->second; - - if (! (sr.is_automatic () || sr.is_formal ())) - { - std::string nm = sr.name (); - - if (nm != "__retval__") - { - octave_value val = donor_table.do_varval (nm, donor_context); - - if (val.is_defined ()) - { - sr.varref (0) = val; - - sr.mark_inherited (); - } - } - } + symbol_record& sr = p->second; + + if (! (sr.is_automatic () || sr.is_formal ())) + { + std::string nm = sr.name (); + + if (nm != "__retval__") + { + octave_value val = donor_table.do_varval (nm, donor_context); + + if (val.is_defined ()) + { + sr.varref (0) = val; + + sr.mark_inherited (); + } + } + } } } @@ -2041,9 +2041,9 @@ if (p == table.end ()) { - symbol_record& sr = do_insert (name); - - sr.force_variable (context); + symbol_record& sr = do_insert (name); + + sr.force_variable (context); } else p->second.force_variable (context); @@ -2055,9 +2055,9 @@ if (p == table.end ()) { - symbol_record& sr = do_insert (name); - - return sr.varref (context); + symbol_record& sr = do_insert (name); + + return sr.varref (context); } else return p->second.varref (context); @@ -2101,9 +2101,9 @@ if (p != table.end ()) { - const symbol_record& sr = p->second; - - retval = sr.is_variable (); + const symbol_record& sr = p->second; + + retval = sr.is_variable (); } return retval; @@ -2119,10 +2119,10 @@ { for (table_iterator p = table.begin (); p != table.end (); ) { - if (p->second.pop_context () == 0) - table.erase (p++); - else - p++; + if (p->second.pop_context () == 0) + table.erase (p++); + else + p++; } } @@ -2136,10 +2136,10 @@ { for (table_iterator p = table.begin (); p != table.end (); p++) { - symbol_record& sr = p->second; - octave_value& val = sr.varref (); - if (val.is_object()) - p->second.clear (); + symbol_record& sr = p->second; + octave_value& val = sr.varref (); + if (val.is_object()) + p->second.clear (); } } @@ -2155,9 +2155,9 @@ if (p != table.end ()) { - symbol_record& sr = p->second; - - if (sr.is_global ()) + symbol_record& sr = p->second; + + if (sr.is_global ()) sr.unmark_global (); } @@ -2182,16 +2182,16 @@ for (table_iterator p = table.begin (); p != table.end (); p++) { - symbol_record& sr = p->second; - - if (sr.is_global () && pattern.match (sr.name ())) + symbol_record& sr = p->second; + + if (sr.is_global () && pattern.match (sr.name ())) sr.unmark_global (); } for (global_table_iterator q = global_table.begin (); q != global_table.end (); q++) { - if (pattern.match (q->first)) + if (pattern.match (q->first)) global_table.erase (q); } @@ -2204,13 +2204,13 @@ for (table_iterator p = table.begin (); p != table.end (); p++) { - symbol_record& sr = p->second; - - if (sr.is_defined () || sr.is_global ()) - { - if (pattern.match (sr.name ())) - sr.clear (); - } + symbol_record& sr = p->second; + + if (sr.is_defined () || sr.is_global ()) + { + if (pattern.match (sr.name ())) + sr.clear (); + } } } @@ -2220,13 +2220,13 @@ for (table_iterator p = table.begin (); p != table.end (); p++) { - symbol_record& sr = p->second; - - if (sr.is_defined () || sr.is_global ()) - { - if (pattern.match (sr.name ())) - sr.clear (); - } + symbol_record& sr = p->second; + + if (sr.is_defined () || sr.is_global ()) + { + if (pattern.match (sr.name ())) + sr.clear (); + } } } @@ -2253,19 +2253,19 @@ for (table_const_iterator p = table.begin (); p != table.end (); p++) { - const symbol_record& sr = p->second; - - if (defined_only && ! sr.is_defined (context)) - continue; - - retval.push_back (sr); + const symbol_record& sr = p->second; + + if (defined_only && ! sr.is_defined (context)) + continue; + + retval.push_back (sr); } return retval; } std::list<symbol_record> do_glob (const std::string& pattern, - bool vars_only = false) const + bool vars_only = false) const { std::list<symbol_record> retval; @@ -2273,22 +2273,22 @@ for (table_const_iterator p = table.begin (); p != table.end (); p++) { - if (pat.match (p->first)) - { - const symbol_record& sr = p->second; - - if (vars_only && ! sr.is_variable ()) - continue; - - retval.push_back (sr); - } + if (pat.match (p->first)) + { + const symbol_record& sr = p->second; + + if (vars_only && ! sr.is_variable ()) + continue; + + retval.push_back (sr); + } } return retval; } std::list<symbol_record> do_regexp (const std::string& pattern, - bool vars_only = false) const + bool vars_only = false) const { std::list<symbol_record> retval; @@ -2296,15 +2296,15 @@ for (table_const_iterator p = table.begin (); p != table.end (); p++) { - if (pat.match (p->first)) - { - const symbol_record& sr = p->second; - - if (vars_only && ! sr.is_variable ()) - continue; - - retval.push_back (sr); - } + if (pat.match (p->first)) + { + const symbol_record& sr = p->second; + + if (vars_only && ! sr.is_variable ()) + continue; + + retval.push_back (sr); + } } return retval; @@ -2316,8 +2316,8 @@ for (table_const_iterator p = table.begin (); p != table.end (); p++) { - if (p->second.is_variable ()) - retval.push_back (p->first); + if (p->second.is_variable ()) + retval.push_back (p->first); } retval.sort (); @@ -2331,15 +2331,15 @@ std::map<std::string, octave_value> retval; for (fcn_table_const_iterator p = fcn_table.begin (); - p != fcn_table.end (); p++) + p != fcn_table.end (); p++) { - std::pair<std::string, octave_value> tmp - = p->second.subfunction_defined_in_scope (scope); - - std::string nm = tmp.first; - - if (! nm.empty ()) - retval[nm] = tmp.second; + std::pair<std::string, octave_value> tmp + = p->second.subfunction_defined_in_scope (scope); + + std::string nm = tmp.first; + + if (! nm.empty ()) + retval[nm] = tmp.second; } return retval; @@ -2350,8 +2350,8 @@ table_const_iterator p = table.find (name); return (p != table.end () - && ! p->second.is_global () - && p->second.is_defined ()); + && ! p->second.is_global () + && p->second.is_defined ()); } bool do_is_global (const std::string& name) const
--- a/src/token.h +++ b/src/token.h @@ -69,7 +69,7 @@ token (int l = -1, int c = -1); token (const std::string& s, int l = -1, int c = -1); token (double d, const std::string& s = std::string (), - int l = -1, int c = -1); + int l = -1, int c = -1); token (end_tok_type t, int l = -1, int c = -1); token (plot_tok_type t, int l = -1, int c = -1); token (symbol_table::symbol_record *s, int l = -1, int c = -1);
--- a/src/toplev.h +++ b/src/toplev.h @@ -87,12 +87,12 @@ struct call_stack_elt { call_stack_elt (octave_function *f, symbol_table::scope_id s, - symbol_table::context_id c, size_t p = 0) + symbol_table::context_id c, size_t p = 0) : fcn (f), stmt (0), scope (s), context (c), prev (p) { } call_stack_elt (const call_stack_elt& elt) : fcn (elt.fcn), stmt (elt.stmt), scope (elt.scope), - context (elt.context), prev (elt.prev) { } + context (elt.context), prev (elt.prev) { } octave_function *fcn; tree_statement *stmt; @@ -119,16 +119,16 @@ if (! instance) { - instance = new octave_call_stack (); + instance = new octave_call_stack (); - if (instance) - instance->do_push (0, symbol_table::top_scope (), 0); - else - { - ::error ("unable to create call stack object!"); + if (instance) + instance->do_push (0, symbol_table::top_scope (), 0); + else + { + ::error ("unable to create call stack object!"); - retval = false; - } + retval = false; + } } return retval; @@ -217,8 +217,8 @@ static void push (octave_function *f, - symbol_table::scope_id scope = symbol_table::current_scope (), - symbol_table::context_id context = symbol_table::current_context ()) + symbol_table::scope_id scope = symbol_table::current_scope (), + symbol_table::context_id context = symbol_table::current_context ()) { if (instance_ok ()) instance->do_push (f, scope, context); @@ -226,7 +226,7 @@ static void push (symbol_table::scope_id scope = symbol_table::current_scope (), - symbol_table::context_id context = symbol_table::current_context ()) + symbol_table::context_id context = symbol_table::current_context ()) { if (instance_ok ()) instance->do_push (0, scope, context); @@ -336,8 +336,8 @@ if (cs.size () > n) { - call_stack_elt& elt = cs[n]; - retval = elt.fcn; + call_stack_elt& elt = cs[n]; + retval = elt.fcn; } return retval; @@ -346,7 +346,7 @@ octave_user_code *do_caller_user_code (size_t nskip) const; void do_push (octave_function *f, symbol_table::scope_id scope, - symbol_table::context_id context) + symbol_table::context_id context) { size_t prev_frame = curr_frame; curr_frame = cs.size (); @@ -360,8 +360,8 @@ if (! cs.empty ()) { - const call_stack_elt& elt = cs[curr_frame]; - retval = elt.fcn; + const call_stack_elt& elt = cs[curr_frame]; + retval = elt.fcn; } return retval; @@ -373,8 +373,8 @@ if (! cs.empty ()) { - const call_stack_elt& elt = cs[curr_frame]; - retval = elt.stmt; + const call_stack_elt& elt = cs[curr_frame]; + retval = elt.stmt; } return retval; @@ -384,13 +384,13 @@ { if (! cs.empty ()) { - call_stack_elt& elt = cs.back (); - elt.stmt = s; + call_stack_elt& elt = cs.back (); + elt.stmt = s; } } Octave_map do_backtrace (size_t nskip, - octave_idx_type& curr_user_frame) const; + octave_idx_type& curr_user_frame) const; bool do_goto_frame (size_t n, bool verbose); @@ -404,11 +404,11 @@ { if (cs.size () > 1) { - const call_stack_elt& elt = cs.back (); - curr_frame = elt.prev; - cs.pop_back (); - const call_stack_elt& new_elt = cs[curr_frame]; - symbol_table::set_scope_and_context (new_elt.scope, new_elt.context); + const call_stack_elt& elt = cs.back (); + curr_frame = elt.prev; + cs.pop_back (); + const call_stack_elt& new_elt = cs[curr_frame]; + symbol_table::set_scope_and_context (new_elt.scope, new_elt.context); } }
--- a/src/txt-eng-ft.h +++ b/src/txt-eng-ft.h @@ -64,7 +64,7 @@ Matrix get_boundingbox (void) const { return bbox; } uint8NDArray render (text_element* elt, Matrix& box, - int rotation = ROTATION_0); + int rotation = ROTATION_0); void set_font (const base_properties& props);
--- a/src/txt-eng.h +++ b/src/txt-eng.h @@ -82,11 +82,11 @@ ~text_element_list (void) { while (! empty ()) - { - iterator it = begin (); - delete (*it); - erase (it); - } + { + iterator it = begin (); + delete (*it); + erase (it); + } } void accept (text_processor& p); @@ -128,10 +128,10 @@ virtual void visit (text_element_list& e) { for (text_element_list::iterator it = e.begin (); - it != e.end (); ++it) - { - (*it)->accept (*this); - } + it != e.end (); ++it) + { + (*it)->accept (*this); + } } virtual void visit (text_subscript_element& e)
--- a/src/utils.h +++ b/src/utils.h @@ -44,17 +44,17 @@ same_file (const std::string& f, const std::string& g); extern OCTINTERP_API int almost_match (const std::string& std, - const std::string& s, - int min_match_len = 1, - int case_sens = 1); + const std::string& s, + int min_match_len = 1, + int case_sens = 1); extern OCTINTERP_API int keyword_almost_match (const char * const *std, int *min_len, - const std::string& s, int min_toks_to_match, - int max_toks); + const std::string& s, int min_toks_to_match, + int max_toks); extern OCTINTERP_API int empty_arg (const char *name, octave_idx_type nr, - octave_idx_type nc); + octave_idx_type nc); extern OCTINTERP_API std::string search_path_for_file (const std::string&, const string_vector&); @@ -86,20 +86,20 @@ extern OCTINTERP_API void get_dimensions (const octave_value& a, const octave_value& b, - const char *warn_for, octave_idx_type& nr, - octave_idx_type& nc); + const char *warn_for, octave_idx_type& nr, + octave_idx_type& nc); extern OCTINTERP_API void get_dimensions (const octave_value& a,const char *warn_for, - octave_idx_type& nr, octave_idx_type& nc); + octave_idx_type& nr, octave_idx_type& nc); extern OCTINTERP_API octave_idx_type dims_to_numel (const dim_vector& dims, const octave_value_list& idx); extern OCTINTERP_API void decode_subscripts (const char* name, const octave_value& arg, - std::string& type_string, - std::list<octave_value_list>& idx); + std::string& type_string, + std::list<octave_value_list>& idx); extern OCTINTERP_API Matrix identity_matrix (octave_idx_type nr, octave_idx_type nc);
--- a/src/variables.h +++ b/src/variables.h @@ -46,23 +46,23 @@ extern OCTINTERP_API octave_function * is_valid_function (const octave_value&, const std::string& = std::string (), - bool warn = false); + bool warn = false); extern OCTINTERP_API octave_function * is_valid_function (const std::string&, const std::string& = std::string (), - bool warn = false); + bool warn = false); extern OCTINTERP_API octave_function * extract_function (const octave_value& arg, const std::string& warn_for, - const std::string& fname, const std::string& header, - const std::string& trailer); + const std::string& fname, const std::string& header, + const std::string& trailer); extern OCTINTERP_API string_vector get_struct_elts (const std::string& text); extern OCTINTERP_API string_vector generate_struct_completions (const std::string& text, std::string& prefix, - std::string& hint); + std::string& hint); extern OCTINTERP_API bool looks_like_struct (const std::string& text); @@ -89,25 +89,25 @@ extern OCTINTERP_API octave_value set_internal_variable (bool& var, const octave_value_list& args, - int nargout, const char *nm); + int nargout, const char *nm); extern OCTINTERP_API octave_value set_internal_variable (char& var, const octave_value_list& args, - int nargout, const char *nm); + int nargout, const char *nm); extern OCTINTERP_API octave_value set_internal_variable (int& var, const octave_value_list& args, - int nargout, const char *nm, - int minval = INT_MIN, int maxval = INT_MAX); + int nargout, const char *nm, + int minval = INT_MIN, int maxval = INT_MAX); extern OCTINTERP_API octave_value set_internal_variable (double& var, const octave_value_list& args, - int nargout, const char *nm, - double minval = DBL_MIN, double maxval = DBL_MAX); + int nargout, const char *nm, + double minval = DBL_MIN, double maxval = DBL_MAX); extern OCTINTERP_API octave_value set_internal_variable (std::string& var, const octave_value_list& args, - int nargout, const char *nm, bool empty_ok = true); + int nargout, const char *nm, bool empty_ok = true); #define SET_INTERNAL_VARIABLE(NM) \ set_internal_variable (V ## NM, args, nargout, #NM)
--- a/src/xdiv.h +++ b/src/xdiv.h @@ -30,11 +30,11 @@ extern Matrix xdiv (const Matrix& a, const Matrix& b, MatrixType &typ); extern ComplexMatrix xdiv (const Matrix& a, const ComplexMatrix& b, - MatrixType &typ); + MatrixType &typ); extern ComplexMatrix xdiv (const ComplexMatrix& a, const Matrix& b, - MatrixType &typ); + MatrixType &typ); extern ComplexMatrix xdiv (const ComplexMatrix& a, const ComplexMatrix& b, - MatrixType &typ); + MatrixType &typ); extern Matrix x_el_div (double a, const Matrix& b); extern ComplexMatrix x_el_div (double a, const ComplexMatrix& b); @@ -49,19 +49,19 @@ extern Matrix xleftdiv (const Matrix& a, const Matrix& b, MatrixType &typ, blas_trans_type transt = blas_no_trans); extern ComplexMatrix xleftdiv (const Matrix& a, const ComplexMatrix& b, - MatrixType &typ, blas_trans_type transt = blas_no_trans); + MatrixType &typ, blas_trans_type transt = blas_no_trans); extern ComplexMatrix xleftdiv (const ComplexMatrix& a, const Matrix& b, - MatrixType &typ, blas_trans_type transt = blas_no_trans); + MatrixType &typ, blas_trans_type transt = blas_no_trans); extern ComplexMatrix xleftdiv (const ComplexMatrix& a, const ComplexMatrix& b, - MatrixType &typ, blas_trans_type transt = blas_no_trans); + MatrixType &typ, blas_trans_type transt = blas_no_trans); extern FloatMatrix xdiv (const FloatMatrix& a, const FloatMatrix& b, MatrixType &typ); extern FloatComplexMatrix xdiv (const FloatMatrix& a, const FloatComplexMatrix& b, - MatrixType &typ); + MatrixType &typ); extern FloatComplexMatrix xdiv (const FloatComplexMatrix& a, const FloatMatrix& b, - MatrixType &typ); + MatrixType &typ); extern FloatComplexMatrix xdiv (const FloatComplexMatrix& a, const FloatComplexMatrix& b, - MatrixType &typ); + MatrixType &typ); extern FloatMatrix x_el_div (float a, const FloatMatrix& b); extern FloatComplexMatrix x_el_div (float a, const FloatComplexMatrix& b); @@ -76,11 +76,11 @@ extern FloatMatrix xleftdiv (const FloatMatrix& a, const FloatMatrix& b, MatrixType &typ, blas_trans_type transt = blas_no_trans); extern FloatComplexMatrix xleftdiv (const FloatMatrix& a, const FloatComplexMatrix& b, - MatrixType &typ, blas_trans_type transt = blas_no_trans); + MatrixType &typ, blas_trans_type transt = blas_no_trans); extern FloatComplexMatrix xleftdiv (const FloatComplexMatrix& a, const FloatMatrix& b, - MatrixType &typ, blas_trans_type transt = blas_no_trans); + MatrixType &typ, blas_trans_type transt = blas_no_trans); extern FloatComplexMatrix xleftdiv (const FloatComplexMatrix& a, const FloatComplexMatrix& b, - MatrixType &typ, blas_trans_type transt = blas_no_trans); + MatrixType &typ, blas_trans_type transt = blas_no_trans); extern Matrix xdiv (const Matrix& a, const DiagMatrix& b);