|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-06 19:58 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
Description: ------------ Using PHP CLI 5.0.0RC2 Ncurses 5.4 --with-ncurses When using ncurses_mvwaddstr(), the text to be added does not appear in the ncurses window specified, but appears in the top-left corner of the terminal window. Neither of the y,x coordinates change where the text goes. This source example is derived from the Zend ncurses tutorial. Reproduce code: --------------- <?php define("ESCAPE_KEY",27); $ncurse = ncurses_init(); $small = ncurses_newwin(10,30,7,25); while(1){ ncurses_wborder($small,0,0, 0,0, 0,0, 0,0); ncurses_wrefresh($small); $pressed = ncurses_getch(); If($pressed == ESCAPE_KEY){ ncurses_end(); exit; }else{ ncurses_mvwaddstr($small,2,2,$pressed); } } ?> Expected result: ---------------- This is expected to add the character number to the "$small" window at coordinates 2,2; and exit when ESC is pressed. Actual result: -------------- The charatcer is not inserted into the "$small" window at coords 2,2; but onto the terminal at 0,0. ESC works as expected (however there is a half-second delay from pressing it to the program exiting.)