]> git.sesse.net Git - vlc/commitdiff
* configuration.[ch]: treat the deleted options with add_suppressed_[bool,string...
authorChristophe Mutricy <xtophe@videolan.org>
Wed, 1 Jun 2005 17:08:59 +0000 (17:08 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Wed, 1 Jun 2005 17:08:59 +0000 (17:08 +0000)
* standard.c: sap-ipv6 is no more used

include/configuration.h
modules/stream_out/standard.c
src/misc/configuration.c

index 31d9dd6fd686048fa7e267ae404c428c67c8b31b..bad6b4f0b6c2d1eb2784112ea9f87ad7eb7567e8 100644 (file)
@@ -342,7 +342,7 @@ int config_AutoSaveConfigFile( vlc_object_t * );
     if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
         (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; }
-
+/* For option renamed */
 #define add_deprecated( name, strict ) \
         i_config++; \
     if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
@@ -353,7 +353,44 @@ int config_AutoSaveConfigFile( vlc_object_t * );
         p_config[ i_config ].psz_name = name; \
         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; }
+/* 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) */
 #define change_short( ch ) \
     p_config[i_config].i_short = ch;
index 814c536cd6bb78ce189267829c395aa2d4eb7c0e..975c9eace725225b08ec3d5abe4ae9312d0b4cc1 100644 (file)
@@ -92,7 +92,7 @@ vlc_module_begin();
                                         VLC_TRUE );
     add_string( SOUT_CFG_PREFIX "group", "", NULL, GROUP_TEXT, GROUP_LONGTEXT,
                                         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 );
 
index c9968824710c5bc9d9bf9e42f1dddb7aaf0ac39f..ca3d23bb1eec6b54d1db557a48de52d3605f44ee 100644 (file)
@@ -1551,6 +1551,16 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
                 /* Check if the option is deprecated */
                 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( p_conf->b_strict )