# HG changeset patch # User Jaroslav Hajek # Date 1289768480 -3600 # Node ID 6cd1e62b6616efee11a4e5ade26e711418e4f04c # Parent ab1f780b67582fd2a1a7895ef86dadf26da183ef fix internal sorting in __all_opts__ (bug 31392) diff -r ab1f780b6758 -r 6cd1e62b6616 scripts/ChangeLog --- a/scripts/ChangeLog Sat Nov 13 01:29:10 2010 -0500 +++ b/scripts/ChangeLog Sun Nov 14 22:01:20 2010 +0100 @@ -1,3 +1,8 @@ +2010-11-14 Jaroslav Hajek + + * optimization/__all_opts__.m: Ensure that the array is always + case-insensitively sorted. + 2010-11-13 John W. Eaton * plot/gnuplot_drawnow.m (have_non_legend_axes): New function. diff -r ab1f780b6758 -r 6cd1e62b6616 scripts/optimization/__all_opts__.m --- a/scripts/optimization/__all_opts__.m Sat Nov 13 01:29:10 2010 -0500 +++ b/scripts/optimization/__all_opts__.m Sun Nov 14 22:01:20 2010 +0100 @@ -54,10 +54,12 @@ end_try_catch endfor names = unique (names); - lnames = unique (tolower (names)); + [lnames, idx] = unique (tolower (names)); if (length (lnames) < length (names)) ## This is bad. error ("__all_opts__: duplicate options with inconsistent case"); + else + names = names(idx); endif saved_names = names; recursive = false;