Commit 1e4a50ed authored by Christophe Mutricy's avatar Christophe Mutricy

libvlc.c: Print --no-X in help to not confuse users. --noX and --no-X are...

libvlc.c: Print --no-X in help to not confuse users. --noX and --no-X are still parsed and give the same results.
parent 1ae199c0
...@@ -2024,6 +2024,11 @@ static void Usage( vlc_t *p_this, char const *psz_module_name ) ...@@ -2024,6 +2024,11 @@ static void Usage( vlc_t *p_this, char const *psz_module_name )
char *psz_suf = "", *psz_prefix = NULL; char *psz_suf = "", *psz_prefix = NULL;
int i; int i;
/* Skip deprecated options */
if( p_item->psz_current )
{
continue;
}
/* Skip advanced options if requested */ /* Skip advanced options if requested */
if( p_item->b_advanced && !b_advanced ) if( p_item->b_advanced && !b_advanced )
{ {
...@@ -2113,12 +2118,7 @@ static void Usage( vlc_t *p_this, char const *psz_module_name ) ...@@ -2113,12 +2118,7 @@ static void Usage( vlc_t *p_this, char const *psz_module_name )
if( p_item->i_type == CONFIG_ITEM_BOOL && !b_help_module ) if( p_item->i_type == CONFIG_ITEM_BOOL && !b_help_module )
{ {
/* If option is of type --foo-bar, we print its counterpart psz_prefix = ", --no-";
* as --no-foo-bar, but if it is of type --foobar (without
* dashes in the name) we print it as --nofoobar. Both
* values are of course valid, only the display changes. */
psz_prefix = strchr( p_item->psz_name, '-' ) ? ", --no-"
: ", --no";
i -= strlen( p_item->psz_name ) + strlen( psz_prefix ); i -= strlen( p_item->psz_name ) + strlen( psz_prefix );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment