26 #if defined (HAVE_CONFIG_H)
63 if (canonical_dir.empty ())
69 if (! is_absolute_path)
74 if (dir.compare (0, cwd.length (), cwd) == 0)
75 dir.erase (0, cwd.length ()+1);
98 static std::list<std::string>
101 std::list<std::string>
retval;
106 size_t len = p.length ();
108 while (end != std::string::npos)
110 std::string elt = p.substr (beg, end-beg);
123 std::string elt = p.substr (beg);
136 std::string dir = dir_arg;
138 size_t k = dir.length ();
143 if (k < dir.length ())
170 std::string dir_name = curr_code->
dir_name ();
172 if (! dir_name.empty ())
193 size_t ps =
path.size ();
194 size_t pls = path_list.size ();
195 size_t pos = path_list.find (
path);
197 while (pos != std::string::npos)
199 if ((pos == 0 || path_list[pos-1] == psc)
200 && (pos + ps == pls || path_list[pos + ps] == psc))
203 pos = path_list.find (
path, pos + 1);
231 : m_interpreter (interp), package_map (), top_level_package (),
232 dir_info_list (), init_dirs (), m_command_line_path (),
233 add_hook ([this] (const std::string& dir) { this->
execute_pkg_add (dir); }),
234 remove_hook ([
this] (
const std::string& dir) { this->
execute_pkg_del (dir); })
242 if (set_initial_path)
262 if (! tpath.empty ())
272 set (xpath,
false,
true);
291 for (
auto& elt : elts)
295 std::set<std::string> elts_set (elts.begin (), elts.end ());
303 if (elts_set.find (init_dir) == elts_set.end ())
306 "default load path altered. Some built-in functions may not be found. Try restoredefaultpath() to recover it.");
321 for (
const auto& elt : elts)
343 add (dir,
true, warn);
350 add (dir,
false, warn);
358 if (! dir_arg.empty ())
362 warning (R
"(rmpath: can't remove "." from path)");
407 bool ok = di.update ();
410 warning (
"load-path: update failed for '%s', removing from path",
411 di.dir_name.c_str ());
413 add (di,
true,
"",
true);
436 const std::string& dir)
439 bool addpath_option =
true;
450 std::string base_file = (file.length () > dir.length ())
451 ? file.substr (dir.length () + 1)
454 std::string lp_file =
find_file (base_file);
456 if (dir_in_load_path)
474 addpath_option =
false;
508 std::list<std::string>
511 std::list<std::string>
retval;
518 nm_ldr.second.overloads (meth,
retval);
523 std::list<std::string>
526 std::list<std::string>
retval;
530 if (! only_top_level || dir_ldr.first.find (
'.') == std::string::npos)
531 retval.push_back (dir_ldr.first);
553 if (! tfile.empty ())
558 != std::string::npos)
583 if (all_files[i] == file)
611 std::string dname = di.abs_dir_name;
613 size_t dname_len = dname.length ();
615 if (dname.substr (dname_len - 1)
618 dname = dname.substr (0, dname_len - 1);
622 size_t dir_len = canon_dir.length ();
624 if (dname_len > dir_len
626 && canon_dir == dname.substr (dname_len - dir_len))
631 return di.abs_dir_name;
642 std::list<std::string> retlist;
651 retlist.push_back (dir);
658 std::string dname = di.abs_dir_name;
660 size_t dname_len = dname.length ();
662 if (dname.substr (dname_len - 1)
665 dname = dname.substr (0, dname_len - 1);
669 size_t dir_len = canon_dir.length ();
671 if (dname_len > dir_len
673 && canon_dir == dname.substr (dname_len - dir_len))
678 retlist.push_back (di.abs_dir_name);
691 std::string dir_name;
692 std::string file_name;
701 std::string file = flist[i];
704 != std::string::npos)
729 rel_flist[rel_flen++] = file;
732 rel_flist.
resize (rel_flen);
744 if (all_files[i] == rel_flist[j])
746 dir_name = di.abs_dir_name;
747 file_name = rel_flist[j];
757 if (! dir_name.empty ())
766 std::list<std::string> retlist;
768 std::string dir_name;
769 std::string file_name;
778 std::string file = flist[i];
781 != std::string::npos)
789 retlist.push_back (file);
801 retlist.push_back (tfile);
806 rel_flist[rel_flen++] = file;
809 rel_flist.
resize (rel_flen);
821 if (all_files[i] == rel_flist[j])
841 retval[k++] = di.dir_name;
846 std::list<std::string>
849 std::list<std::string>
retval;
852 retval.push_back (di.dir_name);
873 std::string fname =
retval[i];
875 size_t pos = fname.rfind (
'.');
877 if (pos != std::string::npos)
878 retval[i] = fname.substr (0, pos);
916 if (! fcn_files.
empty ())
918 os <<
"\n*** function files in " << di.dir_name <<
":\n\n";
924 = di.method_file_map;
926 if (! method_file_map.empty ())
928 for (
const auto& cls_ci : method_file_map)
930 os <<
"\n*** methods in " << di.dir_name
931 <<
"/@" << cls_ci.first <<
":\n\n";
945 nm_ldr.second.display (os);
961 const std::string& script_file)
989 if (
retval->dir_name == dir)
1009 if (
retval->dir_name == dir)
1047 l.
move (di, at_end);
1051 for (
const auto& pkg_di : package_dir_map)
1053 std::string full_name = pkg_di.first;
1055 if (! pname.empty ())
1056 full_name = pname +
'.' + full_name;
1058 move (pkg_di.second, at_end, full_name);
1065 size_t len = dir_arg.length ();
1067 if (
len > 1 && dir_arg.substr (
len-2) ==
"//")
1069 "trailing '//' is no longer special in search path elements");
1102 warning (
"addpath: %s: not a directory", dir_arg.c_str ());
1106 std::string msg = fs.
error ();
1107 warning (
"addpath: %s: %s", dir_arg.c_str (), msg.c_str ());
1128 for (
const auto& pkg_di : package_dir_map)
1130 std::string full_name = pkg_di.first;
1132 if (! pname.empty ())
1133 full_name = pname +
'.' + full_name;
1135 remove (pkg_di.second, full_name);
1144 if (di.is_package (
name))
1153 const std::string& pname,
bool updating)
const
1157 l.
add (di, at_end, updating);
1161 for (
const auto& pkg_di : package_dir_map)
1163 std::string full_name = pkg_di.first;
1165 if (! pname.empty ())
1166 full_name = pname +
'.' + full_name;
1168 add (pkg_di.second, at_end, full_name);
1181 for (
const auto& nm_typ : lst)
1183 std::string nm = nm_typ.first;
1185 int types = nm_typ.second;
1209 warning (
"load_path: %s: %s",
d.c_str (), msg.c_str ());
1216 std::string fname = flist[i];
1218 size_t pos = fname.rfind (
'.');
1220 if (pos != std::string::npos)
1222 std::string base = fname.substr (0, pos);
1223 std::string ext = fname.substr (pos);
1231 else if (ext ==
".oct")
1233 else if (ext ==
".mex")
1261 std::string msg = fs.
error ();
1267 bool has_private_dir = pfs && pfs.
is_dir ();
1336 size_t pos =
name.find (
'.');
1338 if (pos == std::string::npos)
1339 return package_dir_map.find (
name) != package_dir_map.end ();
1342 std::string name_head =
name.substr (0, pos);
1343 std::string name_tail =
name.substr (pos + 1);
1347 if (it != package_dir_map.end ())
1348 return it->second.is_package (name_tail);
1359 dir_time_last_checked =
sys::time (
static_cast<time_t
> (0));
1365 method_file_map.clear ();
1366 package_dir_map.clear ();
1368 dir_mtime = fs.
mtime ();
1396 std::string msg = fs.
error ();
1397 warning (
"load_path: %s: %s", dir_name.c_str (), msg.c_str ());
1409 warning (
"load_path: %s: %s",
d.c_str (), msg.c_str ());
1415 all_files.resize (
len);
1416 fcn_files.resize (
len);
1423 std::string fname = flist[i];
1433 if (fname ==
"private")
1434 get_private_file_map (full_name);
1435 else if (fname[0] ==
'@')
1436 get_method_file_map (full_name, fname.substr (1));
1437 else if (fname[0] ==
'+')
1438 get_package_dir (full_name, fname.substr (1));
1442 all_files[all_files_count++] = fname;
1444 size_t pos = fname.rfind (
'.');
1446 if (pos != std::string::npos)
1448 std::string ext = fname.substr (pos);
1450 if (ext ==
".m" || ext ==
".oct" || ext ==
".mex")
1452 std::string base = fname.substr (0, pos);
1455 fcn_files[fcn_files_count++] = fname;
1462 all_files.resize (all_files_count);
1463 fcn_files.resize (fcn_files_count);
1474 const std::string& class_name)
1483 method_file_map[class_name].private_file_map =
get_fcn_files (pd);
1488 const std::string& package_name)
1490 package_dir_map[package_name] =
dir_info (
d);
1510 move_fcn_map (dir_name, di.
fcn_files, at_end);
1514 move_method_map (dir_name, at_end);
1526 remove_fcn_map (dir, fcn_files);
1528 remove_private_fcn_map (dir);
1530 remove_method_map (dir);
1536 os <<
"*** package_info: "
1537 << (m_package_name.empty () ?
"<top-level>" : m_package_name)
1544 for (
const auto& dir_fnlst : private_fcn_map)
1546 os <<
"\n*** private functions in "
1550 print_fcn_list (os, dir_fnlst.second);
1553 #if defined (DEBUG_LOAD_PATH)
1555 for (
const auto& nm_filst : fcn_map)
1557 os << nm_filst.first <<
":\n";
1561 for (
const auto& finfo : file_info_list)
1563 os <<
" " << finfo.dir_name <<
" (";
1565 print_types (os, finfo.types);
1571 for (
const auto& cls_fnmap : method_map)
1573 os <<
"CLASS " << cls_fnmap.first <<
":\n";
1577 for (
const auto& nm_fnlst : fcn_map)
1579 os <<
" " << nm_fnlst.first <<
":\n";
1583 for (
const auto& finfo : file_info_list)
1585 os <<
" " << finfo.dir_name <<
" (";
1587 print_types (os, finfo.types);
1601 std::string& dir_name,
1608 if (fcn.length () > 0 && fcn[0] ==
'@')
1610 size_t pos = fcn.
find (
'/');
1612 if (pos != std::string::npos)
1614 std::string class_name = fcn.substr (1, pos-1);
1615 std::string meth = fcn.substr (pos+1);
1628 if (p != fcn_map.end ())
1632 for (
const auto&
fi : file_info_list)
1637 fcn,
"load_path::find_fcn"))
1639 dir_name =
fi.dir_name;
1653 const std::string& fcn,
1662 if (q != private_fcn_map.end ())
1668 if (p != fcn_file_map.end ())
1673 if (check_file_type (fname,
type, p->second, fcn,
1674 "load_path::find_private_fcn"))
1684 const std::string& meth,
1685 std::string& dir_name,
1696 if (q != method_map.end ())
1706 for (
const auto&
fi : file_info_list)
1711 meth,
"load_path::find_method");
1715 dir_name =
fi.dir_name;
1727 std::list<std::string>
1730 std::list<std::string>
retval;
1736 if (mtd_map_it != method_map.end ())
1738 for (
const auto& nm_filst : mtd_map_it->second)
1739 retval.push_back (nm_filst.first);
1750 std::list<std::string>& l)
const
1752 for (
const auto& cls_fnmap : method_map)
1756 if (
m.find (meth) !=
m.end ())
1758 std::string class_name = cls_fnmap.first;
1760 if (! m_package_name.empty ())
1761 class_name = m_package_name +
'.' + class_name;
1763 l.push_back (class_name);
1771 size_t len = fcn_map.size ();
1777 for (
const auto& nm_filst : fcn_map)
1778 retval[count++] = nm_filst.first;
1785 bool at_end,
bool updating)
1795 std::string fname = fcn_files[i];
1798 std::string base = fname;
1800 size_t pos = fname.rfind (
'.');
1802 if (pos != std::string::npos)
1804 base = fname.substr (0, pos);
1805 ext = fname.substr (pos);
1810 auto p = file_info_list.begin ();
1812 while (p != file_info_list.end ())
1814 if (p->dir_name == dir_name)
1823 else if (ext ==
".oct")
1825 else if (ext ==
".mex")
1828 if (p == file_info_list.end ())
1835 if (file_info_list.empty ())
1845 "function %s shadows a built-in function",
1851 file_info& old = file_info_list.front ();
1860 if (fname !=
"Contents.m"
1867 "function %s shadows a core library function",
1876 file_info_list.push_back (
fi);
1878 file_info_list.push_front (
fi);
1894 if (! private_file_map.empty ())
1906 for (
const auto& cls_ci : method_file_map)
1908 std::string class_name = cls_ci.first;
1912 std::string full_dir_name
1920 for (
const auto& nm_typ :
m)
1922 std::string base = nm_typ.first;
1923 int types = nm_typ.second;
1927 auto p2 = file_info_list.begin ();
1928 while (p2 != file_info_list.end ())
1930 if (p2->dir_name == full_dir_name)
1936 if (p2 == file_info_list.end ())
1941 file_info_list.push_back (
fi);
1943 file_info_list.push_front (
fi);
1957 if (! private_file_map.empty ())
1958 private_fcn_map[full_dir_name] = private_file_map;
1970 std::string fname = fcn_files[k];
1973 std::string base = fname;
1975 size_t pos = fname.rfind (
'.');
1977 if (pos != std::string::npos)
1979 base = fname.substr (0, pos);
1980 ext = fname.substr (pos);
1985 if (file_info_list.size () == 1)
1989 for (
auto fi_it = file_info_list.begin ();
1990 fi_it != file_info_list.end ();
1993 if (fi_it->dir_name == dir_name)
1997 file_info_list.erase (fi_it);
2000 file_info_list.push_back (fi_tmp);
2002 file_info_list.push_front (fi_tmp);
2015 for (
auto& cls_fnmap : method_map)
2017 std::string class_name = cls_fnmap.first;
2021 std::string full_dir_name
2024 for (
auto& nm_filst : fn_map)
2028 if (file_info_list.size () == 1)
2032 for (
auto fi_it = file_info_list.begin ();
2033 fi_it != file_info_list.end (); fi_it++)
2035 if (fi_it->dir_name == full_dir_name)
2039 file_info_list.erase (fi_it);
2042 file_info_list.push_back (fi_tmp);
2044 file_info_list.push_front (fi_tmp);
2062 std::string fname = fcn_files[k];
2065 std::string base = fname;
2067 size_t pos = fname.rfind (
'.');
2069 if (pos != std::string::npos)
2071 base = fname.substr (0, pos);
2072 ext = fname.substr (pos);
2077 for (
auto fi_it = file_info_list.begin ();
2078 fi_it != file_info_list.end ();
2081 if (fi_it->dir_name == dir)
2083 file_info_list.erase (fi_it);
2085 if (file_info_list.empty ())
2086 fcn_map.erase (fname);
2097 auto p = private_fcn_map.find (dir);
2099 if (p != private_fcn_map.end ())
2100 private_fcn_map.erase (p);
2106 for (
auto& cls_fnmap : method_map)
2108 std::string class_name = cls_fnmap.first;
2112 std::string full_dir_name
2115 for (
auto& nm_filst : fn_map)
2119 if (file_info_list.size () == 1)
2123 for (
auto fi_it = file_info_list.begin ();
2124 fi_it != file_info_list.end (); fi_it++)
2126 if (fi_it->dir_name == full_dir_name)
2128 file_info_list.erase (fi_it);
2144 const std::string& fcn,
2145 const char *who)
const
2232 error (
"%s: %s: invalid type code = %d", who, fcn.c_str (),
type);
2240 bool printed_type =
false;
2245 printed_type =
true;
2253 printed_type =
true;
2261 printed_type =
true;
2269 for (
const auto& nm_typ : lst)
2271 os <<
" " << nm_typ.first <<
" (";
2273 print_types (os, nm_typ.second);
2291 dirlist = dirlist.
sort (
false);
2297 std::string elt = dirlist[i];
2299 bool skip_p = (elt ==
"." || elt ==
".." || elt[0] ==
'@'
2306 skip_p = (elt == skip[j]);
2342 int nargin = args.length ();
2351 std::string
dirname = args(0).xstring_value (
"genpath: DIR must be a string");
2357 std::string
dirname = args(0).xstring_value (
"genpath: all arguments must be strings");
2362 skip[i-1] = args(i).xstring_value (
"genpath: all arguments must be strings");
2381 DEFMETHOD (command_line_path, interp, args, ,
2389 if (! args.empty ())
2397 DEFMETHOD (restoredefaultpath, interp, args, ,
2405 if (! args.empty ())
2452 int nargin = args.length ();
2460 std::string
path = argv[1];
2462 for (
int i = 2; i <= nargin; i++)
2472 else if (nargin == 0 && nargout == 0)
2475 "\nOctave's search path contains the following directories:\n\n";
2487 DEFMETHOD (addpath, interp, args, nargout,
2521 int nargin = args.length ();
2533 bool append =
false;
2541 if (option ==
"-end")
2546 else if (option ==
"-begin")
2551 int val = option_arg.
xint_value (
"addpath: OPTION must be '-begin'/0 or '-end'/1");
2561 error (
"addpath: OPTION must be '-begin'/0 or '-end'/1");
2564 bool need_to_update =
false;
2570 for (
int i = 0; i < arglist.
length (); i++)
2572 std::string arg = arglist(i).xstring_value (
"addpath: all arguments must be strings");
2577 std::reverse (dir_elts.begin (), dir_elts.end ());
2579 for (
auto dir : dir_elts)
2582 auto it_start = dir.begin ();
2583 #if defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM)
2587 dir.erase (std::unique
2588 (it_start, dir.end (),
2591 return l == r && octave::sys::file_ops::is_dir_sep (l);
2596 if (pos == std::string::npos)
2598 if (! dir.empty () && dir[0] ==
'+')
2600 "addpath: package directories should not be "
2601 "added to path: %s\n", dir.c_str ());
2605 if (pos + 1 < dir.length () && dir[pos+1] ==
'+')
2607 "addpath: package directories should not be "
2608 "added to path: %s\n", dir.c_str ());
2616 need_to_update =
true;
2626 DEFMETHOD (rmpath, interp, args, nargout,
2648 int nargin = args.length ();
2660 bool need_to_update =
false;
2662 for (
int i = 0; i < nargin; i++)
2664 std::string arg = args(i).xstring_value (
"rmpath: all arguments must be strings");
2667 for (
const auto& dir : dir_elts)
2673 warning (
"rmpath: %s: not found", dir.c_str ());
2675 need_to_update =
true;
2685 DEFMETHOD (__dump_load_path__, interp, , ,
Array< T > sort(int dim=0, sortmode mode=ASCENDING) const
Size of the specified dimension.
octave_idx_type numel(void) const
Number of elements in the array.
Array< octave_idx_type > find(octave_idx_type n=-1, bool backward=false) const
Find indices of (at most n) nonzero elements.
static char path_sep_char(void)
static std::string path_sep_str(void)
Provides threadsafe access to octave.
int debug_cd_or_addpath_error(const std::string &file, const std::string &dir, bool addpath_option)
void update_path_dialog(void)
void recover_from_exception(void)
int chdir(const std::string &dir)
event_manager & get_event_manager(void)
void get_package_dir(const std::string &d, const std::string &package_name)
void get_private_file_map(const std::string &d)
package_dir_map_type package_dir_map
sys::time dir_time_last_checked
fcn_file_map_type private_file_map
fcn_file_map_type::const_iterator const_fcn_file_map_iterator
std::map< std::string, class_info > method_file_map_type
package_dir_map_type::const_iterator const_package_dir_map_iterator
void get_file_list(const std::string &d)
void get_method_file_map(const std::string &d, const std::string &class_name)
std::map< std::string, int > fcn_file_map_type
std::map< std::string, dir_info > package_dir_map_type
bool is_package(const std::string &name) const
fcn_file_map_type::iterator fcn_file_map_iterator
method_file_map_type method_file_map
void add_to_private_fcn_map(const dir_info &di)
std::string find_method(const std::string &class_name, const std::string &meth, std::string &dir_name, int type=M_FILE|OCT_FILE|MEX_FILE) const
bool check_file_type(std::string &fname, int type, int possible_types, const std::string &fcn, const char *who) const
void add_to_method_map(const dir_info &di, bool at_end)
void move(const dir_info &di, bool at_end)
void display(std::ostream &out) const
std::string find_private_fcn(const std::string &dir, const std::string &fcn, int type=M_FILE|OCT_FILE|MEX_FILE) const
void add(const dir_info &di, bool at_end, bool updating)
void print_types(std::ostream &os, int types) const
void remove_method_map(const std::string &dir)
void print_fcn_list(std::ostream &os, const dir_info::fcn_file_map_type &lst) const
void remove_fcn_map(const std::string &dir, const string_vector &fcn_files)
std::string find_fcn(const std::string &fcn, std::string &dir_name, int type=M_FILE|OCT_FILE|MEX_FILE) const
void remove_private_fcn_map(const std::string &dir)
string_vector fcn_names(void) const
void move_method_map(const std::string &dir, bool at_end)
void move_fcn_map(const std::string &dir, const string_vector &fcn_files, bool at_end)
void add_to_fcn_map(const dir_info &di, bool at_end, bool updating)
void overloads(const std::string &meth, std::list< std::string > &l) const
std::list< std::string > methods(const std::string &class_name) const
void remove(const dir_info &di)
abs_dir_cache_type::const_iterator const_abs_dir_cache_iterator
std::string find_first_of(const string_vector &files) const
void prepend(const std::string &dir, bool warn=false)
static std::string sys_path
std::string find_method(const std::string &class_name, const std::string &meth, std::string &dir_name, const std::string &pack_name="")
string_vector dirs(void) const
static const int MEX_FILE
std::string m_command_line_path
std::set< std::string > init_dirs
package_info & get_package(const std::string &name) const
void execute_pkg_del(const std::string &dir)
std::list< std::string > get_all_package_names(bool only_top_level=true) const
void initialize(bool set_initial_path=false)
string_vector find_all_first_of(const string_vector &files) const
void add(const std::string &dir, bool at_end, bool warn)
bool is_package(const std::string &name) const
string_vector files(const std::string &dir, bool omit_exts=false) const
bool contains_canonical(const std::string &dir_name) const
load_path(interpreter &interp)
std::string path(void) const
void move(dir_info_list_iterator i, bool at_end)
friend dir_info::fcn_file_map_type get_fcn_files(const std::string &d)
std::map< std::string, dir_info > abs_dir_cache_type
string_vector find_matching_dirs(const std::string &dir) const
string_vector get_file_list(const dir_info::fcn_file_map_type &lst) const
void execute_pkg_add_or_del(const std::string &dir, const std::string &script_file)
std::list< std::string > overloads(const std::string &meth) const
const_dir_info_list_iterator find_dir_info(const std::string &dir) const
std::map< std::string, file_info_list_type > fcn_map_type
private_fcn_map_type::const_iterator const_private_fcn_map_iterator
std::string system_path(void) const
bool contains_file_in_dir(const std::string &file_name, const std::string &dir_name)
dir_info_list_type dir_info_list
string_vector fcn_names(void) const
std::string get_command_line_path(void) const
bool remove(const std::string &dir)
std::list< std::string > dir_list(void) const
std::string find_dir(const std::string &dir) const
void display(std::ostream &os) const
static abs_dir_cache_type abs_dir_cache
dir_info_list_type::const_iterator const_dir_info_list_iterator
bool contains(const std::string &dir) const
dir_info_list_type::iterator dir_info_list_iterator
std::string find_file(const std::string &file) const
interpreter & m_interpreter
package_info top_level_package
void append(const std::string &dir, bool warn=false)
method_map_type::const_iterator const_method_map_iterator
static const int OCT_FILE
std::function< void(const std::string &)> add_hook
package_map_type package_map
fcn_map_type::const_iterator const_fcn_map_iterator
std::function< void(const std::string &)> remove_hook
void execute_pkg_add(const std::string &dir)
std::list< file_info > file_info_list_type
void set(const std::string &p, bool warn=false, bool is_init=false)
octave_user_code * user_code(void) const
bool is_built_in_function_name(const std::string &name)
sys::time mtime(void) const
std::string error(void) const
sys::time time_resolution(void) const
static bool rooted_relative_pathname(const std::string &s)
static std::string base_pathname(const std::string &s)
static std::string getenv(const std::string &name)
static bool absolute_pathname(const std::string &s)
static std::string get_current_directory(void)
std::string dir_name(void) const
octave_idx_type length(void) const
octave_value_list & reverse(void)
bool isnumeric(void) const
bool is_string(void) const
std::string string_value(bool force=false) const
int xint_value(const char *fmt,...) const
string_vector & sort(bool make_uniq=false)
void resize(octave_idx_type n, const std::string &rfv="")
std::ostream & list_in_columns(std::ostream &, int width=0, const std::string &prefix="") const
octave_idx_type numel(void) const
static octave_idx_type find(octave_idx_type i, octave_idx_type *pp)
OCTINTERP_API void print_usage(void)
#define DEFMETHOD(name, interp_name, args_name, nargout_name, doc)
Macro to define a builtin method.
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void warning(const char *fmt,...)
void warning_with_id(const char *id, const char *fmt,...)
void error(const char *fmt,...)
bool octave_interpreter_ready
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
std::string local_ver_oct_file_dir(void)
std::string local_fcn_file_dir(void)
std::string oct_data_dir(void)
std::string oct_file_dir(void)
std::string local_oct_file_dir(void)
std::string local_api_oct_file_dir(void)
std::string local_api_fcn_file_dir(void)
std::string fcn_file_dir(void)
std::string local_ver_fcn_file_dir(void)
std::string dirname(const std::string &path)
std::string dir_sep_str(void)
std::string tilde_expand(const std::string &name)
std::string concat(const std::string &dir, const std::string &file)
std::string dir_sep_chars(void)
std::string canonicalize_file_name(const std::string &name)
bool get_dirlist(const std::string &dirname, string_vector &dirlist, std::string &msg)
static std::string maybe_canonicalize(const std::string &dir_arg)
static bool in_path_list(const std::string &path_list, const std::string &path)
static std::string find_private_file(const std::string &fname)
bool valid_identifier(const char *s)
static std::string strip_trailing_separators(const std::string &dir_arg)
interpreter & __get_interpreter__(const std::string &who)
load_path::dir_info::fcn_file_map_type get_fcn_files(const std::string &d)
static void rehash_internal(void)
event_manager & __get_event_manager__(const std::string &who)
static void maybe_add_path_elts(std::string &path, const std::string &dir)
symbol_scope __get_current_scope__(const std::string &who)
symbol_table & __get_symbol_table__(const std::string &who)
void source_file(const std::string &file_name, const std::string &context, bool verbose, bool require_file)
bool same_file(const std::string &f, const std::string &g)
static std::list< std::string > split_path(const std::string &p)
std::string genpath(const std::string &dirname, const string_vector &skip)
load_path & __get_load_path__(const std::string &who)
octave_value::octave_value(const Array< char > &chm, char type) return retval
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
fcn_file_map_type method_file_map
fcn_file_map_type private_file_map