octave-maintainers
[Top][All Lists]
Advanced

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

Re: Understanding how octave displays arrays


From: Jordi Gutiérrez Hermoso
Subject: Re: Understanding how octave displays arrays
Date: Tue, 10 Apr 2012 15:38:55 -0400

2012/4/9 Jordi Gutiérrez Hermoso <address@hidden>:
> On 9 April 2012 19:06, Corbin Champion <address@hidden> wrote:
>> 1) Where is the code that determines how to display variables?
>
> I'm going by memory since I don't have my dev machine right now,

I'm back on my dev machine (~, sweet ~), so I can answer this better now.

Look at the terminal_size function. It's a DEFUN in src/pager.cc, and
usually is just a wrapper to GNU readline, which it uses to gather
information.

Now look at src/pr-output.cc, which has most of the logic for how to
split lines and print other things. You'll notice it uses
command_editor::terminal_cols (); in some locations to determine
screen width, which is the same as what the terminal_size function
above uses. If you look at cset 13112:969ed305dde5, you'll see other
locations I had to patch in order to affect display of some things:

    http://hg.savannah.gnu.org/hgweb/octave/rev/969ed305dde5

HTH,
- Jordi G. H.


reply via email to

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