Mercurial > hg > octave-nkf
changeset 16319:54c4b4b58a24
maint: merge away extra head on default
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 15 Mar 2013 14:52:02 -0400 |
parents | eb572251b7c6 (current diff) d81ef5e64cf1 (diff) |
children | 09f0cb9cac7d |
files | |
diffstat | 1 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/interpfcn/graphics.cc +++ b/libinterp/interpfcn/graphics.cc @@ -1789,9 +1789,9 @@ bool remove = false; if (val.is_string ()) { - caseless_str tval = val.string_value (); - - remove = tval.compare ("remove"); + std::string tval = val.string_value (); + + remove = (tval.compare ("remove") == 0); } pval_map_type& pval_map = plist_map[pfx]; @@ -2105,11 +2105,11 @@ { if (val.is_string ()) { - caseless_str tval = val.string_value (); + std::string tval = val.string_value (); octave_value default_val; - if (tval.compare ("default")) + if (tval.compare ("default") == 0) { default_val = get_default (name); @@ -2118,7 +2118,7 @@ rep->set (name, default_val); } - else if (tval.compare ("factory")) + else if (tval.compare ("factory") == 0) { default_val = get_factory_default (name); @@ -2128,7 +2128,15 @@ rep->set (name, default_val); } else - rep->set (name, val); + { + // Matlab specifically uses "\default" to escape string setting + if (tval.compare ("\\default") == 0) + rep->set (name, "default"); + else if (tval.compare ("\\factory") == 0) + rep->set (name, "factory"); + else + rep->set (name, val); + } } else rep->set (name, val);