[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]


Hi All!

In my editor(Using NCURSES), I have implemented PgUp & PgDown by scrolling
one page at a time in the view window.

But to my curiosity I tried the following code using ungetch().

if(keyPressed == PAGE_UP_KEY)

    for(int i=0;i<MAX_PAGE;i++)
        ungetch(UP_ARROW_KEY);  // Just one queue for all windows!

This works perfectly fine by scrolling up line-by-line.

My question is ->
How big can MAX_PAGE be? How do I determine the size?