[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is_wintouched() and is_linetouched() cannot return ERR
From: |
Thomas Dickey |
Subject: |
Re: is_wintouched() and is_linetouched() cannot return ERR |
Date: |
Sat, 18 Nov 2017 18:39:51 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Nov 14, 2017 at 09:00:29PM +0900, Midolikawa H. wrote:
> Thank you for developing, maintaining and supporting ncurses.
>
> ... and I have noticed that
> the manual page declares is_wintouched() and is_linetouched() to be bool,
> but also says they return the integer ERR upon failure.
>
> Acutally, is_wintouched() returns 0 when window pointer is null.
> is_linetouched returns 1 if window pointer is null or line is not valid.
The manual for this one already says:
The is_linetouched and is_wintouched routines return TRUE if the speci‐
fied line/window was modified since the last call to wrefresh; other‐
wise they return FALSE. In addition, is_linetouched returns ERR if
line is not valid for the given window.
(TRUE is 1, FALSE is 0)
and the mention of ERR does not apply to is_wintouched,
since it is "otherwise noted":
All routines return the integer ERR upon failure and an integer value
other than ERR upon successful completion, unless otherwise noted in
the preceding routine descriptions.
Regarding is_linetouched, that also is already documented:
is_linetouched
returns an error if the window pointer is null, or if the line
number is outside the window. Note that ERR is distinct from
TRUE and FALSE, which are the normal return values of this
function.
--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: Digital signature