|
From: | Bryan Christ |
Subject: | Re: Return value of pair_content() |
Date: | Sat, 19 Jan 2019 21:32:12 -0600 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |