comparison libinterp/corefcn/utils.cc @ 18104:889e2c083253 gui-release

maint: backout cset ff05d5b70411 on gui-release branch.
author Rik <rik@octave.org>
date Thu, 05 Dec 2013 11:36:10 -0800
parents 1e27079409bf
children 2217bc116aa9 e473c4853afc
comparison
equal deleted inserted replaced
18103:2982b42c7469 18104:889e2c083253
301 the first that matches.\n\ 301 the first that matches.\n\
302 \n\ 302 \n\
303 If the second optional argument @qcode{\"all\"} is supplied, return\n\ 303 If the second optional argument @qcode{\"all\"} is supplied, return\n\
304 a cell array containing the list of all files that have the same\n\ 304 a cell array containing the list of all files that have the same\n\
305 name in the path. If no files are found, return an empty cell array.\n\ 305 name in the path. If no files are found, return an empty cell array.\n\
306 @seealso{file_in_path, dir_in_loadpath, path}\n\ 306 @seealso{file_in_path, find_dir_in_path, path}\n\
307 @end deftypefn") 307 @end deftypefn")
308 { 308 {
309 octave_value retval; 309 octave_value retval;
310 310
311 int nargin = args.length (); 311 int nargin = args.length ();
378 the first that matches.\n\ 378 the first that matches.\n\
379 \n\ 379 \n\
380 If the third optional argument @qcode{\"all\"} is supplied, return\n\ 380 If the third optional argument @qcode{\"all\"} is supplied, return\n\
381 a cell array containing the list of all files that have the same\n\ 381 a cell array containing the list of all files that have the same\n\
382 name in the path. If no files are found, return an empty cell array.\n\ 382 name in the path. If no files are found, return an empty cell array.\n\
383 @seealso{file_in_loadpath, dir_in_loadpath, path}\n\ 383 @seealso{file_in_loadpath, find_dir_in_path, path}\n\
384 @end deftypefn") 384 @end deftypefn")
385 { 385 {
386 octave_value retval; 386 octave_value retval;
387 387
388 int nargin = args.length (); 388 int nargin = args.length ();
890 890
891 %!error make_absolute_filename () 891 %!error make_absolute_filename ()
892 %!error make_absolute_filename ("foo", "bar") 892 %!error make_absolute_filename ("foo", "bar")
893 */ 893 */
894 894
895 DEFUN (dir_in_loadpath, args, , 895 DEFUN (find_dir_in_path, args, ,
896 "-*- texinfo -*-\n\ 896 "-*- texinfo -*-\n\
897 @deftypefn {Built-in Function} {} dir_in_loadpath (@var{dir})\n\ 897 @deftypefn {Built-in Function} {} find_dir_in_path (@var{dir})\n\
898 @deftypefnx {Built-in Function} {} dir_in_loadpath (@var{dir}, \"all\")\n\ 898 @deftypefnx {Built-in Function} {} find_dir_in_path (@var{dir}, \"all\")\n\
899 Return the full name of the path element matching @var{dir}. The\n\ 899 Return the full name of the path element matching @var{dir}. The\n\
900 match is performed at the end of each path element. For example, if\n\ 900 match is performed at the end of each path element. For example, if\n\
901 @var{dir} is @qcode{\"foo/bar\"}, it matches the path element\n\ 901 @var{dir} is @qcode{\"foo/bar\"}, it matches the path element\n\
902 @nospell{@qcode{\"/some/dir/foo/bar\"}}, but not\n\ 902 @nospell{@qcode{\"/some/dir/foo/bar\"}}, but not\n\
903 @nospell{@qcode{\"/some/dir/foo/bar/baz\"}}\n\ 903 @nospell{@qcode{\"/some/dir/foo/bar/baz\"}}\n\
924 retval = load_path::find_dir (dir); 924 retval = load_path::find_dir (dir);
925 else if (nargin == 2) 925 else if (nargin == 2)
926 retval = Cell (load_path::find_matching_dirs (dir)); 926 retval = Cell (load_path::find_matching_dirs (dir));
927 } 927 }
928 else 928 else
929 error ("dir_in_loadpath: DIR must be a directory name"); 929 error ("find_dir_in_path: DIR must be a directory name");
930 } 930 }
931 else 931 else
932 print_usage (); 932 print_usage ();
933 933
934 return retval; 934 return retval;
935 } 935 }
936 936
937 /* 937 /*
938 ## FIXME: We need system-dependent tests here. 938 ## FIXME: We need system-dependent tests here.
939 939
940 %!error dir_in_loadpath () 940 %!error find_dir_in_path ()
941 %!error dir_in_loadpath ("foo", "bar", 1) 941 %!error find_dir_in_path ("foo", "bar", 1)
942 */ 942 */
943 943
944 DEFUNX ("errno", Ferrno, args, , 944 DEFUNX ("errno", Ferrno, args, ,
945 "-*- texinfo -*-\n\ 945 "-*- texinfo -*-\n\
946 @deftypefn {Built-in Function} {@var{err} =} errno ()\n\ 946 @deftypefn {Built-in Function} {@var{err} =} errno ()\n\