php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64706
Patch add-ncurses_wtimeout revision 2013-04-24 19:01 UTC by mfm at rhsonline dot net

Patch add-ncurses_wtimeout for ncurses Bug #64706

Patch version 2013-04-24 19:01 UTC

Return to Bug #64706 | Download this patch
Patch Revisions:

Developer: mfm@rhsonline.net

diff -u ncurses-1.0.2/ncurses_fe.c ncurses-dev/ncurses_fe.c
--- ncurses-1.0.2/ncurses_fe.c	2012-06-16 13:05:19.000000000 -0400
+++ ncurses-dev/ncurses_fe.c	2013-04-02 13:52:43.492102418 -0400
@@ -163,6 +163,7 @@
 	PHP_FE(ncurses_noqiflush,		NULL)
 	PHP_FE(ncurses_qiflush,			NULL)
 	PHP_FE(ncurses_timeout,			NULL)
+	PHP_FE(ncurses_wtimeout,			NULL)
 	PHP_FE(ncurses_use_env,			NULL)
 	PHP_FE(ncurses_addstr,			NULL)
 	PHP_FE(ncurses_putp,			NULL)
diff -u ncurses-1.0.2/ncurses_functions.c ncurses-dev/ncurses_functions.c
--- ncurses-1.0.2/ncurses_functions.c	2012-06-16 13:05:19.000000000 -0400
+++ ncurses-dev/ncurses_functions.c	2013-04-02 13:52:43.492102418 -0400
@@ -1170,6 +1170,23 @@
 }
 /* }}} */
 
+/* {{{ proto void ncurses_wtimeout(resource window,int millisec)
+   Sets timeout for special key sequences */
+PHP_FUNCTION(ncurses_wtimeout)
+{
+	zval *handle;
+	WINDOW **w;
+	long intarg;
+	
+	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &handle, &intarg) == FAILURE) {
+		return;
+	}
+	IS_NCURSES_INITIALIZED();
+	FETCH_WINRES(w, &handle);
+	wtimeout(*w,intarg);
+}
+/* }}} */
+
 /* {{{ proto void ncurses_use_env(int flag)
    Controls use of environment information about terminal size */
 PHP_FUNCTION(ncurses_use_env)
diff -u ncurses-1.0.2/php_ncurses_fe.h ncurses-dev/php_ncurses_fe.h
--- ncurses-1.0.2/php_ncurses_fe.h	2012-06-16 13:05:19.000000000 -0400
+++ ncurses-dev/php_ncurses_fe.h	2013-04-02 13:56:29.792102409 -0400
@@ -109,6 +109,7 @@
 PHP_FUNCTION(ncurses_noqiflush);
 PHP_FUNCTION(ncurses_qiflush);
 PHP_FUNCTION(ncurses_timeout);
+PHP_FUNCTION(ncurses_wtimeout);
 PHP_FUNCTION(ncurses_use_env);
 PHP_FUNCTION(ncurses_addstr);
 PHP_FUNCTION(ncurses_putp);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC