Patch wscrl_scrollok for ncurses Bug #72460
Patch version 2016-06-20 14:00 UTC
Return to Bug #72460 |
Download this patch
Patch Revisions:
Developer: perepechaev@inbox.ru
diff --git a/ncurses_fe.c b/ncurses_fe.c
index 3b523df..fe92828 100644
--- a/ncurses_fe.c
+++ b/ncurses_fe.c
@@ -143,6 +143,8 @@ zend_function_entry ncurses_functions[] = {
PHP_FE(ncurses_mouseinterval, NULL)
PHP_FE(ncurses_napms, NULL)
PHP_FE(ncurses_scrl, NULL)
+ PHP_FE(ncurses_wscrl, NULL)
+ PHP_FE(ncurses_scrollok, NULL)
PHP_FE(ncurses_slk_attroff, NULL)
PHP_FE(ncurses_slk_attron, NULL)
PHP_FE(ncurses_slk_attrset, NULL)
diff --git a/ncurses_functions.c b/ncurses_functions.c
index 90f6ed5..e215fc8 100644
--- a/ncurses_functions.c
+++ b/ncurses_functions.c
@@ -985,6 +985,43 @@ PHP_FUNCTION(ncurses_scrl)
}
/* }}} */
+
+/* {{{ proto int ncurses_wscrl(resource window)
+ Scroll windwow content */
+PHP_FUNCTION(ncurses_wscrl)
+{
+ zval *handle;
+ WINDOW **win;
+ long n;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &handle, &n) == FAILURE) {
+ return;
+ }
+ FETCH_WINRES(win, &handle);
+
+ RETURN_LONG(wscrl(*win, n));
+}
+/* }}} */
+
+/* {{{ proto int ncurses_scrollok(resource window)
+ Scroll windwow content */
+PHP_FUNCTION(ncurses_scrollok)
+{
+ zval *handle;
+ WINDOW **win;
+ long n;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &handle, &n) == FAILURE) {
+ return;
+ }
+
+ FETCH_WINRES(win, &handle);
+
+ RETURN_LONG(scrollok(*win, n));
+}
+/* }}} */
+
+
/* {{{ proto int ncurses_slk_attroff(int intarg)
??? */
PHP_FUNCTION(ncurses_slk_attroff)
diff --git a/php_ncurses_fe.h b/php_ncurses_fe.h
index 42eb203..bdfcfd5 100644
--- a/php_ncurses_fe.h
+++ b/php_ncurses_fe.h
@@ -93,6 +93,8 @@ PHP_FUNCTION(ncurses_insdelln);
PHP_FUNCTION(ncurses_mouseinterval);
PHP_FUNCTION(ncurses_napms);
PHP_FUNCTION(ncurses_scrl);
+PHP_FUNCTION(ncurses_wscrl);
+PHP_FUNCTION(ncurses_scrollok);
PHP_FUNCTION(ncurses_slk_attroff);
PHP_FUNCTION(ncurses_slk_attron);
PHP_FUNCTION(ncurses_slk_attrset);
|