comparison src/help.cc @ 1787:ebc1a0b2e854

[project @ 1996-01-24 20:37:52 by jwe]
author jwe
date Wed, 24 Jan 1996 20:38:43 +0000
parents e090f89bf2f5
children 72b1c55692a2
comparison
equal deleted inserted replaced
1786:b9e8c73e154e 1787:ebc1a0b2e854
479 // Also need to list variables and currently compiled functions from 479 // Also need to list variables and currently compiled functions from
480 // the symbol table, if there are any. 480 // the symbol table, if there are any.
481 481
482 // Also need to search octave_path for script files. 482 // Also need to search octave_path for script files.
483 483
484 char *path_elt = kpse_path_element (user_pref.loadpath.c_str ()); 484 dir_path p (user_pref.loadpath);
485 485
486 while (path_elt) 486 string_vector dirs = p.all_directories ();
487 { 487
488 str_llist_type *elt_dirs = kpse_element_dirs (path_elt); 488 int len = dirs.length ();
489 489
490 str_llist_elt_type *dir; 490 for (int i = 0; i < len; i++)
491 for (dir = *elt_dirs; dir; dir = STR_LLIST_NEXT (*dir)) 491 {
492 { 492 string_vector names = get_fcn_file_names (dirs[i]);
493 char *elt_dir = STR_LLIST (*dir); 493
494 494 if (! names.empty ())
495 if (elt_dir) 495 {
496 { 496 output_buf << "\n*** function files in "
497 string_vector names = get_fcn_file_names (elt_dir); 497 << make_absolute (dirs[i], the_current_working_directory)
498 498 << ":\n\n";
499 output_buf << "\n*** function files in " 499
500 << make_absolute (elt_dir, the_current_working_directory) 500 list_in_columns (output_buf, names);
501 << ":\n\n"; 501 }
502
503 if (names.length () > 0)
504 list_in_columns (output_buf, names);
505 }
506 }
507
508 path_elt = kpse_path_element (0);
509 } 502 }
510 503
511 additional_help_message (output_buf); 504 additional_help_message (output_buf);
512 output_buf << ends; 505 output_buf << ends;
513 maybe_page_output (output_buf); 506 maybe_page_output (output_buf);