# HG changeset patch # User jwe # Date 1171601562 0 # Node ID cf52583fe055b6ee2f5294ee75781e815c7ced20 # Parent 7cbf27ad6c3fefd507960efbe1258c679fdecd41 [project @ 2007-02-16 04:52:42 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,8 @@ 2007-02-15 John W. Eaton + * path/addpath.m, path/rmpath.m: Delete + * path/Makefile.in (SOURCES): Remove them from the list. + * plot/__uiobject_axes_init__.in, plot/__uiobject_axes_setr__.m: Delete title, xlabel, ylabel, and zlabel properties before reassigning. diff --git a/scripts/path/Makefile.in b/scripts/path/Makefile.in --- a/scripts/path/Makefile.in +++ b/scripts/path/Makefile.in @@ -20,7 +20,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ -SOURCES = addpath.m rmpath.m savepath.m +SOURCES = savepath.m DISTFILES = Makefile.in $(SOURCES) diff --git a/scripts/path/addpath.m b/scripts/path/addpath.m deleted file mode 100644 --- a/scripts/path/addpath.m +++ /dev/null @@ -1,114 +0,0 @@ -## Copyright (C) 2005 Bill Denney -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -## -## Based on code Copyright (C) 2000 Etienne Grossmann - -## -*- texinfo -*- -## @deftypefn {Function File} {} addpath (@var{dir1}, @dots{}) -## @deftypefnx {Function File} {} addpath (@var{dir1}, @dots{}, @var{option}) -## Add @var{dir1}, @dots{} to the current function search path. If -## @var{option} is @samp{"-begin"} or 0 (the default), prepend the -## directory name to the current path. If @var{option} is @samp{"-end"} -## or 1, append the directory name to the current path. -## Directories added to the path must exist. -## @seealso{path, rmpath, genpath, pathdef, savepath, pathsep} -## @end deftypefn - -## Author: Etienne Grossmann -## Modified-By: Bill Denney - -## PKGADD: mark_as_command addpath - -function ret = addpath (varargin) - - if (nargout > 0) - ret = path (); - endif - - nargs = nargin (); - - if (nargs > 0) - - append = false; - option = varargin{end}; - if (ischar (option)) - if (strcmpi (option, "-end")) - append = true; - nargs--; - elseif (strcmpi (option, "-begin")) - nargs--; - endif - elseif (option == 1) - append = true; - endif - - psep = pathsep (); - - xpath = cellstr (split (path (), psep)); - n_path_elts = length (xpath); - - ## Strip "." for now. Calling path to set the path will restore it. - for k = n_path_elts:-1:1 - if (strcmp (".", xpath{k})) - xpath(k) = []; - n_path_elts--; - endif - endfor - - for i = 1:nargs - dir_elts = cellstr (split (varargin{i}, psep)); - n_dir_elts = length (dir_elts); - for j = 1:n_dir_elts - dir = regexprep (dir_elts{j}, "//+", "/"); - dir = regexprep (dir, "/$", ""); - if (strcmp (dir, ".") && append) - warning ("addpath: \".\" is always first in the path"); - endif - [s, status, msg] = stat (dir); - if (status != 0) - warning ("addpath: %s: %s", dir, msg); - continue; - elseif (! S_ISDIR (s.mode)) - warning ("addpath: %s: not a directory", dir); - continue; - endif - for k = n_path_elts:-1:1 - if (strcmp (dir, xpath{k})) - xpath(k) = []; - n_path_elts--; - endif - endfor - if (append) - xpath = [xpath; {dir}]; - else - xpath = [{dir}; xpath]; - endif - endfor - endfor - - ## Ensure a 1xN cell array. - xpath = xpath(:)'; - - xpath{2,:} = psep; - xpath{2,end} = ""; - - tmp = strcat (xpath{:}); - - path (tmp); - - endif - -endfunction diff --git a/scripts/path/rmpath.m b/scripts/path/rmpath.m deleted file mode 100644 --- a/scripts/path/rmpath.m +++ /dev/null @@ -1,71 +0,0 @@ -## Copyright (C) 2000 Etienne Grossmann -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -## -*- texinfo -*- -## @deftypefn {Function File} {} rmpath (@var{dir1}, @dots{}) -## Remove @var{dir1}, @dots{} from the current function search path. -## -## @seealso{path, addpath, genpath, pathdef, savepath, pathsep} -## @end deftypefn - -## Author: Etienne Grossmann - -## PKGADD: mark_as_command rmpath - -function ret = rmpath (varargin) - - if (nargout > 0) - ret = path (); - endif - - psep = pathsep (); - - xpath = cellstr (split (path (), psep)); - n_path_elts = length (xpath); - - for i = 1:nargin - dir_elts = cellstr (split (varargin{i}, psep)); - n_dir_elts = length (dir_elts); - for j = 1:n_dir_elts - dir = regexprep (dir_elts{j}, "//+", "/"); - dir = regexprep (dir, "/$", ""); - elt_found = false; - for k = n_path_elts:-1:1 - if (strcmp (dir, ".")) - warning ("rmpath: can't remove \".\" from path"); - elseif (strcmp (dir, xpath{k})) - xpath(k) = []; - n_path_elts--; - elt_found = true; - endif - endfor - if (! elt_found) - warning ("rmpath: %s: not found", dir); - endif - endfor - endfor - - ## Ensure a 1xN cell array. - xpath = xpath(:)'; - - xpath{2,:} = psep; - xpath{2,end} = ""; - - tmp = strcat (xpath{:}); - - path (tmp); - -endfunction