From cba23b29406dcf312503639e839b631a9046e1ca Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Sun, 6 Jul 2008 21:55:18 +0200 Subject: [PATCH] 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. --- src/libvlc-module.c | 7 ++++++- src/libvlc.c | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/libvlc-module.c b/src/libvlc-module.c index 000b693553..c7b106b2a9 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 276e1205e8..9acd6da08d 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,8 +1283,15 @@ 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 ); -- 2.39.2