Mercurial > hg > octave-lyh
diff scripts/pkg/pkg.m @ 14214:2fe0f5fa8cc3
Replace to-be-deprecated findstr occurrences with strfind.
* help.m, textread.m, textscan.m, pkg.m, legend.m, __ezplot__.m,
__go_draw_axes__.m, rundemos.m: Replace to-be-deprecated findstr occurrences
with strfind.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 18 Jan 2012 21:15:42 -0800 |
parents | a022c04f68cc |
children | 7277fe922e99 |
line wrap: on
line diff
--- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -2006,21 +2006,21 @@ ## Now check if the package is loaded. tmppath = strrep (path(), "\\", "/"); for i = 1:length (installed_pkgs_lst) - if (findstr (tmppath, strrep (installed_pkgs_lst{i}.dir, "\\", "/"))) + if (strfind (tmppath, strrep (installed_pkgs_lst{i}.dir, '\', '/'))) installed_pkgs_lst{i}.loaded = true; else installed_pkgs_lst{i}.loaded = false; endif endfor for i = 1:length (local_packages) - if (findstr (tmppath, strrep (local_packages{i}.dir, "\\", "/"))) + if (strfind (tmppath, strrep (local_packages{i}.dir, '\', '/'))) local_packages{i}.loaded = true; else local_packages{i}.loaded = false; endif endfor for i = 1:length (global_packages) - if (findstr (tmppath, strrep (global_packages{i}.dir, "\\", "/"))) + if (strfind (tmppath, strrep (global_packages{i}.dir, '\', '/'))) global_packages{i}.loaded = true; else global_packages{i}.loaded = false; @@ -2398,7 +2398,7 @@ else isglob = false; endif - pos = findstr (nm, ext); + pos = strfind (nm, ext); if (pos) if (! isglob && (length(nm) - pos(end) != length(ext) - 1)) continue;