From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.2.3
PHP Bug Type:     *Extensibility Functions
Bug description:  ncurses oddities

I actually posted this to the comments for ncurses_attron and it was
removed as it is more of a question about why certain functions are being
put into ncurses-PHP and they asked that I post it here instead.


> The following are defined constants..
> 
> NCURSES_A_ALTCHARSET   Alternate character set
> NCURSES_A_BLINK        Blinking
> NCURSES_A_BOLD         Extra bright or bold
> NCURSES_A_DIM          Half bright
> NCURSES_A_INVIS        Invisible
> NCURSES_A_PROTECT      Protected
> NCURSES_A_REVERSE      Reverse video
> NCURSES_A_STANDOUT     Best highlighting mode of the
> terminal
> NCURSES_A_UNDERLINE    Underlining
> 
> so as the following:
> 
> ncurses_attron(NCURSES_A_BOLD); // turn on
> ncurses_addstr("Press ESC to exit"); // out put
> ncurses_hline(NCURSES_ACS_DIAMOND,5);// other fun
> stuff
> ncurses_attroff(NCURSES_A_BOLD); // turn off
> 
> Then I start looking around and see that for some
> reason they are creating functions to do this?
> i.e. 
> ncurses_standout(); // in place of
> NCURSES_A_STANDOUT ???
> and
> ncurses_standend();
> 
> umm.. guys, this makes no sense to create functions
> for each of the attr's
> Guess we will see once it is final.
> -- 

My point was that creating functions for doing this seems very odd..
I am not complaining about this as I am sure there is a reason for doing
it, but it really does seem odd and I was curious if there was going to be
ncurses_boldout() etc..

I have been going through a lot of this as I am writing and advanced
tutorial for ncurses with PHP and so most of my information for working
with these functions is actually coming from man pages for ncurses and
other ncurses programming pages I have found (mostly in C and Perl). 

I am really hoping to inspire some interest in php-ncurses programming as
it really makes PHP CLI application programs so much nicer and might help
people in similar positions to myself who are trying to get away from Perl
and C in favor or writing these interfaces in PHP.

Also, as you "well know" the documentation for ncurses_wborder and many of
the other ncurses_w.. function docs are missing and also over 100 defined
constants. (DIAMOND, BLOCK WA_* etc).

Anyway, I would be willing to help with some of the documentation here if
it is needed.

Thanks

-Joel De Gan
-- 
Edit bug report at http://bugs.php.net/?id=21174&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21174&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21174&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21174&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21174&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21174&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21174&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21174&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21174&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21174&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21174&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21174&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21174&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21174&r=isapi

Reply via email to