Skip to content

Commit

Permalink
* Fix non linux compilation round 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinecellerier committed May 20, 2007
1 parent 68e40a4 commit 278b0b2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
4 changes: 4 additions & 0 deletions include/vlc_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
2 changes: 1 addition & 1 deletion modules/control/http/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion modules/demux/playlist/luaplaylist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion modules/demux/playlist/m3u.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
8 changes: 4 additions & 4 deletions modules/gui/skins2/win32/win32_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/misc/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 278b0b2

Please sign in to comment.