Mercurial > hg > octave-lojdl
changeset 4499:55695bf73797
[project @ 2003-09-05 19:56:37 by jwe]
author | jwe |
---|---|
date | Fri, 05 Sep 2003 19:56:37 +0000 |
parents | 093e39f03506 |
children | aa3b7d89864e |
files | src/ChangeLog src/ov-cs-list.cc src/ov-cs-list.h src/ov-list.h src/ov-struct.cc |
diffstat | 5 files changed, 24 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-09-05 John W. Eaton <jwe@bevo.che.wisc.edu> + + * ov-cs-list.cc (octave_cs_list::print_raw): New function. + * ov-cs-list.h (octave_cs_list::print_raw): Provide decl. + 2003-09-04 John W. Eaton <jwe@bevo.che.wisc.edu> * pt-plot.cc (subplot_style::columns_ok): Allow boxes style to
--- a/src/ov-cs-list.cc +++ b/src/ov-cs-list.cc @@ -226,8 +226,10 @@ print_raw (os); } +#endif + void -octave_list::print_raw (std::ostream& os, bool) const +octave_cs_list::print_raw (std::ostream& os, bool) const { unwind_protect::begin_frame ("octave_list_print"); @@ -236,7 +238,7 @@ if (n > 0) { indent (os); - os << "("; + os << "(,"; newline (os); increment_indent_level (); @@ -256,16 +258,18 @@ decrement_indent_level (); indent (os); - os << ")"; + os << ",)"; } else - os << "()"; + os << "(,,)"; newline (os); unwind_protect::run_frame ("octave_list_print"); } +#if 0 + bool octave_list::print_name_tag (std::ostream& os, const std::string& name) const {
--- a/src/ov-cs-list.h +++ b/src/ov-cs-list.h @@ -94,9 +94,14 @@ void print (std::ostream& os, bool pr_as_read_syntax = false) const; +#endif + void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; +#if 0 + bool print_name_tag (std::ostream& os, const std::string& name) const; + #endif private:
--- a/src/ov-list.h +++ b/src/ov-list.h @@ -99,11 +99,13 @@ bool print_name_tag (std::ostream& os, const std::string& name) const; -private: +protected: // The list of Octave values. octave_value_list lst; +private: + DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA DECLARE_OCTAVE_ALLOCATOR
--- a/src/ov-struct.cc +++ b/src/ov-struct.cc @@ -115,7 +115,7 @@ idx_vector i = t_idx(0).index_vector (); octave_value_list t = tmp.index (i); - retval = (t.length () == 1) ? t(0) : octave_value (t); + retval = (t.length () == 1) ? t(0) : octave_value (t, true); // We handled two index elements, so tell // next_subsref to skip both of them. @@ -145,7 +145,7 @@ { octave_value_list t = dotref (idx.front ()); - retval = (t.length () == 1) ? t(0) : octave_value (t); + retval = (t.length () == 1) ? t(0) : octave_value (t, true); } break; @@ -422,7 +422,7 @@ std::string key = map.key (p); octave_value_list val = map.contents (p); - octave_value tmp = (n == 1) ? val(0) : octave_value (val); + octave_value tmp = (n == 1) ? val(0) : octave_value (val, true); if (print_keys_only) {