static FILE *config_OpenConfigFile( vlc_object_t *p_obj, const char *mode )
{
- char *psz_filename = p_obj->p_libvlc->psz_configfile;
+ char *psz_filename = libvlc_priv (p_obj->p_libvlc)->psz_configfile;
FILE *p_stream;
if( !psz_filename )
FILE *p_readme = utf8_fopen( psz_readme, "wt" );
if( p_readme )
{
- fputs( "The VLC media player configuration folder has "
- "moved to comply with the XDG Base "
- "Directory Specification version 0.6. Your "
- "configuration has been copied to the new "
- "location (", p_readme );
- fputs( p_obj->p_libvlc->psz_configdir, p_readme );
- fputs( "). You can delete this directory and "
- "all its contents.", p_readme );
+ fprintf( p_readme, "The VLC media player "
+ "configuration folder has moved to comply\n"
+ "with the XDG Base Directory Specification "
+ "version 0.6. Your\nconfiguration has been "
+ "copied to the new location:\n%s\nYou can "
+ "delete this directory and all its contents.",
+ libvlc_priv(p_obj->p_libvlc)->psz_configdir);
fclose( p_readme );
}
free( psz_readme );
#endif
else if( p_stream != NULL )
{
- p_obj->p_libvlc->psz_configfile = psz_filename;
+ libvlc_priv (p_obj->p_libvlc)->psz_configfile = psz_filename;
}
return p_stream;
/* Acquire config file lock */
vlc_mutex_lock( &priv->config_lock );
- if( p_this->p_libvlc->psz_configfile == NULL )
+ if( libvlc_priv (p_this->p_libvlc)->psz_configfile == NULL )
{
- const char *psz_configdir = p_this->p_libvlc->psz_configdir;
+ const char *psz_configdir =
+ libvlc_priv(p_this->p_libvlc)->psz_configdir;
if( !psz_configdir ) /* XXX: This should never happen */
{
msg_Err( p_this, "no configuration directory defined" );
{
char *psz_configfile;
if( asprintf( &psz_configfile, "%s" DIR_SEP CONFIG_FILE,
- p_libvlc->psz_configdir ) == -1 )
+ libvlc_priv (p_libvlc)->psz_configdir ) == -1 )
return NULL;
return psz_configfile;
}