php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40225 ncurses_instr() is broken
Submitted: 2007-01-24 20:16 UTC Modified: 2007-01-24 20:45 UTC
From: bnewton at networkmerchants dot com Assigned:
Status: Not a bug Package: ncurses related
PHP Version: 5.2.0 OS: gentoo Linux 2006
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 - 47 = ?
Subscribe to this entry?

 
 [2007-01-24 20:16 UTC] bnewton at networkmerchants dot com
Description:
------------
ncurses_instr appears to be broken. It returns a random number of lowercase q's without waiting for actual user input. 

Reproduce code:
---------------
$name = 0;
ncurses_init();
ncurses_addstr("Enter Your Name");
ncurses_move(1,0); 
ncurses_instr($name);
ncurses_move(2,0); 
ncurses_addstr(" Hello $name");
ncurses_getch();
ncurses_end();

Expected result:
----------------
Enter Your Name
Bill
Hello Bill

Actual result:
--------------
Enter Your Name
Bill
Hello qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq



number of q's vary from execution to execution typically over one hundred

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-24 20:45 UTC] tony2001@php.net
ncurses_instr() does completely different thing.
What you need is ncurses_getch().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 07:01:32 2024 UTC