php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #21174 ncurses oddities
Submitted: 2002-12-24 15:49 UTC Modified: 2002-12-25 12:54 UTC
From: joeldegan at yahoo dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.2.3 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joeldegan at yahoo dot com
New email:
PHP Version: OS:

 

 [2002-12-24 15:49 UTC] joeldegan at yahoo dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-25 03:42 UTC] georg@php.net
Please check the man pages for standout and standend.

The documentation isn't finsihed still, but feel free to contribute.
 [2002-12-25 12:54 UTC] joeldegan at yahoo dot com
ahh, I see
there is a reason (thus my question). 
I could not found that in the ncurses docs it only seemed to appear in PHP/ncurses related docs and so it seemed very odd.
Having checked over the man pages I see.

Thanks for responding and clearing that up.
-Joel

oh, and merry christmas :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 15:01:39 2024 UTC