From d2bcaa553a4989f49c75fe1fd51418cfe22a0dbd Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@vmiklos.hu>
Date: Thu, 14 Mar 2019 22:24:36 +0100
Subject: [PATCH 1/1] Port to ncursesw6

ESCDELAY is removed in ncursesw6, but set_escdelay() is available in
ncursesw5 already, so that can be changed unconditionally, it seems to
me.
---
 configure       |    6 +++++-
 configure.in    |    6 +++++-
 interface_gui.c |    2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

--- a/configure
+++ b/configure
@@ -3583,7 +3583,11 @@ fi

       if test "${ac_cv_lib_ncursesw_wget_wch}" == "yes"; then
         curses_found=1
-        curses_config=ncursesw5-config
+        if test -n "$(type -p ncursesw6-config)" ; then
+          curses_config=ncursesw6-config
+        else
+          curses_config=ncursesw5-config
+        fi
       fi
       ;;
   pdcurses)
--- a/configure.in
+++ b/configure.in
@@ -57,7 +57,11 @@ case ${use_curses_lib} in
       AC_CHECK_LIB(ncursesw, wget_wch)
       if test "${ac_cv_lib_ncursesw_wget_wch}" = "yes"; then
         curses_found=1
-        curses_config=ncursesw5-config
+        if test -n "$(type -p ncursesw6-config)" ; then
+          curses_config=ncursesw6-config
+        else
+          curses_config=ncursesw5-config
+        fi
       fi
       ;;
   pdcurses)
--- a/interface_gui.c
+++ b/interface_gui.c
@@ -1872,7 +1872,7 @@ int initializeScreen(void)
     assume_default_colors(-1, -1);

     /* we do not want any ESC delay */
-    ESCDELAY = 0;
+    set_escdelay(0);

     /* start color mode */
     initCDKColor();
