[vlc-devel] commit: libvlc: --full-help now displays an exhaustive help. (Pierre d' Herbemont )

git version control git at videolan.org
Sun Jul 6 21:53:31 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Jul  6 21:55:18 2008 +0200| [cba23b29406dcf312503639e839b631a9046e1ca]

libvlc: --full-help now displays an exhaustive help.

-H has been defaulted to --full-help instead of --longhelp. This means that you don't have to type vlc -H --advanced --help-verbose, to get full VLC help. Additionaly, we now advertise a bit -H in -h or --help.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cba23b29406dcf312503639e839b631a9046e1ca
---

 src/libvlc-module.c |    7 ++++++-
 src/libvlc.c        |   16 ++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 000b693..c7b106b 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -2470,6 +2470,8 @@ vlc_module_begin();
 #define HELP_TEXT \
     N_("print help for VLC (can be combined with --advanced and " \
        "--help-verbose)")
+#define FULL_HELP_TEXT \
+    N_("Exhaustive help for VLC and its modules")
 #define LONGHELP_TEXT \
     N_("print help for VLC and all its modules (can be combined with " \
        "--advanced and --help-verbose)")
@@ -2499,10 +2501,13 @@ vlc_module_begin();
         change_short( 'h' );
         change_internal();
         change_unsaveable();
-    add_bool( "longhelp", false, NULL, LONGHELP_TEXT, "", false );
+    add_bool( "full-help", false, NULL, FULL_HELP_TEXT, "", false );
         change_short( 'H' );
         change_internal();
         change_unsaveable();
+    add_bool( "longhelp", false, NULL, LONGHELP_TEXT, "", false );
+        change_internal();
+        change_unsaveable();
     add_bool( "help-verbose", false, NULL, HELP_VERBOSE_TEXT, "",
               false );
         change_internal();
diff --git a/src/libvlc.c b/src/libvlc.c
index 276e120..9acd6da 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -433,6 +433,15 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
         b_exit = true;
         i_ret = VLC_EEXITSUCCESS;
     }
+    /* Check for full help option */
+    else if( config_GetInt( p_libvlc, "full-help" ) > 0 )
+    {
+        config_PutInt( p_libvlc, "advanced", 1);
+        config_PutInt( p_libvlc, "help-verbose", 1);
+        Help( p_libvlc, "full-help" );
+        b_exit = true;
+        i_ret = VLC_EEXITSUCCESS;
+    }
     /* Check for long help option */
     else if( config_GetInt( p_libvlc, "longhelp" ) > 0 )
     {
@@ -1274,11 +1283,18 @@ 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" );
     }
     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" );
+    }
+    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 );
     }
     else if( psz_help_name )
     {




More information about the vlc-devel mailing list