bug-ncurses
[Top][All Lists]
Advanced

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

Re: wresize and maxx/maxy short int overflow


From: Thomas Dickey
Subject: Re: wresize and maxx/maxy short int overflow
Date: Tue, 3 Nov 2009 04:53:13 -0500 (EST)

On Tue, 3 Nov 2009, Katarina Machalkova wrote:

Hi,

maxy/maxx are short ints (NCURSES_SIZE_T, to be more precise), while
wresize()
takes "normal" ints as params. Now I'm trying to make the window really
big in
Y dimension by setting 'lines' param to value greater than 32 768.

Hi Katarina!

It is an error to create a WINDOW object larger than the screen. PAD
objects may be larger, but WINDOWs cannot (if i'm not mistaken)

I wrote "window", but I meant "pad", grrr :) it's created using newpad().

So - can I safely (i.e. without maxx/maxy running beyond limits) create a pad
with more than 32 768 lines? Can I resize existing pad to more than 32 768
lines?

no: signed shorts are used to store cursor position and window/pad limits. That's been a visible part of the window struct "forever".

If you happen to be building/using a variant configuration of ncurses
that uses the NCURSES_OPAQUE feature, you can change NCURSES_SIZE_T
to an int.  That's done as a side-effect of --enable-reentrant for
example.

If the answer to the above question is negative, how can have ncurses display
a list with many ( > 50k ) entries?

The application maintains the list, and pages it in/out of the pad (or window) as needed.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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