Mercurial > hg > octave-nkf
changeset 5145:dd07ee8af4b3
[project @ 2005-02-15 12:48:24 by jwe]
author | jwe |
---|---|
date | Tue, 15 Feb 2005 12:48:24 +0000 |
parents | 25b090e1be9f |
children | 275a95541831 |
files | src/ChangeLog src/dirfns.cc |
diffstat | 2 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2005-02-15 John W. Eaton <jwe@octave.org> + * dirfns.cc (deftypefn): Don't print to octave_stdout if nargout > 0. + * pt-mat.cc (tree_matrix::rvalue): Min size of ra_idx is 2. * file-io.cc (Ffclear): New function.
--- a/src/dirfns.cc +++ b/src/dirfns.cc @@ -191,18 +191,19 @@ for (;;) { if (cmd->get (ch)) - { - octave_stdout << ch; - output_buf << ch; - } + output_buf << ch; else break; } output_buf << OSSTREAM_ENDS; + std::string output = OSSTREAM_STR (output_buf); + if (nargout > 0) - retval = OSSTREAM_STR (output_buf); + retval = output; + else + octave_stdout << output; OSSTREAM_FREEZE (output_buf); }