# HG changeset patch # User Rik # Date 1386174222 28800 # Node ID 1e27079409bfe53e1f8c99716b51040328d3fe12 # Parent b4b5ee91561aa647902a358507a792b80a93f4f3 Rename function dir_in_path to dir_in_loadpath. * NEWS: Announce new function in 4.2. * scripts/deprecated/find_dir_in_path.m: Call dir_in_loadpath as replacement. * utils.cc (Fdir_in_loadpath): Renamed dir_in_path to dir_in_loadpath. * help.m, what.m, rundemos.m, runtests.m: Chane instances of dir_in_path to dir_in_loadpath. * utils.cc, variables.cc: Change seealso links to point to dir_in_loadpath. * func.txi: Document dir_in_loadpath function. diff -r b4b5ee91561a -r 1e27079409bf NEWS --- a/NEWS Tue Dec 03 20:39:07 2013 -0800 +++ b/NEWS Wed Dec 04 08:23:42 2013 -0800 @@ -3,7 +3,7 @@ ** Other new functions added in 4.2: - dir_in_path + dir_in_loadpath ** Deprecated functions. diff -r b4b5ee91561a -r 1e27079409bf doc/interpreter/func.txi --- a/doc/interpreter/func.txi Tue Dec 03 20:39:07 2013 -0800 +++ b/doc/interpreter/func.txi Wed Dec 04 08:23:42 2013 -0800 @@ -802,7 +802,7 @@ @DOCSTRING(command_line_path) -@DOCSTRING(dir_in_path) +@DOCSTRING(dir_in_loadpath) @node Subfunctions @subsection Subfunctions diff -r b4b5ee91561a -r 1e27079409bf libinterp/corefcn/utils.cc --- a/libinterp/corefcn/utils.cc Tue Dec 03 20:39:07 2013 -0800 +++ b/libinterp/corefcn/utils.cc Wed Dec 04 08:23:42 2013 -0800 @@ -303,7 +303,7 @@ If the second optional argument @qcode{\"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_path, dir_in_path, path}\n\ +@seealso{file_in_path, dir_in_loadpath, path}\n\ @end deftypefn") { octave_value retval; @@ -380,7 +380,7 @@ If the third optional argument @qcode{\"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, dir_in_path, path}\n\ +@seealso{file_in_loadpath, dir_in_loadpath, path}\n\ @end deftypefn") { octave_value retval; @@ -892,10 +892,10 @@ %!error make_absolute_filename ("foo", "bar") */ -DEFUN (dir_in_path, args, , +DEFUN (dir_in_loadpath, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} dir_in_path (@var{dir})\n\ -@deftypefnx {Built-in Function} {} dir_in_path (@var{dir}, \"all\")\n\ +@deftypefn {Built-in Function} {} dir_in_loadpath (@var{dir})\n\ +@deftypefnx {Built-in Function} {} dir_in_loadpath (@var{dir}, \"all\")\n\ Return the full name of the path element matching @var{dir}. The\n\ match is performed at the end of each path element. For example, if\n\ @var{dir} is @qcode{\"foo/bar\"}, it matches the path element\n\ @@ -926,7 +926,7 @@ retval = Cell (load_path::find_matching_dirs (dir)); } else - error ("dir_in_path: DIR must be a directory name"); + error ("dir_in_loadpath: DIR must be a directory name"); } else print_usage (); @@ -937,8 +937,8 @@ /* ## FIXME: We need system-dependent tests here. -%!error dir_in_path () -%!error dir_in_path ("foo", "bar", 1) +%!error dir_in_loadpath () +%!error dir_in_loadpath ("foo", "bar", 1) */ DEFUNX ("errno", Ferrno, args, , diff -r b4b5ee91561a -r 1e27079409bf libinterp/corefcn/variables.cc --- a/libinterp/corefcn/variables.cc Tue Dec 03 20:39:07 2013 -0800 +++ b/libinterp/corefcn/variables.cc Wed Dec 04 08:23:42 2013 -0800 @@ -548,7 +548,7 @@ Check only for directories.\n\ @end table\n\ \n\ -@seealso{file_in_loadpath, file_in_path, dir_in_path, stat}\n\ +@seealso{file_in_loadpath, file_in_path, dir_in_loadpath, stat}\n\ @end deftypefn") { octave_value retval = false; diff -r b4b5ee91561a -r 1e27079409bf scripts/deprecated/find_dir_in_path.m --- a/scripts/deprecated/find_dir_in_path.m Tue Dec 03 20:39:07 2013 -0800 +++ b/scripts/deprecated/find_dir_in_path.m Wed Dec 04 08:23:42 2013 -0800 @@ -19,8 +19,8 @@ ## -*- texinfo -*- ## @deftypefn {Built-in Function} {} find_dir_in_path (@var{dir}) ## @deftypefnx {Built-in Function} {} find_dir_in_path (@var{dir}, "all") -## This function has been deprecated. Use @code{dir_in_path} instead. -## @seealso{dir_in_path} +## This function has been deprecated. Use @code{dir_in_loadpath} instead. +## @seealso{dir_in_loadpath} ## @end deftypefn ## Deprecated in version 4.2 @@ -31,10 +31,10 @@ if (! warned) warned = true; warning ("Octave:deprecated-function", - "find_dir_in_path is obsolete and will be removed from a future version of Octave, please use dir_in_path instead"); + "find_dir_in_path is obsolete and will be removed from a future version of Octave, please use dir_in_loadpath instead"); endif - retval = dir_in_path (varargin{:}); + retval = dir_in_loadpath (varargin{:}); endfunction diff -r b4b5ee91561a -r 1e27079409bf scripts/help/help.m --- a/scripts/help/help.m Tue Dec 03 20:39:07 2013 -0800 +++ b/scripts/help/help.m Wed Dec 04 08:23:42 2013 -0800 @@ -163,7 +163,7 @@ found = false; - dlist = dir_in_path (name, "all"); + dlist = dir_in_loadpath (name, "all"); for i = 1:numel (dlist) fname = make_absolute_filename (fullfile (dlist{i}, "Contents.m")); diff -r b4b5ee91561a -r 1e27079409bf scripts/miscellaneous/what.m --- a/scripts/miscellaneous/what.m Tue Dec 03 20:39:07 2013 -0800 +++ b/scripts/miscellaneous/what.m Wed Dec 04 08:23:42 2013 -0800 @@ -37,7 +37,7 @@ if (d(end) == '/' || d(end) == '\') d(end) = []; endif - dtmp = dir_in_path (d); + dtmp = dir_in_loadpath (d); if (isempty (dtmp)) error ("what: could not find the directory %s", d); endif diff -r b4b5ee91561a -r 1e27079409bf scripts/testfun/rundemos.m --- a/scripts/testfun/rundemos.m Tue Dec 03 20:39:07 2013 -0800 +++ b/scripts/testfun/rundemos.m Wed Dec 04 08:23:42 2013 -0800 @@ -42,7 +42,7 @@ if (directory(end) == '/' || directory(end) == '\') directory(end) = []; endif - fullname = dir_in_path (directory); + fullname = dir_in_loadpath (directory); if (isempty (fullname)) error ("rundemos: DIRECTORY argument must be a valid pathname"); endif diff -r b4b5ee91561a -r 1e27079409bf scripts/testfun/runtests.m --- a/scripts/testfun/runtests.m Tue Dec 03 20:39:07 2013 -0800 +++ b/scripts/testfun/runtests.m Wed Dec 04 08:23:42 2013 -0800 @@ -42,7 +42,7 @@ if (directory(end) == '/' || directory(end) == '\') directory(end) = []; endif - fullname = dir_in_path (directory); + fullname = dir_in_loadpath (directory); if (isempty (fullname)) error ("runtests: DIRECTORY argument must be a valid pathname"); endif