bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Return value of pair_content()


From: Thomas Dickey
Subject: Re: Return value of pair_content()
Date: Sat, 19 Jan 2019 20:47:50 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Jan 18, 2019 at 09:59:45AM -0600, Bryan Christ wrote:
> According to the man pages the return value of pair_content() is somewhat
> undefined:
> 
> "All other routines return the integer ERR upon failure and an OK  (SVr4
> specifies  only an integer value other than ERR”) upon successful
> completion.  X/Open defines no error conditions."

X/Open doesn't define much of any error conditions, but the SVr4 systems
do document (most) error conditions.
 
> I would like to kindly proposing that pair_content() return ERR if specific
> pair hasn't been set.

If a pair hasn't been set, then ncurses has initialized fg and bg to 0,
which isn't likely a useful color pair.  SVr4 curses would return ERR,
but that adds space (and would make the struct sizes not a power of 2,
wasting additional time/space...)

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]