comparison scripts/miscellaneous/what.m @ 16724:b7667fcb9fbc

Substitute ostrsplit() for strsplit(). The function ostrsplit() is Octave's original strsplit(), and strsplit() has been modified to be compatible with Matlab's version. Bug #39010. * scripts/deprecated/javafields.m: Change call to ostrsplit(). * scripts/deprecated/javamethods.m: ditto * scripts/general/fieldnames.m: ditto * scripts/general/int2str.m: ditto * scripts/general/methods.m: ditto * scripts/general/num2str.m: ditto * scripts/help/gen_doc_cache.m: ditto * scripts/help/help.m: ditto * scripts/help/lookfor.m: ditto * scripts/io/strread.m: ditto * scripts/java/javaclasspath.m: ditto * scripts/miscellaneous/compare_versions.m: ditto * scripts/miscellaneous/computer.m: ditto * scripts/miscellaneous/fact.m: ditto * scripts/miscellaneous/tar.m: ditto * scripts/miscellaneous/unpack.m: ditto * scripts/miscellaneous/what.m: ditto * scripts/miscellaneous/zip.m: ditto * scripts/pkg/private/configure_make.m: ditto * scripts/pkg/private/fix_depends.m: ditto * scripts/pkg/private/generate_lookfor_cache.m: ditto * scripts/pkg/private/list_forge_packages.m: ditto * scripts/pkg/private/unload_packages.m: ditto * scripts/pkg/private/write_index.m: ditto * scripts/plot/private/__file_filter__.m: ditto * scripts/plot/private/__fltk_file_filter__.m: ditto * scripts/plot/private/__go_draw_axes__.m: ditto * scripts/plot/private/__next_line_style__.m: ditto * scripts/testfun/rundemos.m: ditto * scripts/testfun/runtests.m: ditto
author Ben Abbott <bpabbott@mac.com>
date Thu, 06 Jun 2013 10:06:12 +0800
parents 1de4ec2a856d
children 1c89599167a6
comparison
equal deleted inserted replaced
16723:45b57ac44854 16724:b7667fcb9fbc
30 30
31 if (nargin == 0) 31 if (nargin == 0)
32 d = pwd (); 32 d = pwd ();
33 elseif (isempty (strfind (d, filesep ()))) 33 elseif (isempty (strfind (d, filesep ())))
34 ## Find the appropriate directory on the path. 34 ## Find the appropriate directory on the path.
35 p = strtrim (strsplit (path (), pathsep (), false)); 35 p = strtrim (ostrsplit (path (), pathsep ()));
36 d = p{find (cellfun (@(x) ! isempty (strfind (x, d)), p))(end)}; 36 d = p{find (cellfun (@(x) ! isempty (strfind (x, d)), p))(end)};
37 else 37 else
38 [status, msg, msgid] = fileattrib (d); 38 [status, msg, msgid] = fileattrib (d);
39 if (status != 1) 39 if (status != 1)
40 error ("what: could not find the file or path %s", d); 40 error ("what: could not find the file or path %s", d);