From: Antoine Cellerier Date: Sun, 20 May 2007 13:54:17 +0000 (+0000) Subject: * Fix non linux compilation round 2. X-Git-Tag: 0.9.0-test0~7307 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=278b0b2aa118af8b6fcc3919764b6fab2eb5eb21;p=vlc * Fix non linux compilation round 2. --- diff --git a/include/vlc_objects.h b/include/vlc_objects.h index a906d517cc..6058b0b2eb 100644 --- a/include/vlc_objects.h +++ b/include/vlc_objects.h @@ -110,6 +110,10 @@ VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) ); VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) ); VLC_EXPORT( libvlc_int_t *, vlc_current_object, ( int ) ); +#if defined( WIN32 ) || defined( SYS_BEOS ) || defined( __APPLE__ ) +VLC_EXPORT( const char *, vlc_path, ( vlc_object_t * ) ); +#endif + /*}@*/ #define vlc_object_create(a,b) \ diff --git a/modules/control/http/http.c b/modules/control/http/http.c index d3065f8c54..08863cf4b1 100644 --- a/modules/control/http/http.c +++ b/modules/control/http/http.c @@ -290,7 +290,7 @@ static int Open( vlc_object_t *p_this ) #if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32) if ( ( psz_src = config_GetPsz( p_intf, "http-src" )) == NULL ) { - char * psz_vlcpath = p_intf->p_libvlc_global->psz_vlcpath; + char * psz_vlcpath = vlc_path( p_intf ); psz_src = malloc( strlen(psz_vlcpath) + strlen("/share/http" ) + 1 ); if( !psz_src ) return VLC_ENOMEM; #if defined(WIN32) diff --git a/modules/demux/playlist/luaplaylist.c b/modules/demux/playlist/luaplaylist.c index 1013f39fdd..2c4b0f1db9 100644 --- a/modules/demux/playlist/luaplaylist.c +++ b/modules/demux/playlist/luaplaylist.c @@ -296,7 +296,7 @@ int E_(Import_LuaPlaylist)( vlc_object_t *p_this ) # if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32) { - char *psz_vlcpath = p_demux->p_libvlc_global->psz_vlcpath; + char *psz_vlcpath = vlc_path( p_demux ); ppsz_dir_list[1] = malloc( strlen( psz_vlcpath ) + strlen( "/share/luaplaylist" ) + 1 ); if( !ppsz_dir_list[1] ) return VLC_ENOMEM; # if defined( WIN32 ) diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c index 354e1992c6..8128dff776 100644 --- a/modules/demux/playlist/m3u.c +++ b/modules/demux/playlist/m3u.c @@ -232,7 +232,7 @@ static void parseEXTINF(char *psz_string, char **ppsz_artist, end = psz_string + strlen( psz_string ); /* ignore whitespaces */ - for (; psz_string < end && ( *psz_string == '\t' || *psz_string == ' ' ); + for (; psz_string < end && ( *psz_string == '\t' || *psz_string == ' ' ); psz_string++ ); /* duration: read to next comma */ diff --git a/modules/gui/skins2/win32/win32_factory.cpp b/modules/gui/skins2/win32/win32_factory.cpp index be42a67d23..603fd93ebd 100644 --- a/modules/gui/skins2/win32/win32_factory.cpp +++ b/modules/gui/skins2/win32/win32_factory.cpp @@ -227,13 +227,13 @@ bool Win32Factory::init() // Initialize the resource path m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_homedir + "\\" + CONFIG_DIR + "\\skins" ); - m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + + m_resourcePath.push_back( (string)vlc_path( getIntf() ) + "\\skins" ); - m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + + m_resourcePath.push_back( (string)vlc_path( getIntf() ) + "\\skins2" ); - m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + + m_resourcePath.push_back( (string)vlc_path( getIntf() ) + "\\share\\skins" ); - m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + + m_resourcePath.push_back( (string)vlc_path( getIntf() ) + "\\share\\skins2" ); // All went well diff --git a/src/misc/objects.c b/src/misc/objects.c index 2ce0126ef4..2884fadb72 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -1370,3 +1370,11 @@ static void ListChildren( vlc_list_t *p_list, vlc_object_t *p_this, int i_type ) } } } + + +#if defined( WIN32 ) || defined( SYS_BEOS ) || defined( __APPLE__ ) +const char *vlc_path( vlc_object_t *p_this ) +{ + return vlc_global( p_this )->psz_vlcpath; +} +#endif