php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24069 ncurses
Submitted: 2003-06-06 16:16 UTC Modified: 2003-06-06 16:30 UTC
From: garrote at dm dot com dot br Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.2 OS: linux 2.4.20
Private report: No CVE-ID: None
 [2003-06-06 16:16 UTC] garrote at dm dot com dot br
it seems that using ncurses_waddch($window, ascii space) do not set the attribute properly without forcing the wrefresh.
if you use these function with, for example ascii "A" (65), its not necessary the wrefresh after the ncurses_waddch.
using wrefresh after all waddch causes overhead cpu usage.

example:

initialize, create window, set color

// the window was create with 20 lines and 60 colums...so
//$nr_linhas=20; $nr_colunas=60;

ncurses_wborder($win, 0,0,0,0,0,0,0,0);
$l = 1;
while($l < $nr_linhas - 1) {
$c = 1;
   ncurses_wmove($win, $l, 1);
   while($c++ < $nr_colunas - 1) {
      ncurses_waddch($win, 65);
      //ncurses_wrefresh($win); //only here attribute is set
   }
   $l++;
   // using wrefresh here nothing change
}
// using wrefresh here nothing change

using waddstr seems the same thing.
if you trie to use waddch once the attribute is set ok.
but using routine to put more than 13 charachters its necessary use wrefresh (after 13 characters).
:)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-06 16:25 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

bug #24067
 [2003-06-06 16:30 UTC] garrote at dm dot com dot br
sorry about that.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 13:01:29 2024 UTC