#include <vlc/vlc.h>
#include "vlc_keys.h"
-#include "charset.h"
+#include "vlc_charset.h"
#include <stdio.h> /* sprintf() */
#include <stdlib.h> /* free(), strtol() */
#include <tchar.h>
#endif
+#include "configuration.h"
+
static int ConfigStringToKey( const char * );
static char *ConfigKeyToString( int );
{
module_config_t *p_item = p_module->p_config + j;
- if( p_item->psz_type )
- free( p_item->psz_type );
-
- if( p_item->psz_name )
- free( p_item->psz_name );
-
- if( p_item->psz_current )
- free( p_item->psz_current );
-
- if( p_item->psz_text )
- free( p_item->psz_text );
-
- if( p_item->psz_longtext )
- free( p_item->psz_longtext );
+ free( (char*) p_item->psz_type );
+ free( (char*) p_item->psz_name );
+ free( (char*) p_item->psz_current );
+ free( (char*) p_item->psz_text );
+ free( (char*) p_item->psz_longtext );
if (IsConfigStringType (p_item->i_type))
{
for( i = 0; i < p_item->i_list; i++ )
{
if( p_item->ppsz_list && p_item->ppsz_list[i] )
- free( p_item->ppsz_list[i] );
+ free( (char*) p_item->ppsz_list[i] );
if( p_item->ppsz_list_text && p_item->ppsz_list_text[i] )
- free( p_item->ppsz_list_text[i] );
+ free( (char*) p_item->ppsz_list_text[i] );
}
if( p_item->ppsz_list ) free( p_item->ppsz_list );
if( p_item->ppsz_list_text ) free( p_item->ppsz_list_text );
{
for( i = 0; i < p_item->i_action; i++ )
{
- if( p_item->ppsz_action_text[i] )
- free( p_item->ppsz_action_text[i] );
+ free( (char*) p_item->ppsz_action_text[i] );
}
if( p_item->ppf_action ) free( p_item->ppf_action );
if( p_item->ppsz_action_text ) free( p_item->ppsz_action_text );
vlc_mutex_lock( p_item->p_lock );
/* free old string */
- free (p_item->value.psz);
- free (p_item->saved.psz);
+ free( (char*) p_item->value.psz );
+ free( (char*) p_item->saved.psz );
p_item->value.psz = convert (psz_option_value);
p_item->saved.psz = strdupnull (p_item->value.psz);
vlc_list_t *p_list;
int i_index, i_count;
+ if( !p_this ) return -1;
+
/* Check if there's anything to save */
vlc_mutex_lock( &p_this->p_libvlc->config_lock );
p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
"You should use --%s instead.\n",
p_conf->psz_name, p_conf->psz_current);
}
- psz_name=p_conf->psz_current;
+ psz_name = p_conf->psz_current;
p_conf = config_FindConfig( p_this, psz_name );
}