static void Version ( void );
#ifdef WIN32
-static void ShowConsole ( void );
+static void ShowConsole ( vlc_bool_t );
static void PauseConsole ( void );
#endif
static int ConsoleWidth ( void );
if( config_LoadCmdLine( p_vlc, &i_argc, ppsz_argv, VLC_FALSE ) )
{
#ifdef WIN32
- ShowConsole();
+ ShowConsole( VLC_FALSE );
/* Pause the console because it's destroyed when we exit */
fprintf( stderr, "The command line options couldn't be loaded, check "
"that they are valid.\n" );
static void Help( vlc_t *p_this, char const *psz_help_name )
{
#ifdef WIN32
- ShowConsole();
+ ShowConsole( VLC_TRUE );
#endif
if( psz_help_name && !strcmp( psz_help_name, "help" ) )
memset( psz_spaces, ' ', 22 );
#ifdef WIN32
- ShowConsole();
+ ShowConsole( VLC_TRUE );
#endif
/* List all modules */
static void Version( void )
{
#ifdef WIN32
- ShowConsole();
+ ShowConsole( VLC_TRUE );
#endif
fprintf( stdout, _("VLC version %s\n"), VLC_Version() );
* This function is useful only on Win32.
*****************************************************************************/
#ifdef WIN32 /* */
-static void ShowConsole( void )
+static void ShowConsole( vlc_bool_t b_dofile )
{
# ifndef UNDER_CE
FILE *f_help;
freopen( "CONOUT$", "w", stderr );
freopen( "CONIN$", "r", stdin );
- if( (f_help = fopen( "vlc-help.txt", "wt" )) )
+ if( b_dofile && (f_help = fopen( "vlc-help.txt", "wt" )) )
{
fclose( f_help );
freopen( "vlc-help.txt", "wt", stdout );