[vlc-commits] commit: Remove VLC_VAR_MODULE, VLC_VAR_FILE and VLC_VAR_DIRECTORY ( =?UTF-8?Q?R=C3=A9mi=20Denis=2DCourmont=20?=)
git at videolan.org
git at videolan.org
Sun Dec 5 05:44:17 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Dec 5 06:39:07 2010 +0200| [4e647951242a8a1174d7b9dd451c9ac380135963] | committer: Rémi Denis-Courmont
Remove VLC_VAR_MODULE, VLC_VAR_FILE and VLC_VAR_DIRECTORY
Those variable types were identical to VLC_VAR_STRING in practice
(Note: do not confuse variable types with configuration item types).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e647951242a8a1174d7b9dd451c9ac380135963
---
include/vlc_common.h | 3 ---
modules/codec/subsusf.c | 7 ++-----
modules/control/http/rpn.c | 21 ---------------------
modules/misc/lua/libs/configuration.c | 6 ------
src/config/chain.c | 1 -
src/config/core.c | 14 +-------------
src/input/var.c | 2 +-
src/misc/objects.c | 3 ---
src/misc/variables.c | 3 ---
9 files changed, 4 insertions(+), 56 deletions(-)
diff --git a/include/vlc_common.h b/include/vlc_common.h
index c4f1950..eb23f15 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -416,9 +416,6 @@ struct vlc_list_t
#define VLC_VAR_INTEGER 0x0030
#define VLC_VAR_HOTKEY 0x0031
#define VLC_VAR_STRING 0x0040
-#define VLC_VAR_MODULE 0x0041
-#define VLC_VAR_FILE 0x0042
-#define VLC_VAR_DIRECTORY 0x0043
#define VLC_VAR_VARIABLE 0x0044
#define VLC_VAR_FLOAT 0x0050
#define VLC_VAR_TIME 0x0060
diff --git a/modules/codec/subsusf.c b/modules/codec/subsusf.c
index db0d4ee..c69c454 100644
--- a/modules/codec/subsusf.c
+++ b/modules/codec/subsusf.c
@@ -495,11 +495,8 @@ static int ParseImageAttachments( decoder_t *p_dec )
/* ffmpeg thinks it can handle bmp properly but it can't (at least
* not all of them), so use sdl_image if it is available */
- vlc_value_t val;
-
- var_Create( p_dec, "codec", VLC_VAR_MODULE | VLC_VAR_DOINHERIT );
- val.psz_string = (char*) "sdl_image";
- var_Set( p_dec, "codec", val );
+ var_Create( p_dec, "codec", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+ var_SetString( p_dec, "codec", "sdl_image" );
}
p_pic = image_Read( p_image, p_block, &fmt_in, &fmt_out );
diff --git a/modules/control/http/rpn.c b/modules/control/http/rpn.c
index eb7aeee..289d45b 100644
--- a/modules/control/http/rpn.c
+++ b/modules/control/http/rpn.c
@@ -562,15 +562,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
case VLC_VAR_STRING:
psz_type = "VLC_VAR_STRING";
break;
- case VLC_VAR_MODULE:
- psz_type = "VLC_VAR_MODULE";
- break;
- case VLC_VAR_FILE:
- psz_type = "VLC_VAR_FILE";
- break;
- case VLC_VAR_DIRECTORY:
- psz_type = "VLC_VAR_DIRECTORY";
- break;
case VLC_VAR_VARIABLE:
psz_type = "VLC_VAR_VARIABLE";
break;
@@ -618,9 +609,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
psz_object, psz_variable, val.i_int );
break;
case VLC_VAR_STRING:
- case VLC_VAR_MODULE:
- case VLC_VAR_FILE:
- case VLC_VAR_DIRECTORY:
case VLC_VAR_VARIABLE:
val.psz_string = psz_value = SSPop( st );
msg_Dbg( p_intf, "requested %s var change: %s->%s",
@@ -678,9 +666,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
SSPushN( st, val.i_int );
break;
case VLC_VAR_STRING:
- case VLC_VAR_MODULE:
- case VLC_VAR_FILE:
- case VLC_VAR_DIRECTORY:
case VLC_VAR_VARIABLE:
SSPush( st, val.psz_string );
free( val.psz_string );
@@ -738,9 +723,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
config_PutInt( p_intf, psz_variable, SSPopN( st, vars ) );
break;
case VLC_VAR_STRING:
- case VLC_VAR_MODULE:
- case VLC_VAR_FILE:
- case VLC_VAR_DIRECTORY:
{
char *psz_string = SSPop( st );
config_PutPsz( p_intf, psz_variable, psz_string );
@@ -772,9 +754,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
SSPushN( st, config_GetInt( p_intf, psz_variable ) );
break;
case VLC_VAR_STRING:
- case VLC_VAR_MODULE:
- case VLC_VAR_FILE:
- case VLC_VAR_DIRECTORY:
{
char *psz_string = config_GetPsz( p_intf, psz_variable );
SSPush( st, psz_string );
diff --git a/modules/misc/lua/libs/configuration.c b/modules/misc/lua/libs/configuration.c
index 77a69c6..e0fa360 100644
--- a/modules/misc/lua/libs/configuration.c
+++ b/modules/misc/lua/libs/configuration.c
@@ -50,10 +50,7 @@ static int vlclua_config_get( lua_State *L )
psz_name = luaL_checkstring( L, 1 );
switch( config_GetType( p_this, psz_name ) )
{
- case VLC_VAR_MODULE:
case VLC_VAR_STRING:
- case VLC_VAR_FILE:
- case VLC_VAR_DIRECTORY:
{
char *psz = config_GetPsz( p_this, psz_name );
lua_pushstring( L, psz );
@@ -87,10 +84,7 @@ static int vlclua_config_set( lua_State *L )
psz_name = luaL_checkstring( L, 1 );
switch( config_GetType( p_this, psz_name ) )
{
- case VLC_VAR_MODULE:
case VLC_VAR_STRING:
- case VLC_VAR_FILE:
- case VLC_VAR_DIRECTORY:
config_PutPsz( p_this, psz_name, luaL_checkstring( L, 2 ) );
break;
diff --git a/src/config/chain.c b/src/config/chain.c
index a9a6fce..d7f0633 100644
--- a/src/config/chain.c
+++ b/src/config/chain.c
@@ -387,7 +387,6 @@ void config_ChainParse( vlc_object_t *p_this, const char *psz_prefix,
val.f_float = us_atof( cfg->psz_value ? cfg->psz_value : "0" );
break;
case VLC_VAR_STRING:
- case VLC_VAR_MODULE:
val.psz_string = cfg->psz_value;
break;
default:
diff --git a/src/config/core.c b/src/config/core.c
index 02aded0..25b02ad 100644
--- a/src/config/core.c
+++ b/src/config/core.c
@@ -109,24 +109,12 @@ int config_GetType( vlc_object_t *p_this, const char *psz_name )
case CONFIG_ITEM_MODULE_CAT:
case CONFIG_ITEM_MODULE_LIST:
case CONFIG_ITEM_MODULE_LIST_CAT:
- i_type = VLC_VAR_MODULE;
- break;
-
case CONFIG_ITEM_STRING:
- i_type = VLC_VAR_STRING;
- break;
-
case CONFIG_ITEM_PASSWORD:
- i_type = VLC_VAR_STRING;
- break;
-
case CONFIG_ITEM_LOADFILE:
case CONFIG_ITEM_SAVEFILE:
- i_type = VLC_VAR_FILE;
- break;
-
case CONFIG_ITEM_DIRECTORY:
- i_type = VLC_VAR_DIRECTORY;
+ i_type = VLC_VAR_STRING;
break;
default:
diff --git a/src/input/var.c b/src/input/var.c
index 854fd5e..b516ffb 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -437,7 +437,7 @@ void input_ConfigVarInit ( input_thread_t *p_input )
var_Create( p_input, "sub-track-id",
VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
- var_Create( p_input, "sub-file", VLC_VAR_FILE | VLC_VAR_DOINHERIT );
+ var_Create( p_input, "sub-file", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_Create( p_input, "sub-autodetect-file", VLC_VAR_BOOL |
VLC_VAR_DOINHERIT );
var_Create( p_input, "sub-autodetect-path", VLC_VAR_STRING |
diff --git a/src/misc/objects.c b/src/misc/objects.c
index 65802c7..8c998e4 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -689,9 +689,6 @@ static void DumpVariable (const void *data, const VISIT which, const int depth)
MYCASE( INTEGER, "integer" );
MYCASE( HOTKEY, "hotkey" );
MYCASE( STRING, "string" );
- MYCASE( MODULE, "module" );
- MYCASE( FILE, "file" );
- MYCASE( DIRECTORY, "directory" );
MYCASE( VARIABLE, "variable" );
MYCASE( FLOAT, "float" );
MYCASE( TIME, "time" );
diff --git a/src/misc/variables.c b/src/misc/variables.c
index 0675a54..966fbac 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -1063,9 +1063,6 @@ void var_OptionParse( vlc_object_t *p_obj, const char *psz_option,
break;
case VLC_VAR_STRING:
- case VLC_VAR_MODULE:
- case VLC_VAR_FILE:
- case VLC_VAR_DIRECTORY:
val.psz_string = psz_value;
break;
More information about the vlc-commits
mailing list