[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wresize and maxx/maxy short int overflow
From: |
Katarina Machalkova |
Subject: |
Re: wresize and maxx/maxy short int overflow |
Date: |
Tue, 3 Nov 2009 10:45:00 +0100 |
User-agent: |
KMail/1.10.3 (Linux/2.6.27.29-0.1-pae; KDE/4.1.3; i686; ; ) |
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?
If the answer to the above question is negative, how can have ncurses display
a list with many ( > 50k ) entries?
Current implementation (which I inherited from the previous maintainer) is
that initially a default size pad is created, it is resized to accomodate all
the items, and as the user moves cursor keys, corresponding parts of that big
pad are copied (copywin()) to the screen.
hB.
--
\\\\\ Katarina Machalkova
\\\\\\\__o YaST developer
__\\\\\\\'/_ & hedgehog painter