diff src/utils.cc @ 4249:8a1ef8fe4036

[project @ 2002-12-31 04:42:32 by jwe]
author jwe
date Tue, 31 Dec 2002 04:42:33 +0000
parents 7e4d5b5520e5
children df5f2e433a11
line wrap: on
line diff
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -314,7 +314,7 @@
 	      if (! error_state && opt == "all")
 		retval = Cell (make_absolute (Vload_path_dir_path.find_all_first_of (names)));
 	      else
-		print_usage ("file_in_loadpath: invalid option");
+		error ("file_in_loadpath: invalid option");
 	    }
 	}
       else
@@ -348,6 +348,7 @@
 If the third optional argument @code{\"all\"} is supplied, return\n\
 a cell array containing the list of all files that have the same\n\
 name in the path.  If no files are found, return an empty cell array.\n\
+@seealso{file_in_loadpath}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -360,7 +361,7 @@
 
       if (! error_state)
 	{
-	  string_vector names = args(0).all_strings ();
+	  string_vector names = args(1).all_strings ();
 
 	  if (! error_state && names.length () > 0)
 	    {
@@ -375,12 +376,12 @@
 		}
 	      else if (nargin == 3)
 		{
-		  std::string opt = args(1).string_value ();
+		  std::string opt = args(2).string_value ();
 
 		  if (! error_state && opt == "all")
 		    retval = Cell (make_absolute (search_path_for_all_files (path, names)));
 		  else
-		    print_usage ("file_in_path: invalid option");
+		    error ("file_in_path: invalid option");
 		}
 	    }
 	  else