Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
5831:b0d4ff99a0c5 | 5832:5e41e06f6a78 |
---|---|
58 #include "dirfns.h" | 58 #include "dirfns.h" |
59 #include "dynamic-ld.h" | 59 #include "dynamic-ld.h" |
60 #include "error.h" | 60 #include "error.h" |
61 #include "input.h" | 61 #include "input.h" |
62 #include "lex.h" | 62 #include "lex.h" |
63 #include "load-path.h" | |
63 #include "oct-hist.h" | 64 #include "oct-hist.h" |
64 #include "oct-map.h" | 65 #include "oct-map.h" |
65 #include "ov-fcn-handle.h" | 66 #include "ov-fcn-handle.h" |
66 #include "ov-usr-fcn.h" | 67 #include "ov-usr-fcn.h" |
67 #include "toplev.h" | 68 #include "toplev.h" |
3348 typedef std::map<std::string, std::string>::const_iterator am_iter; | 3349 typedef std::map<std::string, std::string>::const_iterator am_iter; |
3349 | 3350 |
3350 am_iter p = autoload_map.find (nm); | 3351 am_iter p = autoload_map.find (nm); |
3351 | 3352 |
3352 if (p != autoload_map.end ()) | 3353 if (p != autoload_map.end ()) |
3353 retval = octave_env::make_absolute (Vload_path_dir_path.find (p->second), | 3354 retval = octave_env::make_absolute (load_path::find_file (p->second), |
3354 octave_env::getcwd ()); | 3355 octave_env::getcwd ()); |
3355 | 3356 |
3356 return retval; | 3357 return retval; |
3357 } | 3358 } |
3358 | 3359 |
3411 | 3412 |
3412 autoloading = true; | 3413 autoloading = true; |
3413 exec_script = true; | 3414 exec_script = true; |
3414 } | 3415 } |
3415 else | 3416 else |
3416 { | 3417 file = octave_env::make_absolute |
3417 names[0] = nm + ".oct"; | 3418 (load_path::find_fcn (nm), octave_env::getcwd ()); |
3418 names[1] = nm + ".m"; | |
3419 | |
3420 file = octave_env::make_absolute (Vload_path_dir_path.find_first_of (names), | |
3421 octave_env::getcwd ()); | |
3422 } | |
3423 } | 3419 } |
3424 | 3420 |
3425 int len = file.length (); | 3421 int len = file.length (); |
3426 | 3422 |
3427 if (len > 4 && file.substr (len-4, len-1) == ".oct") | 3423 if (len > 4 && file.substr (len-4, len-1) == ".oct") |