r3196 - in jhalfs/trunk/menu: . lxdialog

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Mon Oct 30 09:53:09 PST 2006


Author: manuel
Date: 2006-10-30 10:53:07 -0700 (Mon, 30 Oct 2006)
New Revision: 3196

Modified:
   jhalfs/trunk/menu/Makefile
   jhalfs/trunk/menu/lxdialog/dialog.h
   jhalfs/trunk/menu/lxdialog/util.c
Log:
Fixed menuconfig look on UTF-8 based systems.
Thanks to Alexander E. Patrakov for the patch.

Modified: jhalfs/trunk/menu/Makefile
===================================================================
--- jhalfs/trunk/menu/Makefile	2006-10-24 02:49:37 UTC (rev 3195)
+++ jhalfs/trunk/menu/Makefile	2006-10-30 17:53:07 UTC (rev 3196)
@@ -55,6 +55,10 @@
 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 \

Modified: jhalfs/trunk/menu/lxdialog/dialog.h
===================================================================
--- jhalfs/trunk/menu/lxdialog/dialog.h	2006-10-24 02:49:37 UTC (rev 3195)
+++ jhalfs/trunk/menu/lxdialog/dialog.h	2006-10-30 17:53:07 UTC (rev 3196)
@@ -26,6 +26,10 @@
 #include <stdlib.h>
 #include <string.h>
 
+#ifdef LOCALE
+#include <locale.h>
+#endif
+
 #ifdef CURSES_LOC
 #ifdef __sun__
 #define CURS_MACROS

Modified: jhalfs/trunk/menu/lxdialog/util.c
===================================================================
--- jhalfs/trunk/menu/lxdialog/util.c	2006-10-24 02:49:37 UTC (rev 3195)
+++ jhalfs/trunk/menu/lxdialog/util.c	2006-10-30 17:53:07 UTC (rev 3196)
@@ -144,6 +144,9 @@
 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 ();




More information about the alfs-log mailing list