Mercurial > hg > octave-shane
changeset 11407:ed827ffa5a43
optimset, optimget, __all_opts__: consistently use lower case for storing and searching options
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 22 Dec 2010 04:16:01 -0500 |
parents | a7e73f903ea6 |
children | 6154672afa9a |
files | scripts/ChangeLog scripts/optimization/optimget.m scripts/optimization/optimset.m |
diffstat | 3 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2010-12-22 John W. Eaton <jwe@octave.org> + + * optimization/optimset.m, optimization/optimget.m, + optimization/__all_opts__.m: Consistently use lower case for + storing and searching option names. + 2010-12-22 John W. Eaton <jwe@octave.org> * statistics/base/skewness.m: Make returned value have the same
--- a/scripts/optimization/optimget.m +++ b/scripts/optimization/optimget.m @@ -33,7 +33,7 @@ endif opts = __all_opts__ (); - idx = lookup (toupper(opts), toupper(parname), "m"); + idx = lookup (tolower (opts), tolower (parname), "m"); if (idx) parname = opts{idx};
--- a/scripts/optimization/optimset.m +++ b/scripts/optimization/optimset.m @@ -47,7 +47,7 @@ ## Return defaults for named function. fcn = varargin{1}; try - retval = feval (fcn, 'defaults'); + retval = feval (fcn, "defaults"); catch error ("optimset: no defaults for function `%s'", fcn); end_try_catch @@ -59,11 +59,11 @@ fnames = fieldnames (old); ## skip validation if we're in the internal query validation = ! isempty (opts); - uopts = toupper(opts); + lopts = tolower (opts); for [val, key] = new if (validation) ## Case insensitive lookup in all options. - i = lookup (uopts, toupper(key), "i"); + i = lookup (lopts, tolower (key), "i"); ## Validate option. if (i > 0 && strcmpi (opts{i}, key)) ## Use correct case.