Mercurial > hg > octave-lyh
comparison src/help.cc @ 10500:8f27f368aba2
fix generating names for TAB completion
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 08 Apr 2010 14:37:19 -0400 |
parents | 57a59eae83cc |
children | 89f4d7e294cc |
comparison
equal
deleted
inserted
replaced
10499:fabed15083a4 | 10500:8f27f368aba2 |
---|---|
545 const int key_len = keyword_names.length (); | 545 const int key_len = keyword_names.length (); |
546 | 546 |
547 const string_vector bif = symbol_table::built_in_function_names (); | 547 const string_vector bif = symbol_table::built_in_function_names (); |
548 const int bif_len = bif.length (); | 548 const int bif_len = bif.length (); |
549 | 549 |
550 // FIXME -- is this really necessary here? | 550 const string_vector lcl = symbol_table::variable_names (); |
551 const string_vector glb = symbol_table::global_variable_names (); | |
552 const int glb_len = glb.length (); | |
553 | |
554 // FIXME -- is this really necessary here? | |
555 const string_vector top = symbol_table::top_level_variable_names (); | |
556 const int top_len = top.length (); | |
557 | |
558 string_vector lcl; | |
559 if (! symbol_table::at_top_level ()) | |
560 lcl = symbol_table::variable_names (); | |
561 const int lcl_len = lcl.length (); | 551 const int lcl_len = lcl.length (); |
562 | 552 |
563 const string_vector ffl = load_path::fcn_names (); | 553 const string_vector ffl = load_path::fcn_names (); |
564 const int ffl_len = ffl.length (); | 554 const int ffl_len = ffl.length (); |
565 | 555 |
566 const string_vector afl = autoloaded_functions (); | 556 const string_vector afl = autoloaded_functions (); |
567 const int afl_len = afl.length (); | 557 const int afl_len = afl.length (); |
568 | 558 |
569 const int total_len = key_len + bif_len + glb_len + top_len + lcl_len | 559 const int total_len = key_len + bif_len + lcl_len + ffl_len + afl_len; |
570 + ffl_len + afl_len; | |
571 | 560 |
572 string_vector list (total_len); | 561 string_vector list (total_len); |
573 | 562 |
574 // Put all the symbols in one big list. | 563 // Put all the symbols in one big list. |
575 | 564 |
578 for (i = 0; i < key_len; i++) | 567 for (i = 0; i < key_len; i++) |
579 list[j++] = keyword_names[i]; | 568 list[j++] = keyword_names[i]; |
580 | 569 |
581 for (i = 0; i < bif_len; i++) | 570 for (i = 0; i < bif_len; i++) |
582 list[j++] = bif[i]; | 571 list[j++] = bif[i]; |
583 | |
584 for (i = 0; i < glb_len; i++) | |
585 list[j++] = glb[i]; | |
586 | |
587 for (i = 0; i < top_len; i++) | |
588 list[j++] = top[i]; | |
589 | 572 |
590 for (i = 0; i < lcl_len; i++) | 573 for (i = 0; i < lcl_len; i++) |
591 list[j++] = lcl[i]; | 574 list[j++] = lcl[i]; |
592 | 575 |
593 for (i = 0; i < ffl_len; i++) | 576 for (i = 0; i < ffl_len; i++) |