[vlc-commits] Remove unfunctional add_deprecated_alias()

Rémi Denis-Courmont git at videolan.org
Sun Oct 2 14:46:04 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct  2 15:28:57 2011 +0300| [78231daf494622e07947478dcf81f5e8cb7f3a86] | committer: Rémi Denis-Courmont

Remove unfunctional add_deprecated_alias()

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

 include/vlc_configuration.h |    1 -
 include/vlc_plugin.h        |    7 ++-----
 src/config/chain.c          |    7 -------
 src/config/cmdline.c        |   14 --------------
 src/config/core.c           |    1 -
 src/modules/cache.c         |    4 +---
 src/modules/entry.c         |    8 --------
 7 files changed, 3 insertions(+), 39 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 7a40485..57ef5f9 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -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;
 };
 
diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
index 8a6a70b..776c904 100644
--- a/include/vlc_plugin.h
+++ b/include/vlc_plugin.h
@@ -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));
 
diff --git a/src/config/chain.c b/src/config/chain.c
index 027e570..80b86f4 100644
--- a/src/config/chain.c
+++ b/src/config/chain.c
@@ -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> */
 
diff --git a/src/config/cmdline.c b/src/config/cmdline.c
index 3e3537d..9eacd3d 100644
--- a/src/config/cmdline.c
+++ b/src/config/cmdline.c
@@ -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:
diff --git a/src/config/core.c b/src/config/core.c
index 66ba61e..5f90d46 100644
--- a/src/config/core.c
+++ b/src/config/core.c
@@ -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))
         {
diff --git a/src/modules/cache.c b/src/modules/cache.c
index 621f956..2010847 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -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 );
diff --git a/src/modules/entry.c b/src/modules/entry.c
index ec31c09..60543db 100644
--- a/src/modules/entry.c
+++ b/src/modules/entry.c
@@ -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;



More information about the vlc-commits mailing list