From: Gildas Bazin Date: Wed, 9 Apr 2003 19:58:25 +0000 (+0000) Subject: * src/libvlc.c: fixed the "color" config option. X-Git-Tag: 0.6.0~619 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=1d5ecc23535d234665d4473fc02bb3eb96f3cdb3;p=vlc * src/libvlc.c: fixed the "color" config option. * src/misc/messages.c: removed an unnecessary #ifdef WIN32 in PrintMsg(). --- diff --git a/src/libvlc.c b/src/libvlc.c index fe956353ac..c492539586 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -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 * Samuel Hocevar @@ -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 diff --git a/src/misc/messages.c b/src/misc/messages.c index fa24ec0dbe..eb748dbfbe 100644 --- a/src/misc/messages.c +++ b/src/misc/messages.c @@ -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 * Samuel Hocevar @@ -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;