Require ncursesw to provide waddwstr and waddnwstr

This commit is contained in:
Andrzej Rybczak
2016-12-16 07:17:10 +01:00
parent 5c62072713
commit 50ec522726
2 changed files with 2 additions and 20 deletions

View File

@@ -1345,21 +1345,13 @@ Window &Window::operator<<(char c)
Window &Window::operator<<(const wchar_t *ws)
{
#if NCURSES_WADDWSTR
waddwstr(m_window, ws);
#else
wprintw(m_window, "%ls", ws);
#endif // NCURSES_WADDWSTR
return *this;
}
Window &Window::operator<<(wchar_t wc)
{
#if NCURSES_WADDNWSTR
waddnwstr(m_window, &wc, 1);
#else
wprintw(m_window, "%lc", wc);
#endif // NCURSES_WADDNWSTR
return *this;
}
@@ -1383,11 +1375,7 @@ Window &Window::operator<<(const std::string &s)
Window &Window::operator<<(const std::wstring &ws)
{
#if NCURSES_WADDNWSTR
waddnwstr(m_window, ws.c_str(), ws.length());
#else
wprintw(m_window, "%lc", ws.c_str());
#endif // NCURSES_WADDNWSTR
return *this;
}