aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/lib_getch.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_getch.c')
-rw-r--r--contrib/ncurses/ncurses/base/lib_getch.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_getch.c b/contrib/ncurses/ncurses/base/lib_getch.c
index 64566ccc7629..11e8052a668c 100644
--- a/contrib/ncurses/ncurses/base/lib_getch.c
+++ b/contrib/ncurses/ncurses/base/lib_getch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2008 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 *
@@ -41,7 +41,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_getch.c,v 1.80 2007/09/29 20:39:34 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.82 2008/01/19 21:07:30 tom Exp $")
#include <fifo_defs.h>
@@ -56,6 +56,24 @@ 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)
+{
+ int code = OK;
+#if USE_REENTRANT
+ if (SP) {
+ SP->_ESCDELAY = value;
+ } else {
+ code = ERR;
+ }
+#else
+ ESCDELAY = value;
+#endif
+ return code;
+}
+#endif
+
#ifdef NCURSES_WGETCH_EVENTS
#define TWAIT_MASK 7
#else