bug-ncurses
[Top][All Lists]
Advanced

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

Re: Is there a portable way to check scrollok() value on a window?


From: Thomas Dickey
Subject: Re: Is there a portable way to check scrollok() value on a window?
Date: Thu, 29 Mar 2007 17:11:37 -0400 (EDT)

On Thu, 29 Mar 2007, Bryan Christ wrote:

yes/no (that's refresh in my mind because ncurses' Ada95 interface has a function which uses the "._scroll" member of WINDOW, and that prevented a complete build using --enable-reentrant last week).

That is, it has a member of the struct which can be tested.
The "_scroll" name is used in more than one flavor of curses.

It won't be accessible when NCURSES_OPAQUE is defined (which is optional except when configuring for the reentrant code I'm working on).

But for the NCURSES_OPAQUE stuff, I'm considering adding an access function as an extension. Probably I'll make that "is_scrollok()". Ditto for the other bool variables in the same chunk of curses.h

So the short answer is that you can test the struct member in existing
code, but may want to have a fallback macro in your configuration to
accommodate whatever flavors of the ncurses libraries may seem useful...

A quick check of other implementations: pdcurses has the same struct
member, like SVr4.  NetBSD implements an opaque WINDOW, does not provide
a way to query the flags. In that case, the only way to handle it is to have the application remember the setting.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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