comparison src/oct-parse.yy @ 11136:a51ac4198e1c

oct-parse.yy (load_fcn_from_file): also strip directory when computing function name from filename
author John W. Eaton <jwe@octave.org>
date Fri, 22 Oct 2010 04:24:11 -0400
parents 5677f3f7b5fa
children 40206fe759db
comparison
equal deleted inserted replaced
11135:047b0e877a14 11136:a51ac4198e1c
3719 || (nm_len > 4 && nm.substr (nm_len-4) == ".mex") 3719 || (nm_len > 4 && nm.substr (nm_len-4) == ".mex")
3720 || (nm_len > 2 && nm.substr (nm_len-2) == ".m")) 3720 || (nm_len > 2 && nm.substr (nm_len-2) == ".m"))
3721 { 3721 {
3722 nm = octave_env::base_pathname (file); 3722 nm = octave_env::base_pathname (file);
3723 nm = nm.substr (0, nm.find_last_of ('.')); 3723 nm = nm.substr (0, nm.find_last_of ('.'));
3724
3725 size_t pos = nm.find_last_of (file_ops::dir_sep_str ());
3726 if (pos != std::string::npos)
3727 nm = nm.substr (pos+1pp);
3724 } 3728 }
3725 3729
3726 if (autoload) 3730 if (autoload)
3727 { 3731 {
3728 frame.protect_var (autoloading); 3732 frame.protect_var (autoloading);