From 446bfcd5f40d640097b4e765ae234c47b9831d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 5 Jun 2008 20:10:04 +0300 Subject: [PATCH] Do not use print colored help if stdout is not a TTY --- src/libvlc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libvlc.c b/src/libvlc.c index e06a719722..9c60cab88c 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -1328,9 +1328,10 @@ static void Usage( libvlc_int_t *p_this, char const *psz_module_name ) psz_spaces_text[PADDING_SPACES+LINE_START] = '\0'; memset( psz_spaces_longtext, ' ', LINE_START+2 ); psz_spaces_longtext[LINE_START+2] = '\0'; -#ifdef WIN32 - b_color = false; // don't put color control codes in a .txt file +#ifndef WIN32 + if( !isatty( 1 ) ) #endif + b_color = false; // don't put color control codes in a .txt file if( b_color ) { -- GitLab