]> git.sesse.net Git - vlc/commitdiff
* src/libvlc.c: fixed the "color" config option.
authorGildas Bazin <gbazin@videolan.org>
Wed, 9 Apr 2003 19:58:25 +0000 (19:58 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 9 Apr 2003 19:58:25 +0000 (19:58 +0000)
* src/misc/messages.c: removed an unnecessary #ifdef WIN32 in PrintMsg().

src/libvlc.c
src/misc/messages.c

index fe956353acbe5fb7bab2149247fdf0b219e911f6..c4925395867095e8ee369262d57afe2381dcb2d9 100644 (file)
@@ -2,7 +2,7 @@
  * libvlc.c: main libvlc source
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: libvlc.c,v 1.77 2003/04/08 08:35:59 massiot Exp $
+ * $Id: libvlc.c,v 1.78 2003/04/09 19:58:25 gbazin Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -155,7 +155,7 @@ int VLC_Create( void )
         psz_env = getenv( "VLC_VERBOSE" );
         libvlc.i_verbose = psz_env ? atoi( psz_env ) : -1;
 
-#ifdef HAVE_ISATTY
+#if defined( HAVE_ISATTY ) && !defined( WIN32 )
         libvlc.b_color = isatty( 2 ); /* 2 is for stderr */
 #else
         libvlc.b_color = VLC_FALSE;
@@ -435,7 +435,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
             libvlc.i_verbose = __MIN( i_tmp, 2 );
         }
     }
-    libvlc.b_color = libvlc.b_color || config_GetInt( p_vlc, "color" );
+    libvlc.b_color = libvlc.b_color && config_GetInt( p_vlc, "color" );
 
     /*
      * Output messages that may still be in the queue
index fa24ec0dbe9d46596b5548ccfd291296d230b10a..eb748dbfbe54797ab61c2a1427ca9bedaabe055c 100644 (file)
@@ -4,7 +4,7 @@
  * modules, especially intf modules. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: messages.c,v 1.29 2003/01/15 13:46:05 massiot Exp $
+ * $Id: messages.c,v 1.30 2003/04/09 19:58:25 gbazin Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -408,20 +408,12 @@ static void FlushMsg ( msg_bank_t *p_bank )
  *****************************************************************************/
 static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
 {
-#ifndef WIN32
 #   define COL(x)  "\033[" #x ";1m"
 #   define RED     COL(31)
 #   define GREEN   COL(32)
 #   define YELLOW  COL(33)
 #   define WHITE   COL(37)
 #   define GRAY    "\033[0m"
-#else
-#   define RED     ""
-#   define GREEN   ""
-#   define YELLOW  ""
-#   define WHITE   ""
-#   define GRAY    ""
-#endif
 
 #ifdef UNDER_CE
     int i_dummy;