check for Xinitscr in pdcurses and define XCURSES if available
This commit is contained in:
@@ -69,6 +69,9 @@ if test "$pdcurses" = "XCurses" && test "$CURSES_CONFIG" != "" ; then
|
|||||||
else
|
else
|
||||||
AC_CHECK_LIB($curses_lib, initscr, LDFLAGS="$LDFLAGS -l$curses_lib", AC_MSG_ERROR([$ncurses_lib library is required]))
|
AC_CHECK_LIB($curses_lib, initscr, LDFLAGS="$LDFLAGS -l$curses_lib", AC_MSG_ERROR([$ncurses_lib library is required]))
|
||||||
fi
|
fi
|
||||||
|
if test "$pdcurses" != "no" ; then
|
||||||
|
AC_CHECK_LIB($curses_lib, Xinitscr, AC_DEFINE([XCURSES], [1], [x11 pdcurses available]), )
|
||||||
|
fi
|
||||||
AC_CHECK_HEADERS([curses.h], , AC_MSG_ERROR([missing ncurses.h header]))
|
AC_CHECK_HEADERS([curses.h], , AC_MSG_ERROR([missing ncurses.h header]))
|
||||||
|
|
||||||
dnl =================================
|
dnl =================================
|
||||||
|
|||||||
@@ -41,12 +41,12 @@ void NCurses::InitScreen(const char *window_title, bool enable_colors)
|
|||||||
COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE
|
COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE
|
||||||
};
|
};
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
# if defined(USE_PDCURSES) && defined(XCURSES)
|
# ifdef XCURSES
|
||||||
Xinitscr(1, const_cast<char **>(&window_title));
|
Xinitscr(1, const_cast<char **>(&window_title));
|
||||||
# else
|
# else
|
||||||
window_title = 0; // silence compiler
|
window_title = 0; // silence compiler
|
||||||
initscr();
|
initscr();
|
||||||
# endif // USE_PDCURSES && XCURSES
|
# endif // XCURSES
|
||||||
if (has_colors() && enable_colors)
|
if (has_colors() && enable_colors)
|
||||||
{
|
{
|
||||||
start_color();
|
start_color();
|
||||||
|
|||||||
@@ -25,10 +25,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(WIN32) && defined(USE_PDCURSES)
|
|
||||||
# define XCURSES
|
|
||||||
#endif // !WIND32 && USE_PDCURSES
|
|
||||||
|
|
||||||
#include "curses.h"
|
#include "curses.h"
|
||||||
|
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
|||||||
Reference in New Issue
Block a user