Fixed menuconfig look on UTF-8 based systems.

Thanks to Alexander E. Patrakov for the patch.
This commit is contained in:
Manuel Canales Esparcia 2006-10-30 17:53:07 +00:00
parent a96109a275
commit 6e8fc82f68
3 changed files with 11 additions and 0 deletions

View file

@ -55,6 +55,10 @@ endif
endif
endif
ifeq (/usr/include/locale.h, $(wildcard /usr/include/locale.h))
HOSTNCURSES += -DLOCALE=1
endif
CONF_SRC = conf.c
MCONF_SRC = mconf.c
LXD_SRC = lxdialog/checklist.c lxdialog/menubox.c lxdialog/textbox.c \

View file

@ -26,6 +26,10 @@
#include <stdlib.h>
#include <string.h>
#ifdef LOCALE
#include <locale.h>
#endif
#ifdef CURSES_LOC
#ifdef __sun__
#define CURS_MACROS

View file

@ -144,6 +144,9 @@ void dialog_clear (void)
void
init_dialog (void)
{
#ifdef LOCALE
setlocale(LC_CTYPE, ""); /* required by ncurses on linux UTF-8 console */
#endif
initscr (); /* Init curses */
keypad (stdscr, TRUE);
cbreak ();