Mercurial > octave-antonio
changeset 19123:c8f03ccdc9ee
Align columns for freport() output.
* file-io.cc (Ffreport): Update example in docstring to include arch column and
new alignment.
* oct-stream.cc (octave_stream_list::do_list_open_files): Use resetiosflags()
to guarantee that setiosflags() function calls are respected.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 20 Sep 2014 22:04:01 -0700 |
parents | c43223245085 |
children | 3087dc835497 |
files | libinterp/corefcn/file-io.cc libinterp/corefcn/oct-stream.cc |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc Sat Sep 20 21:45:35 2014 -0700 +++ b/libinterp/corefcn/file-io.cc Sat Sep 20 22:04:01 2014 -0700 @@ -748,12 +748,12 @@ @group\n\ freport ()\n\ \n\ - @print{} number mode name\n\ - @print{}\n\ - @print{} 0 r stdin\n\ - @print{} 1 w stdout\n\ - @print{} 2 w stderr\n\ - @print{} 3 r myfile\n\ + @print{} number mode arch name\n\ + @print{} ------ ---- ---- ----\n\ + @print{} 0 r ieee-le stdin\n\ + @print{} 1 w ieee-le stdout\n\ + @print{} 2 w ieee-le stderr\n\ + @print{} 3 r ieee-le myfile\n\ @end group\n\ @end example\n\ @seealso{fopen, fclose, is_valid_file_id}\n\
--- a/libinterp/corefcn/oct-stream.cc Sat Sep 20 21:45:35 2014 -0700 +++ b/libinterp/corefcn/oct-stream.cc Sat Sep 20 22:04:01 2014 -0700 @@ -4368,6 +4368,8 @@ buf << " " << std::setiosflags (std::ios::right) << std::setw (4) << p->first << " " + // reset necessary in addition to setiosflags since this is one stmt. + << std::resetiosflags (std::ios::adjustfield) << std::setiosflags (std::ios::left) << std::setw (3) << octave_stream::mode_as_string (os.mode ())