- /* Check if there's anything to save */
- module_t **list = module_list_get (NULL);
- for( i_index = 0; list[i_index] && !save; i_index++ )
- {
- module_t *p_parser = list[i_index];
- module_config_t *p_item, *p_end;
-
- if( !p_parser->i_config_items ) continue;
-
- for( p_item = p_parser->p_config, p_end = p_item + p_parser->confsize;
- p_item < p_end && !save;
- p_item++ )
- {
- vlc_mutex_lock (p_item->p_lock);
- save = p_item->b_autosave && p_item->b_dirty;
- vlc_mutex_unlock (p_item->p_lock);
- }
- }
- module_list_free (list);
-
- return save ? VLC_SUCCESS : SaveConfigFile( p_this, NULL, true );
-}
-
-int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
-{
- return SaveConfigFile( p_this, psz_module_name, false );
-}
-
-int ConfigStringToKey( const char *psz_key )
-{
- int i_key = 0;
- unsigned int i;
- const char *psz_parser = strchr( psz_key, '-' );
- while( psz_parser && psz_parser != psz_key )
- {
- for( i = 0; i < sizeof(vlc_modifiers) / sizeof(key_descriptor_t); i++ )
- {
- if( !strncasecmp( vlc_modifiers[i].psz_key_string, psz_key,
- strlen( vlc_modifiers[i].psz_key_string ) ) )
- {
- i_key |= vlc_modifiers[i].i_key_code;
- }
- }
- psz_key = psz_parser + 1;
- psz_parser = strchr( psz_key, '-' );
- }
- for( i = 0; i < sizeof(vlc_keys) / sizeof( key_descriptor_t ); i++ )
- {
- if( !strcasecmp( vlc_keys[i].psz_key_string, psz_key ) )
- {
- i_key |= vlc_keys[i].i_key_code;
- break;
- }
- }
- return i_key;
-}
-
-char *ConfigKeyToString( int i_key )
-{
- char *psz_key = malloc( 100 );
- char *p;
- size_t index;
-
- if ( !psz_key )