mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 22:03:27 +01:00
Merge pull request #10 from manuel-arguelles/check_locale
Add check for setlocale()
This commit is contained in:
commit
222124742c
@ -50,7 +50,13 @@ static void init_term()
|
|||||||
{
|
{
|
||||||
/* Setup terminal */
|
/* Setup terminal */
|
||||||
signal(SIGWINCH, on_window_resize);
|
signal(SIGWINCH, on_window_resize);
|
||||||
setlocale(LC_ALL, "");
|
#if HAVE_WIDECHAR
|
||||||
|
if (setlocale(LC_ALL, "") == NULL) {
|
||||||
|
printf("Could not set your locale, plese check your locale settings or"
|
||||||
|
"disable wide char support\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
initscr();
|
initscr();
|
||||||
cbreak();
|
cbreak();
|
||||||
keypad(stdscr, 1);
|
keypad(stdscr, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user