[vlc-devel] commit: libvlc: Advertise -p and --list in help. (Pierre d'Herbemont )
git version control
git at videolan.org
Mon Jul 7 00:51:37 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Mon Jul 7 00:53:23 2008 +0200| [9ff3595f09441ac057cf6b4f22f382e02059470b]
libvlc: Advertise -p and --list in help.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ff3595f09441ac057cf6b4f22f382e02059470b
---
src/libvlc.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index 9acd6da..bdfd019 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -1272,6 +1272,18 @@ static int GetFilenames( libvlc_int_t *p_vlc, int i_argc, const char *ppsz_argv[
*****************************************************************************
* Print a short inline help. Message interface is initialized at this stage.
*****************************************************************************/
+static inline void print_help_on_module_help( void )
+{
+ utf8_fprintf( stdout, "\n" );
+ utf8_fprintf( stdout, "To get the VLC module list, use '--list'.\n" );
+ utf8_fprintf( stdout, "To get help on a particular module, use '-p <module_name>'.\n" );
+}
+static inline void print_help_on_full_help( void )
+{
+ utf8_fprintf( stdout, "\n" );
+ utf8_fprintf( stdout, "To get a exhaustive help, use '-H'.\n" );
+}
+
static void Help( libvlc_int_t *p_this, char const *psz_help_name )
{
#ifdef WIN32
@@ -1283,18 +1295,21 @@ static void Help( libvlc_int_t *p_this, char const *psz_help_name )
utf8_fprintf( stdout, vlc_usage, p_this->psz_object_name );
Usage( p_this, "help" );
Usage( p_this, "main" );
- utf8_fprintf( stdout, "To get a exhaustive help use -H\n" );
+ print_help_on_module_help();
+ print_help_on_full_help();
}
else if( psz_help_name && !strcmp( psz_help_name, "longhelp" ) )
{
utf8_fprintf( stdout, vlc_usage, p_this->psz_object_name );
Usage( p_this, NULL );
- utf8_fprintf( stdout, "To get an exhaustive help use -H\n" );
+ print_help_on_module_help();
+ print_help_on_full_help();
}
else if( psz_help_name && !strcmp( psz_help_name, "full-help" ) )
{
utf8_fprintf( stdout, vlc_usage, p_this->psz_object_name );
Usage( p_this, NULL );
+ print_help_on_module_help();
}
else if( psz_help_name )
{
More information about the vlc-devel
mailing list