[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Standards question wrt winnstr & friends
From: |
Thomas Dickey |
Subject: |
Re: Standards question wrt winnstr & friends |
Date: |
Tue, 2 May 2006 11:51:52 -0400 (EDT) |
On Tue, 2 May 2006, Mike Aubury wrote:
Just trying to get the ncurses libform compiled with pdcurses - noticed a
slight difference..
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.
I see (actually it appears that the manpage does not say this, but the
code does).
As the libform files "frm_driver.c" function Windows_To_Buffer makes use of
this count - its causing me troubles (as pdcurses is returning 0!)
Is that PDCurses 2.6 or 2.7?
The latter changes ERR from a 0 to -1
(a quick check of the versions shows a 2.8 for current version).
For now - I'm working around it in my version of the libform code - but which
is the "right" return value ?
offhand I would say they should return zero - will look/see what the
history of that was: if it was never documented/never used, I can
make it conform to the spec. Otherwise it's a wart.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net