php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31876 Inconsistant Behaviour With ncurses_mvwaddstr
Submitted: 2005-02-07 22:08 UTC Modified: 2005-02-15 15:43 UTC
From: dgrimes at scvl dot com Assigned:
Status: Closed Package: ncurses related
PHP Version: 4.3.10 OS: SCO OpenServer 5
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: dgrimes at scvl dot com
New email:
PHP Version: OS:

 

 [2005-02-07 22:08 UTC] dgrimes at scvl dot com
Description:
------------
When setting reverse video on and outputting a string, mvwaddstr doesn't always out put the entire string. If the end of the string being output is more than 6 spaces than the readable text in the string, the reverse video will only apply to the readable characters in the string. Are you confused yet?

OK: Have a string 'test   ', the full length of the string will be in reverse video including the trailing spaces. If we have string that is 'test       ', only the word test will be in reverse video but the trailing spaces will not be in reverse video. Remove one of the spaces and then the whole string will be in reverse video. You can use strings that consist only of spaces and get the same results.

Reproduce code:
---------------
<? 
$ncurse = ncurses_init(); 
$scn = ncurses_newwin (8,20,  0,0); 
ncurses_wattron($scn,NCURSES_A_REVERSE);
// test with 6 trailing spaces - works
ncurses_mvwaddstr($scn,1,1,'test      ');

// test with 7 trailing spaces - doesn't work
ncurses_mvwaddstr($scn,3,1,'test       ');

//longer string with 6 trailing spaces - works
ncurses_mvwaddstr($scn,5,1,'testx      ');

ncurses_wattroff($scn,NCURSES_A_REVERSE);
ncurses_wrefresh($scn); 
ncurses_end();
?>


Expected result:
----------------
I would expect the entire length of the string to be in reverse video. What I'm trying to do is make each area of the screen that is an input field to be easily identified.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-10 15:07 UTC] sniper@php.net
Works just fine for me using latest CVS checkout of PHP_4_3 branch. Installed ncurses version: 5.4

Are you sure it isn't a bug in the ncurses version you have in your system..?

 [2005-02-15 15:43 UTC] dgrimes at scvl dot com
OK... I figured out the problem. I was running all of the correct versions of code and libraries. My problems stemmed from improperly setup terminfo entries in my terminfo database AND the terminal emulator was incompatible with the TERM setup I was using. It was a combination of two issues. But I have got it working just fine now. So I have closed this bug report. Sorry for reporting a false issue. I'm very new to ncurses and I still have a lot to learn. Right new everything is work fine.

Dean
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 19:01:26 2024 UTC