while ( (file = readdir(dir)) )
{
/* we should probably filter out garbage */
- /* we can't use CFStringCreateWithFileSystemRepresentation as it is
+ /* we can't use CFStringCreateWithFileSystemRepresentation as it is
* supported only on post-10.4 (and this function is only for pre-10.4) */
CFStringRef locale = CFStringCreateWithCString( kCFAllocatorDefault, file->d_name, kCFStringEncodingUTF8 );
CFArrayAppendValue( available_locales, (void*)locale );
void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
{
char i_dummy;
- char *p_char, *p_oldchar = &i_dummy;
- int i;
+ char *p_char = NULL;
+ char *p_oldchar = &i_dummy;
+ int i;
/* Get the full program path and name */
for (i = 0; i < _dyld_image_count(); i++)
{
char * psz_img_name = _dyld_get_image_name(i);
- if( !strstr( psz_img_name, "VLC.framework/Version/Current/Framework/VLC" ) )
+ if( strstr( psz_img_name, "VLC.framework/Version/Current/VLC" ) )
p_char = strdup( psz_img_name );
}
p_char = strdup( ppsz_argv[ 0 ] );
}
- vlc_global()->psz_vlcpath = p_char;
+ vlc_global()->psz_vlcpath = p_char;
/* Remove trailing program name */
for( ; *p_char ; )
/*
Retrieve the preferred language as chosen in System Preferences.app
(note that CFLocaleCopyCurrent() is not used because it returns the
- prefered locale not language)
+ prefered locale not language)
*/
CFArrayRef all_locales, preferred_locales;
char psz_locale[50];