[Top][All Lists]

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

Re: wredrawln function

From: Thomas Dickey
Subject: Re: wredrawln function
Date: Sat, 11 Mar 2006 17:11:56 -0500
User-agent: Mutt/1.5.11+cvs20060126

On Fri, Mar 10, 2006 at 06:56:06PM -0800, Dan Gookin wrote:
> I'm trying to figure out the wredrawln() function and am having a heck
> In the code, I'm using the system() call to write "RANDOM DATA" to the
> terminal screen, which screws up the display sufficiently. But the
> subsequent call to wredrawln() does not re-assert the original text
> NCurses believes to be there. In fact, the only way I've been able to
> restore the screen is via wrefresh(curscr), which works consistently.
> Is there a problem, or am I just guessing wrong on what wredrawln()
> should be doing?

The latter.  curscr holds ncurses' last notion of what is on the screen.
When you used the system call, you made _that_ obsolete.  Changing the
wredrawln() to curscr is a step in the right direction.  But also ncurses'
notion of where the cursor is has become obsolete.  You can use mvcur()
to repair that, e.g.,

        wredrawln(curscr, 0, 2); 
        mvcur(-1, -1, 0, 0); 

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

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