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

Richard legalize at xmission.com
Wed Aug 7 12:19:07 PDT 2013


(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.)

In article <CAGCO0Kg2dNkkWzpNe0BJu_jbLPgbaOc=P-L8Bq+du638m2V9Lg at mail.gmail.com>,
    Chandler Carruth <chandlerc at gmail.com> writes:

> [...] my argument is that if we have a TERM environment variable and
> are incapable of querying the standard databases for interpreting it we
> have two wrong choices:
> 1) Show colors, causing some terminals to show a really ugly set of escape
> codes if they don't support colors.
> 2) Don't show colors, causing some  terminals to have a monochromatic
> diagnostic experience when they could have a colorful one.
> 
> Before, we picked #1, and now we pick #2. I think that is the right
> decision.

I agree.

> It is a much worse experience to have escape codes in your
> diagnostics than to not have colors.

I agree here as well.

There is the question of Windows/DOS, which has ANSI color escape
sequence support, but is an environment where users typically do not
have the TERM environment variable set and one can't assume that
curses is installed.

However, curses can be installed and when installed it is also trivial
to simply TERM to "ansi" (there are multiple flavors of ANSI.SYS
support in the termcap database).

I would be curious to know what happens currently on Windows/DOS when
a clang diagnostic is issued.  This is the one area where I could see
this as a big regression for most folks, but since the existing code
only issues the color codes when TERM is not set to "dumb", I'm not
sure how they could be getting the colors in the first place.  Perhaps
someone could enlighten me.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>



More information about the llvm-commits mailing list