Fixed menuconfig look on UTF-8 based systems.
Thanks to Alexander E. Patrakov for the patch.
This commit is contained in:
parent
a96109a275
commit
6e8fc82f68
3 changed files with 11 additions and 0 deletions
|
@ -55,6 +55,10 @@ endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (/usr/include/locale.h, $(wildcard /usr/include/locale.h))
|
||||||
|
HOSTNCURSES += -DLOCALE=1
|
||||||
|
endif
|
||||||
|
|
||||||
CONF_SRC = conf.c
|
CONF_SRC = conf.c
|
||||||
MCONF_SRC = mconf.c
|
MCONF_SRC = mconf.c
|
||||||
LXD_SRC = lxdialog/checklist.c lxdialog/menubox.c lxdialog/textbox.c \
|
LXD_SRC = lxdialog/checklist.c lxdialog/menubox.c lxdialog/textbox.c \
|
||||||
|
|
|
@ -26,6 +26,10 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef LOCALE
|
||||||
|
#include <locale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CURSES_LOC
|
#ifdef CURSES_LOC
|
||||||
#ifdef __sun__
|
#ifdef __sun__
|
||||||
#define CURS_MACROS
|
#define CURS_MACROS
|
||||||
|
|
|
@ -144,6 +144,9 @@ void dialog_clear (void)
|
||||||
void
|
void
|
||||||
init_dialog (void)
|
init_dialog (void)
|
||||||
{
|
{
|
||||||
|
#ifdef LOCALE
|
||||||
|
setlocale(LC_CTYPE, ""); /* required by ncurses on linux UTF-8 console */
|
||||||
|
#endif
|
||||||
initscr (); /* Init curses */
|
initscr (); /* Init curses */
|
||||||
keypad (stdscr, TRUE);
|
keypad (stdscr, TRUE);
|
||||||
cbreak ();
|
cbreak ();
|
||||||
|
|
Reference in a new issue