mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-03 01:31:53 +02:00
Remove unfunctional add_deprecated_alias()
This commit is contained in:
parent
334e9ba080
commit
78231daf49
@ -172,7 +172,6 @@ struct module_config_t
|
||||
char **ppsz_action_text; /* Friendly names for actions */
|
||||
|
||||
/* Deprecated */
|
||||
char *psz_oldname; /* Old option name */
|
||||
bool b_removed;
|
||||
};
|
||||
|
||||
|
@ -82,8 +82,8 @@ enum vlc_module_properties
|
||||
VLC_CONFIG_SHORTCUT,
|
||||
/* one-character (short) command line option name (args=char) */
|
||||
|
||||
VLC_CONFIG_OLDNAME,
|
||||
/* former option name (args=const char *) */
|
||||
VLC_CONFIG_OLDNAME_OBSOLETE,
|
||||
/* unused (ignored) */
|
||||
|
||||
VLC_CONFIG_SAFE,
|
||||
/* tag as modifiable by untrusted input item "sources" (args=none) */
|
||||
@ -383,9 +383,6 @@ VLC_METADATA_EXPORTS
|
||||
|
||||
/* Modifier macros for the config options (used for fine tuning) */
|
||||
|
||||
#define add_deprecated_alias( name ) \
|
||||
vlc_config_set (VLC_CONFIG_OLDNAME, (const char *)(name));
|
||||
|
||||
#define change_short( ch ) \
|
||||
vlc_config_set (VLC_CONFIG_SHORTCUT, (int)(ch));
|
||||
|
||||
|
@ -342,13 +342,6 @@ void config_ChainParse( vlc_object_t *p_this, const char *psz_prefix,
|
||||
* modules so i'll do it later */
|
||||
continue;
|
||||
}
|
||||
if( p_conf->psz_oldname
|
||||
&& !strcmp( p_conf->psz_oldname, name ) )
|
||||
{
|
||||
psz_name = p_conf->psz_name;
|
||||
msg_Warn( p_this, "Option %s is obsolete. Use %s instead.",
|
||||
name, psz_name );
|
||||
}
|
||||
}
|
||||
/* </Check if the option is deprecated> */
|
||||
|
||||
|
@ -225,20 +225,6 @@ int config_LoadCmdLine( vlc_object_t *p_this, int i_argc,
|
||||
continue;
|
||||
}
|
||||
|
||||
if( p_conf->psz_oldname
|
||||
&& !strcmp( p_conf->psz_oldname, psz_name) )
|
||||
{
|
||||
if( !b_ignore_errors )
|
||||
{
|
||||
fprintf( stderr, "Error: option --%s is deprecated. "
|
||||
"Use --%s instead.\n",
|
||||
psz_name, p_conf->psz_name );
|
||||
goto out;
|
||||
}
|
||||
|
||||
psz_name = p_conf->psz_name;
|
||||
}
|
||||
|
||||
switch( CONFIG_CLASS(p_conf->i_type) )
|
||||
{
|
||||
case CONFIG_ITEM_STRING:
|
||||
|
@ -435,7 +435,6 @@ void config_Free (module_config_t *config, size_t confsize)
|
||||
free( p_item->psz_name );
|
||||
free( p_item->psz_text );
|
||||
free( p_item->psz_longtext );
|
||||
free( p_item->psz_oldname );
|
||||
|
||||
if (IsConfigStringType (p_item->i_type))
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ static int CacheLoadConfig ( module_t *, FILE * );
|
||||
|
||||
/* Sub-version number
|
||||
* (only used to avoid breakage in dev version when cache structure changes) */
|
||||
#define CACHE_SUBVERSION_NUM 17
|
||||
#define CACHE_SUBVERSION_NUM 18
|
||||
|
||||
/* Cache filename */
|
||||
#define CACHE_NAME "plugins.dat"
|
||||
@ -314,7 +314,6 @@ static int CacheLoadConfig( module_t *p_module, FILE *file )
|
||||
LOAD_STRING( p_module->p_config[i].psz_name );
|
||||
LOAD_STRING( p_module->p_config[i].psz_text );
|
||||
LOAD_STRING( p_module->p_config[i].psz_longtext );
|
||||
LOAD_STRING( p_module->p_config[i].psz_oldname );
|
||||
|
||||
if (IsConfigStringType (p_module->p_config[i].i_type))
|
||||
{
|
||||
@ -561,7 +560,6 @@ static int CacheSaveConfig (FILE *file, const module_t *p_module)
|
||||
SAVE_STRING( p_module->p_config[i].psz_name );
|
||||
SAVE_STRING( p_module->p_config[i].psz_text );
|
||||
SAVE_STRING( p_module->p_config[i].psz_longtext );
|
||||
SAVE_STRING( p_module->p_config[i].psz_oldname );
|
||||
|
||||
if (IsConfigStringType (p_module->p_config[i].i_type))
|
||||
SAVE_STRING( p_module->p_config[i].orig.psz );
|
||||
|
@ -359,14 +359,6 @@ static int vlc_plugin_setter (void *plugin, void *tgt, int propid, ...)
|
||||
item->i_short = va_arg (ap, int);
|
||||
break;
|
||||
|
||||
case VLC_CONFIG_OLDNAME:
|
||||
{
|
||||
const char *oldname = va_arg (ap, const char *);
|
||||
assert (item->psz_oldname == NULL);
|
||||
item->psz_oldname = oldname ? strdup (oldname) : NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
case VLC_CONFIG_SAFE:
|
||||
item->b_safe = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user