#include #include #include // gcc -I/usr/include/ncursesw/ -D_XOPEN_SOURCE_EXTENDED pad_test.c -lncursesw int main() { WINDOW *testpad; static cchar_t cc; setlocale(LC_ALL,""); initscr(); cbreak(); noecho(); halfdelay(100); printw("OK %d\n", OK ); printw("ERR %d\n", ERR ); printw("sizeof(L'\\0') %d\n", sizeof(L'\0') ); printw("newpad(100,150) %p\n", testpad = newpad(100,150)); getch(); waddch(testpad, ACS_BOARD); waddch(testpad, ACS_STERLING); //prefresh(testpad, 0,0, 0,0, 9,9); pecho_wchar(testpad,WACS_LANTERN); refresh(); printw("pechochar(testpad,'t') %d\n", pechochar(testpad,'t')); printw("### pechochar(NULL,'n') %d\n", pechochar(NULL,'n')); printw("pecho_wchar(testpad,WACS_T_LRCORNER) %d\n", pecho_wchar(testpad,WACS_T_LRCORNER)); mbstowcs(cc.chars, "試", 4); printw("pecho_wchar(testpad,&cc) %d\n", pecho_wchar(testpad,&cc)); printw("### pecho_wchar(NULL,WACS_PI) %d\n", pecho_wchar(NULL,WACS_PI)); printw("%s", " hit any key>>"); //prefresh(testpad, 0,0, 2,2, 9,9); refresh(); getch(); endwin(); return(0); }