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

Chandler Carruth chandlerc at google.com
Wed Aug 7 13:02:26 PDT 2013


On Wed, Aug 7, 2013 at 12:25 PM, Sean Silva <silvas at purdue.edu> wrote:

> On Wed, Aug 7, 2013 at 12:19 PM, Richard <legalize at xmission.com> wrote:
>
>>
>> (Background: I'm the creator of the terminals wiki, linked in my
>> signature, and I probably know way too much about terminals, escape
>> codes, curses, termcap, etc., than any sane person should know :-).
>> Amazingly enough, I have quite a bit of company in that box of insane
>> persons.)
>>
>
> Do you have any idea if it would be too much code to detect the presence
> of color terminals ourselves? (e.g. just hardcoding the small(?) amount of
> specific functionality we need to detect color support and nothing else)
>

I see two possible ways to do this, both of which I considered and rejected.

1) Parse the terminfo database by hand in LLVM. See my reply to Joerg, this
looks like a considerable amount of work, a huge portability problem, and
ultimately not much of a win over uses curses.

2) Manually build up a list of TERM strings that support colors. We could
potentially mine terminfo data to build the initial list and just bake it
into the code. However, that means that Joe Clever Developer who writes his
own terminal emulator with perfect support for colors gets no help. That
doesn't seem like the right tradeoff either.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130807/c97c4d97/attachment.html>


More information about the llvm-commits mailing list