Commit 4e647951 authored by Rémi Denis-Courmont's avatar 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).
parent 87626923
...@@ -416,9 +416,6 @@ struct vlc_list_t ...@@ -416,9 +416,6 @@ struct vlc_list_t
#define VLC_VAR_INTEGER 0x0030 #define VLC_VAR_INTEGER 0x0030
#define VLC_VAR_HOTKEY 0x0031 #define VLC_VAR_HOTKEY 0x0031
#define VLC_VAR_STRING 0x0040 #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_VARIABLE 0x0044
#define VLC_VAR_FLOAT 0x0050 #define VLC_VAR_FLOAT 0x0050
#define VLC_VAR_TIME 0x0060 #define VLC_VAR_TIME 0x0060
......
...@@ -495,11 +495,8 @@ static int ParseImageAttachments( decoder_t *p_dec ) ...@@ -495,11 +495,8 @@ static int ParseImageAttachments( decoder_t *p_dec )
/* ffmpeg thinks it can handle bmp properly but it can't (at least /* 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 */ * not all of them), so use sdl_image if it is available */
vlc_value_t val; var_Create( p_dec, "codec", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_SetString( p_dec, "codec", "sdl_image" );
var_Create( p_dec, "codec", VLC_VAR_MODULE | VLC_VAR_DOINHERIT );
val.psz_string = (char*) "sdl_image";
var_Set( p_dec, "codec", val );
} }
p_pic = image_Read( p_image, p_block, &fmt_in, &fmt_out ); p_pic = image_Read( p_image, p_block, &fmt_in, &fmt_out );
......
...@@ -562,15 +562,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars, ...@@ -562,15 +562,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
case VLC_VAR_STRING: case VLC_VAR_STRING:
psz_type = "VLC_VAR_STRING"; psz_type = "VLC_VAR_STRING";
break; 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: case VLC_VAR_VARIABLE:
psz_type = "VLC_VAR_VARIABLE"; psz_type = "VLC_VAR_VARIABLE";
break; break;
...@@ -618,9 +609,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars, ...@@ -618,9 +609,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
psz_object, psz_variable, val.i_int ); psz_object, psz_variable, val.i_int );
break; break;
case VLC_VAR_STRING: case VLC_VAR_STRING:
case VLC_VAR_MODULE:
case VLC_VAR_FILE:
case VLC_VAR_DIRECTORY:
case VLC_VAR_VARIABLE: case VLC_VAR_VARIABLE:
val.psz_string = psz_value = SSPop( st ); val.psz_string = psz_value = SSPop( st );
msg_Dbg( p_intf, "requested %s var change: %s->%s", msg_Dbg( p_intf, "requested %s var change: %s->%s",
...@@ -678,9 +666,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars, ...@@ -678,9 +666,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
SSPushN( st, val.i_int ); SSPushN( st, val.i_int );
break; break;
case VLC_VAR_STRING: case VLC_VAR_STRING:
case VLC_VAR_MODULE:
case VLC_VAR_FILE:
case VLC_VAR_DIRECTORY:
case VLC_VAR_VARIABLE: case VLC_VAR_VARIABLE:
SSPush( st, val.psz_string ); SSPush( st, val.psz_string );
free( val.psz_string ); free( val.psz_string );
...@@ -738,9 +723,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars, ...@@ -738,9 +723,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
config_PutInt( p_intf, psz_variable, SSPopN( st, vars ) ); config_PutInt( p_intf, psz_variable, SSPopN( st, vars ) );
break; break;
case VLC_VAR_STRING: case VLC_VAR_STRING:
case VLC_VAR_MODULE:
case VLC_VAR_FILE:
case VLC_VAR_DIRECTORY:
{ {
char *psz_string = SSPop( st ); char *psz_string = SSPop( st );
config_PutPsz( p_intf, psz_variable, psz_string ); config_PutPsz( p_intf, psz_variable, psz_string );
...@@ -772,9 +754,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars, ...@@ -772,9 +754,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
SSPushN( st, config_GetInt( p_intf, psz_variable ) ); SSPushN( st, config_GetInt( p_intf, psz_variable ) );
break; break;
case VLC_VAR_STRING: 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 ); char *psz_string = config_GetPsz( p_intf, psz_variable );
SSPush( st, psz_string ); SSPush( st, psz_string );
......
...@@ -50,10 +50,7 @@ static int vlclua_config_get( lua_State *L ) ...@@ -50,10 +50,7 @@ static int vlclua_config_get( lua_State *L )
psz_name = luaL_checkstring( L, 1 ); psz_name = luaL_checkstring( L, 1 );
switch( config_GetType( p_this, psz_name ) ) switch( config_GetType( p_this, psz_name ) )
{ {
case VLC_VAR_MODULE:
case VLC_VAR_STRING: case VLC_VAR_STRING:
case VLC_VAR_FILE:
case VLC_VAR_DIRECTORY:
{ {
char *psz = config_GetPsz( p_this, psz_name ); char *psz = config_GetPsz( p_this, psz_name );
lua_pushstring( L, psz ); lua_pushstring( L, psz );
...@@ -87,10 +84,7 @@ static int vlclua_config_set( lua_State *L ) ...@@ -87,10 +84,7 @@ static int vlclua_config_set( lua_State *L )
psz_name = luaL_checkstring( L, 1 ); psz_name = luaL_checkstring( L, 1 );
switch( config_GetType( p_this, psz_name ) ) switch( config_GetType( p_this, psz_name ) )
{ {
case VLC_VAR_MODULE:
case VLC_VAR_STRING: case VLC_VAR_STRING:
case VLC_VAR_FILE:
case VLC_VAR_DIRECTORY:
config_PutPsz( p_this, psz_name, luaL_checkstring( L, 2 ) ); config_PutPsz( p_this, psz_name, luaL_checkstring( L, 2 ) );
break; break;
......
...@@ -387,7 +387,6 @@ void config_ChainParse( vlc_object_t *p_this, const char *psz_prefix, ...@@ -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" ); val.f_float = us_atof( cfg->psz_value ? cfg->psz_value : "0" );
break; break;
case VLC_VAR_STRING: case VLC_VAR_STRING:
case VLC_VAR_MODULE:
val.psz_string = cfg->psz_value; val.psz_string = cfg->psz_value;
break; break;
default: default:
......
...@@ -109,24 +109,12 @@ int config_GetType( vlc_object_t *p_this, const char *psz_name ) ...@@ -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_CAT:
case CONFIG_ITEM_MODULE_LIST: case CONFIG_ITEM_MODULE_LIST:
case CONFIG_ITEM_MODULE_LIST_CAT: case CONFIG_ITEM_MODULE_LIST_CAT:
i_type = VLC_VAR_MODULE;
break;
case CONFIG_ITEM_STRING: case CONFIG_ITEM_STRING:
i_type = VLC_VAR_STRING;
break;
case CONFIG_ITEM_PASSWORD: case CONFIG_ITEM_PASSWORD:
i_type = VLC_VAR_STRING;
break;
case CONFIG_ITEM_LOADFILE: case CONFIG_ITEM_LOADFILE:
case CONFIG_ITEM_SAVEFILE: case CONFIG_ITEM_SAVEFILE:
i_type = VLC_VAR_FILE;
break;
case CONFIG_ITEM_DIRECTORY: case CONFIG_ITEM_DIRECTORY:
i_type = VLC_VAR_DIRECTORY; i_type = VLC_VAR_STRING;
break; break;
default: default:
......
...@@ -437,7 +437,7 @@ void input_ConfigVarInit ( input_thread_t *p_input ) ...@@ -437,7 +437,7 @@ void input_ConfigVarInit ( input_thread_t *p_input )
var_Create( p_input, "sub-track-id", var_Create( p_input, "sub-track-id",
VLC_VAR_INTEGER|VLC_VAR_DOINHERIT ); 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 | var_Create( p_input, "sub-autodetect-file", VLC_VAR_BOOL |
VLC_VAR_DOINHERIT ); VLC_VAR_DOINHERIT );
var_Create( p_input, "sub-autodetect-path", VLC_VAR_STRING | var_Create( p_input, "sub-autodetect-path", VLC_VAR_STRING |
......
...@@ -689,9 +689,6 @@ static void DumpVariable (const void *data, const VISIT which, const int depth) ...@@ -689,9 +689,6 @@ static void DumpVariable (const void *data, const VISIT which, const int depth)
MYCASE( INTEGER, "integer" ); MYCASE( INTEGER, "integer" );
MYCASE( HOTKEY, "hotkey" ); MYCASE( HOTKEY, "hotkey" );
MYCASE( STRING, "string" ); MYCASE( STRING, "string" );
MYCASE( MODULE, "module" );
MYCASE( FILE, "file" );
MYCASE( DIRECTORY, "directory" );
MYCASE( VARIABLE, "variable" ); MYCASE( VARIABLE, "variable" );
MYCASE( FLOAT, "float" ); MYCASE( FLOAT, "float" );
MYCASE( TIME, "time" ); MYCASE( TIME, "time" );
......
...@@ -1063,9 +1063,6 @@ void var_OptionParse( vlc_object_t *p_obj, const char *psz_option, ...@@ -1063,9 +1063,6 @@ void var_OptionParse( vlc_object_t *p_obj, const char *psz_option,
break; break;
case VLC_VAR_STRING: case VLC_VAR_STRING:
case VLC_VAR_MODULE:
case VLC_VAR_FILE:
case VLC_VAR_DIRECTORY:
val.psz_string = psz_value; val.psz_string = psz_value;
break; break;
......
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