]> git.sesse.net Git - vlc/commitdiff
* Fix non linux compilation round 2.
authorAntoine Cellerier <dionoea@videolan.org>
Sun, 20 May 2007 13:54:17 +0000 (13:54 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sun, 20 May 2007 13:54:17 +0000 (13:54 +0000)
include/vlc_objects.h
modules/control/http/http.c
modules/demux/playlist/luaplaylist.c
modules/demux/playlist/m3u.c
modules/gui/skins2/win32/win32_factory.cpp
src/misc/objects.c

index a906d517cc9aea7af324bb62369673b711d324af..6058b0b2eb2521cfe3b9f048f59d28f35b172666 100644 (file)
@@ -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) \
index d3065f8c54dc005ed8e017a6672615cab3474004..08863cf4b185285afb61996459b7e13f5a170cd5 100644 (file)
@@ -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)
index 1013f39fdda718fe8a3e192e11ff662f8ea1a9e3..2c4b0f1db990d0efaf6d427e8df1610226f430ee 100644 (file)
@@ -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 )
index 354e1992c6e6f25983646c740b3fb669913e9439..8128dff7767aa978faf660fecf64f3ae754df28d 100644 (file)
@@ -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 */
index be42a67d23aeaf8d2a61c40add41bd39312b3935..603fd93ebd15f5f1d31eac405207b27e9db91038 100644 (file)
@@ -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
index 2ce0126ef4f8d3de1a3b019d12cf6ccc93b785a9..2884fadb72d6293b8d9b988596451b74b4db70bf 100644 (file)
@@ -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