octave-maintainers
[Top][All Lists]
Advanced

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

Changes to format loose and compact


From: John W. Eaton
Subject: Changes to format loose and compact
Date: Mon, 2 May 2005 13:59:46 -0400

On  1-May-2005, Keith Goodman wrote:

| When Octave displays a multi-line row vector or matrix such as x=1:100
| it inserts two blank lines after the column headings if the format is
| loose and a single blank line if the format is compact.
|
| The patch to pr-output.cc below only inserts a single blank line if
| the format is loose and no blank lines if the format is compact.

Though this change would do the right thing for ranges, I think this
would do the wrong thing for matrices (try rand (10, 100) with your
changes).  So I made the followong change instead.

| The patch also removes the colon, which I think serves no purpose
| since there is already a line break, at the end of the column heading.

I prefer having the colon, so I did not make these changes.

| I don't know how to compile the changes I made. When I do learn how,
| will I have to compile all of Octave to test the changes?

Yes.

In the future, please don't omit the file and line number information
from your context diffs.  Without that, there is no way to apply the
changes automatically.

Thanks,

jwe


src/ChangeLog:

2005-05-02  John W. Eaton  <address@hidden>

        * pr-output.cc (octave_print_internal (std::ostream&,
        const Range&, bool, int)): Don't print newline at end of broken
        rows (that is handled by pr_col_num_header).
        From Keith Goodman <address@hidden>.


Index: src/pr-output.cc
===================================================================
RCS file: /cvs/octave/src/pr-output.cc,v
retrieving revision 1.130
diff -u -r1.130 pr-output.cc
--- src/pr-output.cc    26 Apr 2005 19:24:34 -0000      1.130
+++ src/pr-output.cc    2 May 2005 17:51:15 -0000
@@ -1897,9 +1897,6 @@
                }
 
              col += inc;
-
-             if (col < num_elem)
-               os << "\n";
            }
        }
     }



reply via email to

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