Mercurial > octave
diff src/ov-base.cc @ 13112:969ed305dde5
Remove all blank lines with "format compact"
* pr-output.h (Vcompact_format): New global variable.
* pr-output.cc (Vcompact_format): No longer a static variable.
(pr_scale_header, pr_col_num_header, octave_print_internal): Use
Vcompact_format to eliminate some newlines. (Vformat): Document this change.
* ov-base.cc (octave_base_value::print_name_tag,
octave_base_value::print_with_name): Use Vcompact_format variable to
omit newlines.
* ov-class.cc (octave_class::print_name_tag): Ditto.
* ov-range.cc (octave_range::print_name_tag): Ditto.
* ov-struct.cc (octave_scalar_struct::print_raw): Ditto.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Tue, 06 Sep 2011 21:15:16 -0500 |
parents | efd924e19ff7 |
children | 79aa00a94e9e |
line wrap: on
line diff
--- a/src/ov-base.cc Wed Sep 07 20:13:18 2011 +0200 +++ b/src/ov-base.cc Tue Sep 06 21:15:16 2011 -0500 @@ -50,6 +50,7 @@ #include "ov-str-mat.h" #include "ov-fcn-handle.h" #include "parse.h" +#include "pr-output.h" #include "utils.h" #include "variables.h" @@ -419,7 +420,9 @@ { os << name << " ="; newline (os); - newline (os); + if (! Vcompact_format) + newline (os); + retval = true; } @@ -435,7 +438,7 @@ print (output_buf); - if (print_padding && pad_after) + if (print_padding && pad_after && ! Vcompact_format) newline (output_buf); }