diff --git a/cmatrix.c b/cmatrix.c index 7d8ca39..7d710de 100644 --- a/cmatrix.c +++ b/cmatrix.c @@ -34,6 +34,7 @@ #include #include #include +#include #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include @@ -782,7 +783,12 @@ if (console) { } else if (matrix[i][j].val == -1) { addch(' '); } else { - addch(matrix[i][j].val); + if (classic) { + wchar_t wc[2] = {(wchar_t)matrix[i][j].val, L'\0'}; + addwstr(wc); + } else { + addch(matrix[i][j].val); + } } attroff(COLOR_PAIR(COLOR_WHITE)); diff --git a/configure.ac b/configure.ac index 0565a52..8629952 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,6 @@ AC_PROG_MAKE_SET dnl Checks for libraries. dnl Replace `main' with a function in -lncurses: -AC_CHECK_LIB(ncurses, main) dnl Checks for header files. AC_HEADER_STDC @@ -35,7 +34,8 @@ dnl Checks for libraries. AC_CHECK_HEADERS(curses.h ncurses.h) CURSES_LIB_NAME="" -AC_CHECK_LIB(ncurses, tgetent, CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses) +AC_CHECK_LIB(ncursesw, tgetent, CURSES_LIB="-lncursesw" CURSES_LIB_NAME=ncursesw, + AC_CHECK_LIB(ncurses, tgetent, CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses)) if eval "test x$CURSES_LIB_NAME = x" then