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

Re: termcap bug on Linux



On May 30, 10:00am, Clint Adams wrote:
} Subject: Re: termcap bug on Linux
}
} I'm fine with the consistency.  I just think that an unconditional
} reliance on NCURSES_VERSION being set is going to lead to trouble.

Back in 13987 you wrote:
} 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.

The test in termcap.c is

    #if !defined(NCURSES_VERSION) || !defined(COLOR_PAIR)

COLOR_PAIR is defined in ncurses 4.2, so apparently this behavior has
bounced back and forth with different versions of ncurses.  So it looks
as if a configure test may be the safest approach, but it might be OK
to test (NCURSES_MAJOR_VERSION < 5).

I'm going to commit 14516 as it is, and then look at this a bit more.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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