Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
5ec82386
Commit
5ec82386
authored
Apr 02, 2006
by
Rémi Denis-Courmont
Browse files
- Fix use of undefined (static) memory
- Code factorization
parent
c2632348
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/configuration.h
View file @
5ec82386
...
...
@@ -370,44 +370,28 @@ 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( nam
e ) \
#define add_suppressed_
inner( name, typ
e ) \
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 ].i_type = type; \
p_config[ i_config ].psz_name = name; \
p_config[ i_config ].psz_current = "SUPPRESSED"; }
#define add_suppressed_bool( name ) \
add_suppressed_inner( name, CONFIG_ITEM_BOOL )
#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"; }
add_suppressed_inner( name, CONFIG_ITEM_INTEGER )
#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"; }
add_suppressed_inner( name, CONFIG_ITEM_FLOAT )
#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"; }
add_suppressed_inner( name, CONFIG_ITEM_STRING )
/* Modifier macros for the config options (used for fine tuning) */
#define change_short( ch ) \
p_config[i_config].i_short = ch;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment