diff options
-rw-r--r-- | INSTALL | 5 | ||||
-rw-r--r-- | configure.ac | 16 | ||||
-rw-r--r-- | src/interface-curses/interface.c | 3 |
3 files changed, 14 insertions, 10 deletions
@@ -27,9 +27,10 @@ SciTECO Build and Runtime Dependencies * NetBSD Curses (https://github.com/sabotage-linux/netbsd-curses). This is the default on NetBSD. * PDCurses/XCurses (http://pdcurses.sourceforge.net/). - Note that XCurses v3.4 appears to be broken, you should + Note that XCurses v3.4 appears to be broken, you may have to build from PDCurses Git instead. - * PDCurses/Win32a (http://www.projectpluto.com/win32a.htm). + * PDCursesMod (https://github.com/Bill-Gray/PDCursesMod.git). + I recommend v4.3.2 or later. * PDCurses/EMCurses (https://github.com/rhaberkorn/emcurses). * other curses implementations might work as well but are untested * When choosing the GTK interface: diff --git a/configure.ac b/configure.ac index a1dab35..3f50576 100644 --- a/configure.ac +++ b/configure.ac @@ -277,7 +277,7 @@ case $INTERFACE in overriding the autoconf check ]) if [[ "x$PDCURSES_LIBS" = "x" ]]; then - AC_CHECK_LIB(pdcurses, initscr, , [ + AC_CHECK_LIB(pdcurses, PDC_get_version, , [ AC_MSG_ERROR([libpdcurses missing! Perhaps it is not named correctly or has wrong permissions.]) ]) @@ -287,17 +287,19 @@ case $INTERFACE in LIBS="$LIBS $PDCURSES_LIBS" fi - AC_CHECK_FUNC([PDC_set_resize_limits], [ - AC_DEFINE(PDCURSES_MOD, 1, [PDCursesMod extensions]) - ]) - # It is crucial to define PDC_WIDE before including curses.h. + # FIXME: MinGW has a pdcurses.h that already defines all necessary macros, + # but it's not in upstream PDCurses/PDCursesMod. AC_CHECK_FUNC([add_wch], [ - AC_DEFINE(PDC_WIDE, 1, [Built with wide-character support]) + AC_DEFINE(PDC_WIDE, 1, [PDCurses built with wide-character support]) + # FIXME: It would be better to check for PDC_FORCE_UTF8. + # Theoretically, we could check for endwin_u[32|64]_4302, + # but I'm not sure this will work reliably in the future. + AC_DEFINE(PDC_FORCE_UTF8, 1, [PDCursesMod forces use of UTF8]) ]) # This is detectable at runtime on PDCursesMod using PDC_get_version(). - # "Classic" PDCurses does not allow runtime or compile-time checks for + # "Classic" PDCurses however does not allow runtime or compile-time checks for # discerning eg. WinCon from SDL. if [[ $INTERFACE = pdcurses-gui ]]; then AC_DEFINE(PDCURSES_GUI, 1, [PDCurses with GUI window]) diff --git a/src/interface-curses/interface.c b/src/interface-curses/interface.c index 4b51e2c..93f9e99 100644 --- a/src/interface-curses/interface.c +++ b/src/interface-curses/interface.c @@ -691,7 +691,7 @@ teco_interface_init_interactive(GError **error) g_setenv("TERM", "#win32con", TRUE); #endif -#ifdef PDCURSES_MOD +#ifdef __PDCURSESMOD__ /* * Necessary to enable window resizing in WinGUI port */ @@ -1629,6 +1629,7 @@ teco_interface_event_loop_iter(void) #ifdef KEY_RESIZE case KEY_RESIZE: #ifdef __PDCURSES__ + /* NOTE: No longer necessary since PDCursesMod v4.3.3. */ resize_term(0, 0); #endif teco_interface_resize_all_windows(); |