[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Standards question wrt winnstr & friends
From: |
William McBrine |
Subject: |
Re: Standards question wrt winnstr & friends |
Date: |
Tue, 2 May 2006 12:25:12 -0400 (EDT) |
On Tue, 2 May 2006, Mike Aubury wrote:
Looking at the return values for the pdcurses winnstr family of functions:
All functions return OK on success and ERR on error.
Whereas the ncurses functions :
All of the functions return ERR upon failure, or the number of
characters actually read into the string.
According to the standard:
http://www.opengroup.org/onlinepubs/007908799/xcurses/winnstr.html
Upon successful completion, innstr(), mvinnstr(), mvwinnstr() and
winnstr() return the number of characters actually read into the string.
Otherwise, all these functions return ERR.
So ncurses' behavior is correct. It's interesting that the PDCurses
comments list OK/ERR as the X/Open behavior; it's possible that was based
on an earlier version of the standard. (Notice the compatibility charts
all refer to "X/Open '88".) But I've been unable to find earlier versions
online, so I don't know. (Just out of curiosity, does anyone out there
have them? Tom?)
I'll correct PDCurses. Thanks.
--
William McBrine <address@hidden>