+#if USE_REENTRANT
+#define GetEscdelay(sp) (sp)->_ESCDELAY
+NCURSES_EXPORT(int)
+NCURSES_PUBLIC_VAR(ESCDELAY) (void)
+{
+ return SP ? GetEscdelay(SP) : 1000;
+}
+#else
+#define GetEscdelay(sp) ESCDELAY
+NCURSES_EXPORT_VAR (int)
+ ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */
+#endif
+
+#if NCURSES_EXT_FUNCS
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(set_escdelay) (NCURSES_SP_DCLx int value)
+{
+ int code = OK;
+#if USE_REENTRANT
+ if (SP_PARM) {
+ SP_PARM->_ESCDELAY = value;
+ } else {
+ code = ERR;
+ }
+#else
+ (void) SP_PARM;
+ ESCDELAY = value;
+#endif
+ return code;
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+set_escdelay(int value)
+{
+ return NCURSES_SP_NAME(set_escdelay) (CURRENT_SCREEN, value);
+}
+#endif
+#endif /* NCURSES_EXT_FUNCS */
+
+static int
+_nc_use_meta(WINDOW *win)
+{
+ SCREEN *sp = _nc_screen_of(win);
+ return (sp ? sp->_use_meta : 0);
+}