# HG changeset patch # User John W. Eaton # Date 1285840800 14400 # Node ID e678346a47d94855f59489bb4dc75232d5e0c817 # Parent 9bf6c927c2675449d85b7b7ec2c8a736c51c1e37 toplev.cc, sighandlers.cc, utils.cc, octave.cc, pt-eval.cc pt-idx.cc: Octave_map to octave_map and octave_scalar_map conversion diff -r 9bf6c927c267 -r e678346a47d9 src/ChangeLog --- a/src/ChangeLog Thu Sep 30 05:30:28 2010 -0400 +++ b/src/ChangeLog Thu Sep 30 06:00:00 2010 -0400 @@ -1,3 +1,14 @@ +2010-09-30 John W. Eaton + + * toplev.cc (octave_config_info): Use Octave_scalar_map instead + of Octave_map. + * sighandlers.cc (make_sig_struct, FSIG): Likewise. + + * utils.cc (decode_subscripts): Use octave_map instead of Octave_map. + * octave.cc (F__version_info__): Likewise. + * pt-eval.cc (visit_complex_for_command): Likewise. + * pt-idx.cc (tree_index_expression::lvalue): Likewise. + 2010-09-30 John W. Eaton * DLD-FUNCTIONS/gcd.cc: Style fixes. diff -r 9bf6c927c267 -r e678346a47d9 src/octave.cc --- a/src/octave.cc Thu Sep 30 05:30:28 2010 -0400 +++ b/src/octave.cc Thu Sep 30 06:00:00 2010 -0400 @@ -227,7 +227,7 @@ { octave_value retval; - static Octave_map vinfo; + static octave_map vinfo; int nargin = args.length (); diff -r 9bf6c927c267 -r e678346a47d9 src/pt-eval.cc --- a/src/pt-eval.cc Thu Sep 30 05:30:28 2010 -0400 +++ b/src/pt-eval.cc Thu Sep 30 06:00:00 2010 -0400 @@ -451,7 +451,7 @@ octave_lvalue key_ref = elt->lvalue (); - const Octave_map tmp_val = rhs.map_value (); + const octave_map tmp_val = rhs.map_value (); tree_statement_list *loop_body = cmd.body (); diff -r 9bf6c927c267 -r e678346a47d9 src/pt-idx.cc --- a/src/pt-idx.cc Thu Sep 30 05:30:28 2010 -0400 +++ b/src/pt-idx.cc Thu Sep 30 06:00:00 2010 -0400 @@ -535,10 +535,10 @@ if (pidx.has_magic_colon ()) gripe_invalid_inquiry_subscript (); else - tmp = Octave_map (); + tmp = octave_scalar_map (); } else if (autoconv) - tmp = Octave_map (); + tmp = octave_scalar_map (); retval.numel (tmp.numel (pidx)); diff -r 9bf6c927c267 -r e678346a47d9 src/sighandlers.cc --- a/src/sighandlers.cc Thu Sep 30 05:30:28 2010 -0400 +++ b/src/sighandlers.cc Thu Sep 30 06:00:00 2010 -0400 @@ -662,10 +662,10 @@ } -static Octave_map +static octave_scalar_map make_sig_struct (void) { - Octave_map m; + octave_scalar_map m; #ifdef SIGABRT m.assign ("ABRT", SIGABRT); @@ -949,7 +949,7 @@ if (args.length () == 0) { - static Octave_map m = make_sig_struct (); + static octave_scalar_map m = make_sig_struct (); retval = m; } diff -r 9bf6c927c267 -r e678346a47d9 src/toplev.cc --- a/src/toplev.cc Thu Sep 30 05:30:28 2010 -0400 +++ b/src/toplev.cc Thu Sep 30 06:00:00 2010 -0400 @@ -1160,7 +1160,7 @@ #endif static bool initialized = false; - static Octave_map m; + static octave_scalar_map m; struct conf_info_struct { @@ -1361,9 +1361,9 @@ if (key) { if (elt.subst_home) - m.assign (key, octave_value (subst_octave_home (elt.val))); + m.assign (key, subst_octave_home (elt.val)); else - m.assign (key, octave_value (elt.val)); + m.assign (key, elt.val); } else break; diff -r 9bf6c927c267 -r e678346a47d9 src/utils.cc --- a/src/utils.cc Thu Sep 30 05:30:28 2010 -0400 +++ b/src/utils.cc Thu Sep 30 06:00:00 2010 -0400 @@ -1036,17 +1036,19 @@ std::string& type_string, std::list& idx) { - Octave_map m = arg.map_value (); + const octave_map m = arg.map_value (); if (! error_state && m.nfields () == 2 && m.contains ("type") && m.contains ("subs")) { - Cell& type = m.contents ("type"); - Cell& subs = m.contents ("subs"); + const Cell type = m.contents ("type"); + const Cell subs = m.contents ("subs"); - type_string = std::string (type.length(), '\0'); + octave_idx_type nel = type.numel (); - for (int k = 0; k < type.length (); k++) + type_string = std::string (nel, '\0'); + + for (int k = 0; k < nel; k++) { std::string item = type(k).string_value ();