wez             Sat Sep 28 18:50:23 2002 EDT

  Modified files:              
    /php4/ext/ncurses   ncurses_fe.c ncurses_functions.c php_ncurses_fe.h 
  Log:
  Added ncurses_getyx().
  
  
Index: php4/ext/ncurses/ncurses_fe.c
diff -u php4/ext/ncurses/ncurses_fe.c:1.16 php4/ext/ncurses/ncurses_fe.c:1.17
--- php4/ext/ncurses/ncurses_fe.c:1.16  Fri Sep 27 18:33:14 2002
+++ php4/ext/ncurses/ncurses_fe.c       Sat Sep 28 18:50:23 2002
@@ -175,6 +175,7 @@
        PHP_FE(ncurses_wborder,         NULL)
        PHP_FE(ncurses_whline,          NULL)
        PHP_FE(ncurses_wvline,          NULL)
+       PHP_FE(ncurses_getyx,           secondandthird_args_force_ref)
        
 #if HAVE_NCURSES_PANEL
        PHP_FE(ncurses_update_panels,   NULL)
Index: php4/ext/ncurses/ncurses_functions.c
diff -u php4/ext/ncurses/ncurses_functions.c:1.22 
php4/ext/ncurses/ncurses_functions.c:1.23
--- php4/ext/ncurses/ncurses_functions.c:1.22   Sat Sep 28 13:03:02 2002
+++ php4/ext/ncurses/ncurses_functions.c        Sat Sep 28 18:50:23 2002
@@ -1797,6 +1797,24 @@
 }
 /* }}} */
 
+/* {{{ proto void ncurses_getyx(resource window, int &y, int &x)
+   Returns the current cursor position for a window */
+PHP_FUNCTION(ncurses_getyx)
+{
+       zval **handle, **x, **y;
+       WINDOW **win;
+       if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &handle, &y, &x) == 
+FAILURE){
+               WRONG_PARAM_COUNT;
+       }
+
+       FETCH_WINRES(win, handle);
+
+       convert_to_long_ex(x);
+       convert_to_long_ex(y);
+
+       getyx(*win, Z_LVAL_PP(y), Z_LVAL_PP(x));
+}
+/* }}} */
 
 /* {{{ proto int ncurses_wmove(resource window, int y, int x)
    Moves windows output position */
Index: php4/ext/ncurses/php_ncurses_fe.h
diff -u php4/ext/ncurses/php_ncurses_fe.h:1.16 php4/ext/ncurses/php_ncurses_fe.h:1.17
--- php4/ext/ncurses/php_ncurses_fe.h:1.16      Fri Sep 27 18:33:14 2002
+++ php4/ext/ncurses/php_ncurses_fe.h   Sat Sep 28 18:50:23 2002
@@ -161,6 +161,7 @@
 PHP_FUNCTION(ncurses_wborder);
 PHP_FUNCTION(ncurses_whline);
 PHP_FUNCTION(ncurses_wvline);
+PHP_FUNCTION(ncurses_getyx);
 #if HAVE_NCURSES_PANEL
 PHP_FUNCTION(ncurses_update_panels);
 PHP_FUNCTION(ncurses_panel_window);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to