Mercurial > hg > octave-lyh
changeset 8608:5cc1fba0a7d6
style and ChangeLog fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 27 Jan 2009 22:59:51 -0500 |
parents | 08331c2fb00f |
children | fcf762ba66cf |
files | scripts/path/savepath.m src/ChangeLog |
diffstat | 2 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/path/savepath.m +++ b/scripts/path/savepath.m @@ -37,7 +37,7 @@ endstring = "## End savepath auto-created section"; if (nargin == 0) - savefile = ["~", filesep, ".octaverc"]; + savefile = fullfile ("~", ".octaverc"); endif ## parse the file if it exists to see if we should replace a section @@ -94,7 +94,7 @@ elseif (startline == 1) pre = {}; post = filelines(endline+1:end); - elseif (endline == length(filelines)) + elseif (endline == length (filelines)) pre = filelines(1:startline-1); post = {}; else @@ -129,7 +129,7 @@ default_path = parsepath (pathdef ()); endif ## This is the path we'd like to preserve when octave is run. - path_to_preserve = workingpath(sort(n)); + path_to_preserve = workingpath (sort (n)); ## Determine the path to Octave's user and sytem wide pkgs. [pkg_user, pkg_system] = pkg ("list"); @@ -146,7 +146,7 @@ ## Rely on Octave's initialization to include the pkg path elements. if (! isempty (pkg_path)) [tmp, n] = setdiff (path_to_preserve, strcat (pkg_path, ":")); - path_to_preserve = path_to_preserve(sort(n)); + path_to_preserve = path_to_preserve (sort (n)); endif ## Split the path to be saved into two groups. Those path elements that @@ -156,9 +156,10 @@ n2 = strmatch (default_path{end}, path_to_preserve, "exact"); n_middle = round (0.5*(n1+n2)); [tmp, n] = setdiff (path_to_preserve, default_path); - path_to_save = path_to_preserve(sort (n)); + path_to_save = path_to_preserve (sort (n)); ## Remove pwd - path_to_save = path_to_save (! strcmpi (path_to_save, strcat (".", pathsep))); + path_to_save = path_to_save (! strcmpi (path_to_save, + strcat (".", pathsep))); n = ones (size (path_to_save)); for m = 1:numel(path_to_save) n(m) = strmatch (path_to_save{m}, path_to_preserve);
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -32,8 +32,9 @@ 2008-12-25 Ben Abbott <bpabbott@mac.com> - * load-path.cc: New function commandlinepath. - * load-path.h: Make command_line_path public. + * load-path.cc (Fcommandlinepath): New function. + * load-path.h (load_path::get_command_line_path, + load_path::do_get_command_line_path): New functions. 2009-01-24 Ben Abbott <bpabbott@mac.com>