[llvm] r187874 - Add support for linking against a curses library when available and

Chandler Carruth chandlerc at google.com
Wed Aug 7 13:00:16 PDT 2013


On Wed, Aug 7, 2013 at 12:23 PM, Joerg Sonnenberger <joerg at britannica.bec.de
> wrote:

> On Wed, Aug 07, 2013 at 08:47:36AM -0000, Chandler Carruth wrote:
> > Log:
> > Add support for linking against a curses library when available and
> > using it to detect whether or not a terminal supports colors.
>
> I think it would preferable to use terminfo or termcap directly for
> this. The former exists at least on every system with ncurses and NetBSD
> 6+, the latter on another range of systems. All curses implementations I
> am aware of pull one of those two libraries in, but add more junk on
> top. I don't see any need for supporting termcap for optional colour
> support, so just going with terminfo sounds fine.


What specific library are you suggesting? I'm unable to find a library/API
for terminfo directly, and instead find just the specs for its database
format. Every piece of documentation I could find indicated that the curses
library was the blessed way of accessing the terminfo data with an API. But
perhaps Richard can shed more light here? I certainly am not an expert on
any of the "how" here, just trying to get the "what" right.

Relatedly, I think teaching LLVM to parse the terminfo database directly is
not likely a worthwhile exercise. I genuinely considered it, but curses is
a very lightweight dependency for the compiler to have in the grander
scheme of things, and so it seems quite unlikely to be a net win for us to
hand-roll code for this and try to get it to be portable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130807/2844cdad/attachment.html>


More information about the llvm-commits mailing list