bug-ncurses
[Top][All Lists]
Advanced

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

wredrawln function


From: Dan Gookin
Subject: wredrawln function
Date: Fri, 10 Mar 2006 18:56:06 -0800

I'm trying to figure out the wredrawln() function and am having a heck
of time. Perhaps I don't understand it? My take is that wredrawln()
forces Curses to trash what it believes to be on the screen and force
a full update. But I cannot seem to get it to comply. Here is the code
I'm using to test:

#include <ncurses.h>

int main()
{
    initscr();

    addstr("I'm just an innocent little program,\n");
    addstr("minding my own business...\n");
    move(0,0);
    refresh();
    getchar();

    system("echo \"RANDOM DATA\" > `tty`");
    getchar();

    wredrawln(stdscr,0,2);
    refresh();
    getchar();

    endwin();
    return(0);
}

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?

Thanks!




reply via email to

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