[Changeset] new bzip2 function
John W. Eaton
jwe at octave.org
Sat Dec 13 19:56:33 CST 2008
On 2-Nov-2008, Thorsten Meyer wrote:
| Hi,
|
| John W. Eaton wrote:
| > Probably you don't need that level of complexity. I'm thinking of
| > something like
| >
| > function entries = gzip (files, outdir)
| > if (nargin == 1 || nargin == 2)
| > __xzip__ (files, outdir, "gzip", ".gz", "gzip -r %s");
| > else
| > print_usage ();
| > endif
| > endfunction
| >
| > and
| >
| > function entries = bzip2 (files, outdir)
| > if (nargin == 1 || nargin == 2)
| > __xzip__ (files, outdir, "bzip2", ".bz2", "bzip2 %s");
| > else
| > print_usage ();
| > endif
| > endfunction
| >
| > Given this, converting the current gzip function to __xzip__ should be
| > fairly easy, I think.
| Attached, you will find a new changeset, that implements the above.
Thank you for writing this patch and David for applying it.
+ error (sprintf("%s: extension has to be a string with finite length",
+ commandname));
There's no need to use sprintf here since error already understands
format strings. So you should write
error ("%s: extension has to be a string with finite length", commandname);
jwe
More information about the Octave-maintainers
mailing list