patch-2.0.36 linux/scripts/lxdialog/dialog.h

Next file: linux/scripts/lxdialog/lxdialog.c
Previous file: linux/scripts/checkconfig.pl
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.35/linux/scripts/lxdialog/dialog.h linux/scripts/lxdialog/dialog.h
@@ -28,6 +28,24 @@
 
 #include CURSES_LOC
 
+/*
+ * Colors in ncurses 1.9.9e do not work properly since foreground and
+ * background colors are OR'd rather than separately masked.  This version
+ * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible
+ * with standard curses.  The simplest fix (to make this work with standard
+ * curses) uses the wbkgdset() function, not used in the original hack.
+ * Turn it off if we're building with 1.9.9e, since it just confuses things.
+ */
+#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE)
+#define OLD_NCURSES 1
+#undef  wbkgdset
+#define wbkgdset(w,p) /*nothing*/
+#else
+#define OLD_NCURSES 0
+#endif
+
+#define TR(params) _tracef params
+
 #define ESC 27
 #define TAB 9
 #define MAX_LEN 2048

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov