diff 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
line wrap: on
line diff
--- a/src/help.cc
+++ b/src/help.cc
@@ -481,31 +481,24 @@
 
   // Also need to search octave_path for script files.
 
-  char *path_elt = kpse_path_element (user_pref.loadpath.c_str ());
+  dir_path p (user_pref.loadpath);
 
-  while (path_elt)
-    {
-      str_llist_type *elt_dirs = kpse_element_dirs (path_elt);
+  string_vector dirs = p.all_directories ();
 
-      str_llist_elt_type *dir;
-      for (dir = *elt_dirs; dir; dir = STR_LLIST_NEXT (*dir))
-	{
-	  char *elt_dir = STR_LLIST (*dir);
+  int len = dirs.length ();
 
-	  if (elt_dir)
-	    {
-	      string_vector names = get_fcn_file_names (elt_dir);
+  for (int i = 0; i < len; i++)
+    {
+      string_vector names = get_fcn_file_names (dirs[i]);
 
-	      output_buf << "\n*** function files in "
-		<< make_absolute (elt_dir, the_current_working_directory)
-		  << ":\n\n";
+      if (! names.empty ())
+	{
+	  output_buf << "\n*** function files in "
+		     << make_absolute (dirs[i], the_current_working_directory)
+		     << ":\n\n";
 
-	      if (names.length () > 0)
-		list_in_columns (output_buf, names);
-	    }
+	  list_in_columns (output_buf, names);
 	}
-
-      path_elt = kpse_path_element (0);
     }
 
   additional_help_message (output_buf);