Merge branch 'upstream-kwsys' into update-kwsys

This commit is contained in:
Brad King 2015-10-19 09:16:32 -04:00
commit c6d75294b2
1 changed files with 11 additions and 0 deletions

View File

@ -184,14 +184,25 @@ static const char* kwsysTerminalVT100Names[] =
static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100, static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
int default_tty) int default_tty)
{ {
/* Force color according to http://bixense.com/clicolors/ convention. */
{
const char* clicolor_force = getenv("CLICOLOR_FORCE");
if (clicolor_force && *clicolor_force && strcmp(clicolor_force, "0") != 0)
{
return 1;
}
}
/* If running inside emacs the terminal is not VT100. Some emacs /* If running inside emacs the terminal is not VT100. Some emacs
seem to claim the TERM is xterm even though they do not support seem to claim the TERM is xterm even though they do not support
VT100 escapes. */ VT100 escapes. */
{
const char* emacs = getenv("EMACS"); const char* emacs = getenv("EMACS");
if(emacs && *emacs == 't') if(emacs && *emacs == 't')
{ {
return 0; return 0;
} }
}
/* Check for a valid terminal. */ /* Check for a valid terminal. */
if(!default_vt100) if(!default_vt100)