-int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
-{
- return SaveConfigFile( p_this, psz_module_name, false );
-}
-
-/**
- * Get the user's configuration file when given with the --config option
- */
-static char *config_GetCustomConfigFile( libvlc_int_t *p_libvlc )
-{
- char *psz_configfile = config_GetPsz( p_libvlc, "config" );
- if( psz_configfile != NULL )
- {
- if( psz_configfile[0] == '~' && psz_configfile[1] == '/' )
- {
- /* This is incomplete: we should also support the ~cmassiot/ syntax */
- char *psz_buf;
- if( asprintf( &psz_buf, "%s/%s", config_GetHomeDir(),
- psz_configfile + 2 ) == -1 )
- {
- free( psz_configfile );
- return NULL;
- }
- free( psz_configfile );
- psz_configfile = psz_buf;
- }
- }
- return psz_configfile;
-}
-
-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;