Mercurial > hg > octave-lyh
changeset 5639:acbcb9f164ca
[project @ 2006-03-03 16:39:34 by jwe]
author | jwe |
---|---|
date | Fri, 03 Mar 2006 16:39:35 +0000 |
parents | bcfddf8e23a3 |
children | 426719471ac6 |
files | scripts/sparse/sprandn.m src/ChangeLog src/dirfns.cc |
diffstat | 3 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/sparse/sprandn.m +++ b/scripts/sparse/sprandn.m @@ -16,7 +16,7 @@ ## If called with a single matrix argument, a random sparse matrix is ## generated wherever the matrix @var{S} is non-zero. ## @end deftypefn -## @seealso{sprandn} +## @seealso{sprand} ## This program is public domain ## Author: Paul Kienzle <pkienzle@users.sf.net>
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-03-03 John W. Eaton <jwe@octave.org> + + * dirfns.cc (Frmdir): Require second arg to be "s". + 2006-03-02 John W. Eaton <jwe@octave.org> * dirfns.cc (Fmkdir, Frmdir): Now commands.
--- a/src/dirfns.cc +++ b/src/dirfns.cc @@ -373,9 +373,15 @@ std::string fulldir = file_ops::tilde_expand (dirname); - int status = (nargin == 1) - ? file_ops::rmdir (fulldir, msg) - : file_ops::recursive_rmdir (fulldir, msg); + if (nargin == 2) + { + if (args(1).string_value () == "s") + status = file_ops::recursive_rmdir (fulldir, msg); + else + error ("rmdir: expecting second argument to be \"s\""); + } + else + status = file_ops::rmdir (fulldir, msg) if (status < 0) {