Commit 9b7380f5 authored by Christophe Mutricy's avatar Christophe Mutricy

* configuration.[ch]: treat the deleted options with add_suppressed_[bool,string,...]

* standard.c: sap-ipv6 is no more used
parent 3743f8f9
...@@ -342,7 +342,7 @@ int config_AutoSaveConfigFile( vlc_object_t * ); ...@@ -342,7 +342,7 @@ int config_AutoSaveConfigFile( vlc_object_t * );
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \ if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
(i_config+11) * sizeof(module_config_t)); \ (i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp = { CONFIG_ITEM_BOOL, NULL, name, '\0', text, longtext, NULL, b_value }; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; p_config[i_config].b_advanced = advc; } { static module_config_t tmp = { CONFIG_ITEM_BOOL, NULL, name, '\0', text, longtext, NULL, b_value }; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; p_config[i_config].b_advanced = advc; }
/* For option renamed */
#define add_deprecated( name, strict ) \ #define add_deprecated( name, strict ) \
i_config++; \ i_config++; \
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \ if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
...@@ -353,7 +353,44 @@ int config_AutoSaveConfigFile( vlc_object_t * ); ...@@ -353,7 +353,44 @@ int config_AutoSaveConfigFile( vlc_object_t * );
p_config[ i_config ].psz_name = name; \ p_config[ i_config ].psz_name = name; \
p_config[i_config].b_strict = strict; \ p_config[i_config].b_strict = strict; \
p_config[ i_config ].psz_current = p_config[ i_config-1].psz_current?p_config[ i_config-1 ].psz_current:p_config[ i_config-1 ].psz_name; } p_config[ i_config ].psz_current = p_config[ i_config-1].psz_current?p_config[ i_config-1 ].psz_current:p_config[ i_config-1 ].psz_name; }
/* For option suppressed*/
#define add_suppressed_bool( name ) \
i_config++; \
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
(i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp; \
p_config[ i_config ] = tmp; \
p_config[ i_config ].i_type = CONFIG_ITEM_BOOL; \
p_config[ i_config ].psz_name = name; \
p_config[ i_config ].psz_current = "SUPPRESSED"; }
#define add_suppressed_integer( name ) \
i_config++; \
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
(i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp; \
p_config[ i_config ] = tmp; \
p_config[ i_config ].i_type = CONFIG_ITEM_INTEGER; \
p_config[ i_config ].psz_name = name; \
p_config[ i_config ].psz_current = "SUPPRESSED"; }
#define add_suppressed_float( name ) \
i_config++; \
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
(i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp; \
p_config[ i_config ] = tmp; \
p_config[ i_config ].i_type = CONFIG_ITEM_FLOAT; \
p_config[ i_config ].psz_name = name; \
p_config[ i_config ].psz_current = "SUPPRESSED"; }
#define add_suppressed_string( name ) \
i_config++; \
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
(i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp; \
p_config[ i_config ] = tmp; \
p_config[ i_config ].i_type = CONFIG_ITEM_STRING; \
p_config[ i_config ].psz_name = name; \
p_config[ i_config ].psz_current = "SUPPRESSED"; }
/* Modifier macros for the config options (used for fine tuning) */ /* Modifier macros for the config options (used for fine tuning) */
#define change_short( ch ) \ #define change_short( ch ) \
p_config[i_config].i_short = ch; p_config[i_config].i_short = ch;
......
...@@ -92,7 +92,7 @@ vlc_module_begin(); ...@@ -92,7 +92,7 @@ vlc_module_begin();
VLC_TRUE ); VLC_TRUE );
add_string( SOUT_CFG_PREFIX "group", "", NULL, GROUP_TEXT, GROUP_LONGTEXT, add_string( SOUT_CFG_PREFIX "group", "", NULL, GROUP_TEXT, GROUP_LONGTEXT,
VLC_TRUE ); VLC_TRUE );
add_deprecated( SOUT_CFG_PREFIX "sap-ipv6", VLC_FALSE ); add_suppressed_bool( SOUT_CFG_PREFIX "sap-ipv6" );
add_bool( SOUT_CFG_PREFIX "slp", 0, NULL, SLP_TEXT, SLP_LONGTEXT, VLC_TRUE ); add_bool( SOUT_CFG_PREFIX "slp", 0, NULL, SLP_TEXT, SLP_LONGTEXT, VLC_TRUE );
......
...@@ -1551,6 +1551,16 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[], ...@@ -1551,6 +1551,16 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
/* Check if the option is deprecated */ /* Check if the option is deprecated */
if( p_conf->psz_current ) if( p_conf->psz_current )
{ {
if( !strcmp(p_conf->psz_current,"SUPPRESSED") )
{
if( !b_ignore_errors )
{
fprintf(stderr,
"Warning: option --%s is no longer used.\n",
p_conf->psz_name);
}
continue;
}
if( !b_ignore_errors ) if( !b_ignore_errors )
{ {
if( p_conf->b_strict ) if( p_conf->b_strict )
......
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