Mercurial > hg > octave-max
changeset 2348:a88c5cc51f62
[project @ 1996-07-25 09:54:40 by jwe]
author | jwe |
---|---|
date | Thu, 25 Jul 1996 09:54:41 +0000 |
parents | b360ae77cd49 |
children | b369227ce3d2 |
files | src/ChangeLog src/input.cc |
diffstat | 2 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ Thu Jul 25 01:42:38 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + * input.cc (generate_possible_completions): Force the names to be + unique. + * load-save.cc (read_mat_binary_data): Expect to read terminating NUL character in the variable name. (save_mat_binary_data): Likewise, save it here.
--- a/src/input.cc +++ b/src/input.cc @@ -723,6 +723,29 @@ else names = make_name_list (); + names.qsort (); + + // Remove duplicates. + + // XXX FIXME XXX -- maybe this should be defined for all Array objects. + + int k = 0; + + int len = names.length (); + + for (int i = 1; i < len; i++) + { + if (names[i] != names[k]) + { + k++; + + if (k != i) + names[k] = names[i]; + } + } + + names.resize (k+1); + return names; }