summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2013-05-19 19:28:08 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2013-05-19 19:28:08 +0200
commitce3b2c80a1396725b354d41ce76378d61eed1913 (patch)
treeb3b272db93d344ee6a1694bb45644b94f7ded12e /src
parentebc482b8fd5f3e76506c9baeca596ea965ed372d (diff)
downloadtdv-ce3b2c80a1396725b354d41ce76378d61eed1913.tar.gz
tdv-ce3b2c80a1396725b354d41ce76378d61eed1913.tar.xz
tdv-ce3b2c80a1396725b354d41ce76378d61eed1913.zip
Use a little bit more straight-forward detection
Diffstat (limited to 'src')
-rw-r--r--src/sdtui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sdtui.c b/src/sdtui.c
index 0c03ff5..285cd9c 100644
--- a/src/sdtui.c
+++ b/src/sdtui.c
@@ -101,8 +101,8 @@ struct curses_event
static gboolean
is_character_in_locale (wchar_t c)
{
- cchar_t cch;
- return setcchar (&cch, &c, A_NORMAL, 0, NULL) != ERR;
+ wchar_t s[] = { c, 0 };
+ return wcstombs (NULL, s, 0) != (size_t) -1;
}
/** Translate key codes above KEY_MAX returned from ncurses into something