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

[LI] ncurses cursed problem



You'd normally call newwin after an initscr.

-- Raju

>>>>> "btserv" == btserv  <btserv@xxxxxxxx> writes:

    btserv> Gentlemen,

    btserv>   I wrote a small snippet of a program using ncurses, and
    btserv> it dumps core when executing. gdb says the problem is in
    btserv> "wattrset (win, A_NORMAL);".  I could'nt make out what
    btserv> went wrong. Can sombody help ? My code is


    btserv>   #include <ncurses.h>

    btserv>   int main (){ int x,y,i,j; int height=20, width =60;
    btserv> WINDOW *win;

    btserv>    x= (COLS - width)/2; y= (LINES - height)/2;

    btserv>    win= newwin( height, width, y, x);

    btserv>    initscr(); keypad (win,TRUE); cbreak();

    btserv>    wattrset (win, A_REVERSE);

    btserv> [snip]
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.