bug-ncurses
[Top][All Lists]
Advanced

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

mvwgetnstr


From: przemolicc
Subject: mvwgetnstr
Date: Tue, 25 Sep 2001 07:52:57 +0200
User-agent: Mutt/1.3.20i

I have following program (just reading keystrokes from different windows):

#include <curses.h>

WINDOW *w1, *w2, *w3;
char entry[80];

int main (int argc, char **argv)
{

        initscr ();
        cbreak ();
        w1 = newwin (3, 20, 3, 1);
        w2 = newwin (3, 20, 10, 1);
        w3 = newwin (3, 20, 15, 1);
        mvwgetnstr (w1, 0, 0, entry, sizeof(entry));    /* [1] */
        mvaddstr (3, 60, entry);
        refresh ();
        mvwgetnstr (w2, 0, 0, entry, sizeof(entry));    /* [2] */
        mvaddstr (3, 60, entry);
        refresh ();
        mvwgetnstr (w3, 0, 0, entry, sizeof(entry));    /* [3] */
        mvaddstr (3, 60, entry);
        refresh ();
        endwin ();
        return (0);
}

When a user presses keys in [1], I get the keys in 'entry' array.
But I get nothing in [2] and [3].
Why ?

przemol



reply via email to

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