Mercurial > hg > octave-avbm
changeset 6599:08ca72d6ffc9
[project @ 2007-04-28 22:47:29 by jwe]
author | jwe |
---|---|
date | Sat, 28 Apr 2007 22:47:29 +0000 |
parents | ce819776ee76 |
children | ecd3db9a1815 |
files | scripts/ChangeLog scripts/miscellaneous/bunzip2.m scripts/miscellaneous/gunzip.m scripts/miscellaneous/untar.m scripts/miscellaneous/unzip.m |
diffstat | 5 files changed, 34 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2007-04-28 John W. Eaton <jwe@octave.org> + + * miscellaneous/unzip.m, miscellaneous/untar.m, + miscellaneous/bunzip2.m, miscellaneous/gunzip.m: + Special case nargout == 0. + 2007-04-27 Kim Hansen <kimhanse@gmail.com> * general/sub2ind.m: Handle empty input, add tests.
--- a/scripts/miscellaneous/bunzip2.m +++ b/scripts/miscellaneous/bunzip2.m @@ -35,7 +35,12 @@ if (nargin == 1) outputdir = "."; endif - varargout = cell (1, nargout); - [varargout{:}] = unpack (files, outputdir, mfilename ()); + + if (nargout > 0) + varargout = cell (1, nargout); + [varargout{:}] = unpack (files, outputdir, mfilename ()); + else + unpack (files, outputdir, mfilename ()); + endif endfunction
--- a/scripts/miscellaneous/gunzip.m +++ b/scripts/miscellaneous/gunzip.m @@ -37,7 +37,12 @@ if (nargin == 1) outputdir = "."; endif - varargout = cell (1, nargout); - [varargout{:}] = unpack (files, outputdir, mfilename ()); + + if (nargout > 0) + varargout = cell (1, nargout); + [varargout{:}] = unpack (files, outputdir, mfilename ()); + else + unpack (files, outputdir, mfilename ()); + endif endfunction
--- a/scripts/miscellaneous/untar.m +++ b/scripts/miscellaneous/untar.m @@ -36,7 +36,12 @@ if (nargin == 1) outputdir = "."; endif - varargout = cell (1, nargout); - [varargout{:}] = unpack (files, outputdir, mfilename ()); + + if (nargout > 0) + varargout = cell (1, nargout); + [varargout{:}] = unpack (files, outputdir, mfilename ()); + else + unpack (files, outputdir, mfilename ()); + endif endfunction
--- a/scripts/miscellaneous/unzip.m +++ b/scripts/miscellaneous/unzip.m @@ -36,7 +36,12 @@ if (nargin == 1) outputdir = "."; endif - varargout = cell (1, nargout); - [varargout{:}] = unpack (files, outputdir, mfilename ()); + + if (nargout > 0) + varargout = cell (1, nargout); + [varargout{:}] = unpack (files, outputdir, mfilename ()); + else + unpack (files, outputdir, mfilename ()); + endif endfunction