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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bnewton at networkmerchants dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 07:01:26 2025 UTC