/* -*- coding: utf-8 -*- */ #define _XOPEN_SOURCE_EXTENDED #include #include #include #include int main (int argc, char ** argv) { wint_t buf[10]; int ret; size_t i; setlocale (LC_ALL, ""); initscr (); unget_wch (L'\n'); unget_wch (L'ż'); /* LATIN SMALL LETTER Z WITH DOT ABOVE */ /* unget_wch (L'z'); */ /* LATIN SMALL LETTER Z */ ret = getn_wstr (buf, 10); endwin (); if (ret == OK) printf ("OK\n"); else if (ret == ERR) printf ("ERR\n"); else printf ("???\n"); i = 0; while (1) { printf ("i %d wint %d\n", i, buf[i]); if (buf[i] == 0) break; i++; } return 1; }