*****************************************************************************/
static void SetLanguage ( char const * );
static int GetFilenames ( vlc_t *, int, char *[] );
+static void Help ( vlc_t *, char const *psz_help_name );
static void Usage ( vlc_t *, char const *psz_module_name );
static void ListModules ( vlc_t * );
static void Version ( void );
/* Check for short help option */
if( config_GetInt( p_vlc, "help" ) )
{
- fprintf( stdout, _("Usage: %s [options] [items]...\n"),
- p_vlc->psz_object_name );
- Usage( p_vlc, "main" );
- Usage( p_vlc, "help" );
+ Help( p_vlc, "help" );
b_exit = VLC_TRUE;
}
/* Check for version option */
/* Check for help on modules */
if( (p_tmp = config_GetPsz( p_vlc, "module" )) )
{
- Usage( p_vlc, p_tmp );
+ Help( p_vlc, p_tmp );
free( p_tmp );
b_exit = VLC_TRUE;
}
/* Check for long help option */
else if( config_GetInt( p_vlc, "longhelp" ) )
{
- Usage( p_vlc, NULL );
+ Help( p_vlc, "longhelp" );
b_exit = VLC_TRUE;
}
/* Check for module list option */
/* p_vlc initialization. FIXME ? */
-#if defined( __i386__ )
+ if( !config_GetInt( p_vlc, "fpu" ) )
+ libvlc.i_cpu &= ~CPU_CAPABILITY_FPU;
+
+#if defined( __i386__ ) || defined( __x86_64__ )
if( !config_GetInt( p_vlc, "mmx" ) )
libvlc.i_cpu &= ~CPU_CAPABILITY_MMX;
if( !config_GetInt( p_vlc, "3dn" ) )
if( b_relative )
{
- val.i_time = i_seconds * 1000000;
+ val.i_time = i_seconds;
+ val.i_time = val.i_time * 1000000L;
var_Set( p_input, "time-offset", val );
}
else
{
- val.i_time = i_seconds * 1000000;
+ val.i_time = i_seconds;
+ val.i_time = val.i_time * 1000000L;
var_Set( p_input, "time", val );
}
vlc_object_release( p_input );
vlc_object_release( p_input );
if( i_object ) vlc_object_release( p_vlc );
- return val.i_time / 1000000;
+ return val.i_time / 1000000L;
}
/**
}
/*****************************************************************************
- * Usage: print program usage
+ * Help: print program help
+ *****************************************************************************
+ * Print a short inline help. Message interface is initialized at this stage.
+ *****************************************************************************/
+static void Help( vlc_t *p_this, char const *psz_help_name )
+{
+#ifdef WIN32
+ ShowConsole();
+#endif
+
+ if( psz_help_name && !strcmp( psz_help_name, "help" ) )
+ {
+ fprintf( stdout, VLC_USAGE, p_this->psz_object_name );
+ Usage( p_this, "help" );
+ Usage( p_this, "main" );
+ }
+ else if( psz_help_name && !strcmp( psz_help_name, "longhelp" ) )
+ {
+ fprintf( stdout, VLC_USAGE, p_this->psz_object_name );
+ Usage( p_this, NULL );
+ }
+ else if( psz_help_name )
+ {
+ Usage( p_this, psz_help_name );
+ }
+
+#ifdef WIN32 /* Pause the console because it's destroyed when we exit */
+ PauseConsole();
+#endif
+}
+
+/*****************************************************************************
+ * Usage: print module usage
*****************************************************************************
* Print a short inline help. Message interface is initialized at this stage.
*****************************************************************************/
strcpy( psz_format, FORMAT_STRING );
-#ifdef WIN32
- ShowConsole();
-#endif
-
/* List all modules */
p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
/* Release the module list */
vlc_list_release( p_list );
-
-#ifdef WIN32 /* Pause the console because it's destroyed when we exit */
- PauseConsole();
-#endif
}
/*****************************************************************************
ShowConsole();
#endif
- /* Usage */
- fprintf( stdout, _("Usage: %s [options] [items]...\n\n"),
- p_this->p_vlc->psz_object_name );
-
- fprintf( stdout, _("[module] [description]\n") );
-
/* List all modules */
p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
hal_free_string( block_dev );
}
+ hal_free_string_array( devices );
}
hal_shutdown( ctx );