octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Changeset] new bzip2 function


From: John W. Eaton
Subject: Re: [Changeset] new bzip2 function
Date: Sat, 13 Dec 2008 17:56:33 -0800

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]