]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_getch.c
ncurses 5.6 - patch 20080119
[ncurses.git] / ncurses / base / lib_getch.c
index 64566ccc762943f87e7257898890a229bf70c346..11e8052a668c6c8a430ac660162ed3caa8259acb 100644 (file)
@@ -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