Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: termcap special param



> There's no mention of NCURSES_VERSION anywhere in this patch ... what
> check do you mean?

I'm referring to the #if !defined(NCURSES_VERSION) || !defined(COLOR_PAIR)
stuff in bin_echotc, which is theoretically relevant for all calls to
tgetflag().

ncurses 4.2's tgetflag() will return ERR (-1) if called with an argument
not found in boolcodes.  ncurses 5.2's tgetflag() will return 0, a la
Solaris.

We could find out the relevant ncurses versions and qualify the
preprocessor directives, or we could determine what sort of
tgetflag() is present by a configure test, which I guess could
be as simple as testing the return value of tgetflag() when
called with a termcap code guaranteed not to be in boolcodes.
For example, 'co' is quite unlikely to be a boolean flag.



Messages sorted by: Reverse Date, Date, Thread, Author