Mercurial > hg > octave-lyh
changeset 6007:52b520087c50
[project @ 2006-09-27 15:05:53 by jwe]
author | jwe |
---|---|
date | Wed, 27 Sep 2006 15:05:54 +0000 |
parents | 588dfb92e19e |
children | 0f5bc819fdb8 |
files | src/ChangeLog src/file-io.cc |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2006-09-27 David Bateman <dbateman@free.fr> + * file-io.cc (Fsprintf): If fmt is an sq_string, return an sq_string. + * DLD-FUNCTIONS/sparse.cc (spfind, sparse_find): Delete. * DLD-FUNCTIONS/spfind.cc: New file implementating compatible sparse find function.
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -938,7 +938,9 @@ if (os.is_valid ()) { - if (args(0).is_string ()) + octave_value fmt_arg = args(0); + + if (fmt_arg.is_string ()) { octave_value_list tmp_args; @@ -950,9 +952,10 @@ tmp_args(i-1) = args(i); } - retval(2) = os.printf (args(0), tmp_args, who); + retval(2) = os.printf (fmt_arg, tmp_args, who); retval(1) = os.error (); - retval(0) = ostr->str (); + retval(0) = octave_value (ostr->str (), + fmt_arg.is_sq_string () ? '\'' : '"'); } else ::error ("%s: format must be a string", who.c_str ());