diff src/parse.y @ 5832:5e41e06f6a78

[project @ 2006-05-26 21:41:32 by jwe]
author jwe
date Fri, 26 May 2006 21:42:22 +0000
parents 080c08b192d8
children fb4dea2184bf
line wrap: on
line diff
--- a/src/parse.y
+++ b/src/parse.y
@@ -60,6 +60,7 @@
 #include "error.h"
 #include "input.h"
 #include "lex.h"
+#include "load-path.h"
 #include "oct-hist.h"
 #include "oct-map.h"
 #include "ov-fcn-handle.h"
@@ -3350,7 +3351,7 @@
   am_iter p = autoload_map.find (nm);
 
   if (p != autoload_map.end ())
-    retval = octave_env::make_absolute (Vload_path_dir_path.find (p->second),
+    retval = octave_env::make_absolute (load_path::find_file (p->second),
 					octave_env::getcwd ());
 
   return retval;
@@ -3413,13 +3414,8 @@
 	  exec_script = true;
 	}
       else
-	{
-	  names[0] = nm + ".oct";
-	  names[1] = nm + ".m";
-
-	  file = octave_env::make_absolute (Vload_path_dir_path.find_first_of (names),
-					    octave_env::getcwd ());
-	}
+	file = octave_env::make_absolute
+	  (load_path::find_fcn (nm), octave_env::getcwd ());
     }
 
   int len = file.length ();