neilsolent
11/26/2008 9:04:00 PM
Hi
The following test program is supposed to wait for the user to input a
password, then echo it to the screen. It works fine on Solaris 10.
However, on Linux it clears the screen first! Can anyone explain how I
can modify it to work (not clear the screen) on Linux?
Thanks!
///////////////////////////////////////////////
#include <curses.h>
int main(int argc, char* argv[])
{
char buffer[16];
filter();
WINDOW* win = initscr();
noecho();
wgetnstr(win, buffer, 15);
endwin();
buffer[15] = 0;
printf("%s\n", buffer);
return 0;
}