/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
#include <curses.priv.h>
-MODULE_ID("$Id: lib_getch.c,v 1.97 2008/08/03 22:56:42 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.100 2009/02/15 00:36:00 tom Exp $")
#include <fifo_defs.h>
}
#else
#define GetEscdelay(sp) ESCDELAY
-NCURSES_EXPORT_VAR(int)
-ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */
+NCURSES_EXPORT_VAR (int)
+ ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */
#endif
#if NCURSES_EXT_FUNCS
NCURSES_EXPORT(int)
-set_escdelay(int value)
+NCURSES_SP_NAME(set_escdelay) (NCURSES_SP_DCLx int value)
{
int code = OK;
#if USE_REENTRANT
- if (SP) {
- SP->_ESCDELAY = value;
+ 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)
{
#ifdef USE_PTHREADS
SCREEN *sp = _nc_screen_of(win);
- if (sp != SP) {
+ if (_nc_use_pthreads && sp != SP) {
SCREEN *save_SP;
/* temporarily switch to the window's screen to check/refresh */
if (sp != 0) {
#ifdef USE_PTHREADS
- if (sp != SP) {
+ if (_nc_use_pthreads && sp != SP) {
SCREEN *save_SP;
/* temporarily switch to the window's screen to get cooked input */
recur_wrefresh(win);
- if (!win->_notimeout && (win->_delay >= 0 || sp->_cbreak > 1)) {
+ if (win->_notimeout || (win->_delay >= 0) || (sp->_cbreak > 1)) {
if (head == -1) { /* fifo is empty */
int delay;
int rc;