Commit 446bfcd5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Do not use print colored help if stdout is not a TTY

parent b11eefc4
...@@ -1328,9 +1328,10 @@ static void Usage( libvlc_int_t *p_this, char const *psz_module_name ) ...@@ -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'; psz_spaces_text[PADDING_SPACES+LINE_START] = '\0';
memset( psz_spaces_longtext, ' ', LINE_START+2 ); memset( psz_spaces_longtext, ' ', LINE_START+2 );
psz_spaces_longtext[LINE_START+2] = '\0'; psz_spaces_longtext[LINE_START+2] = '\0';
#ifdef WIN32 #ifndef WIN32
b_color = false; // don't put color control codes in a .txt file if( !isatty( 1 ) )
#endif #endif
b_color = false; // don't put color control codes in a .txt file
if( b_color ) if( b_color )
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment