Mercurial > octave
comparison src/input.cc @ 2348:a88c5cc51f62
[project @ 1996-07-25 09:54:40 by jwe]
author | jwe |
---|---|
date | Thu, 25 Jul 1996 09:54:41 +0000 |
parents | b2f6b8a0992d |
children | dd29ab8af9e7 |
comparison
equal
deleted
inserted
replaced
2347:b360ae77cd49 | 2348:a88c5cc51f62 |
---|---|
721 if (text && *text && *text != '.' && strrchr (text, '.')) | 721 if (text && *text && *text != '.' && strrchr (text, '.')) |
722 names = generate_struct_completions (text, prefix, hint); | 722 names = generate_struct_completions (text, prefix, hint); |
723 else | 723 else |
724 names = make_name_list (); | 724 names = make_name_list (); |
725 | 725 |
726 names.qsort (); | |
727 | |
728 // Remove duplicates. | |
729 | |
730 // XXX FIXME XXX -- maybe this should be defined for all Array objects. | |
731 | |
732 int k = 0; | |
733 | |
734 int len = names.length (); | |
735 | |
736 for (int i = 1; i < len; i++) | |
737 { | |
738 if (names[i] != names[k]) | |
739 { | |
740 k++; | |
741 | |
742 if (k != i) | |
743 names[k] = names[i]; | |
744 } | |
745 } | |
746 | |
747 names.resize (k+1); | |
748 | |
726 return names; | 749 return names; |
727 } | 750 } |
728 | 751 |
729 static int | 752 static int |
730 looks_like_struct (const char *nm) | 753 looks_like_struct (const char *nm) |