Commit 04526ea8 authored by Rafaël Carré's avatar Rafaël Carré

system_Init(): remove unused arguments

darwin relied on argv[0] as a fallback to retrieve executable name,
but this can't work anymore as:
- libvlc_new() can be given anything as argc/argv
- libvlc_new() inserts "libvlc" at position 0 anyway
parent 2e3c0005
......@@ -268,7 +268,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
#endif
/* System specific initialization code */
system_Init( p_libvlc, &i_argc, ppsz_argv );
system_Init();
/*
* Support for gettext
......
......@@ -37,7 +37,7 @@ size_t vlc_towc (const char *str, uint32_t *restrict pwc);
/*
* OS-specific initialization
*/
void system_Init ( libvlc_int_t *, int *, const char *[] );
void system_Init ( void );
void system_Configure ( libvlc_int_t *, int, const char *const [] );
void system_End ( libvlc_int_t * );
......
......@@ -47,14 +47,12 @@
/*****************************************************************************
* system_Init: fill in program path & retrieve language
*****************************************************************************/
void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
void system_Init(void)
{
VLC_UNUSED(p_this);
char i_dummy;
char *p_char = NULL;
char *p_oldchar = &i_dummy;
unsigned int i;
(void)pi_argc;
/* Get the full program path and name */
/* First try to see if we are linked to the framework */
......@@ -107,11 +105,6 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
if ( !_NSGetExecutablePath(path, &path_len) )
p_char = strdup(path);
}
if( !p_char )
{
/* We are not linked to the VLC.framework, return the executable path */
p_char = strdup( ppsz_argv[ 0 ] );
}
free(psz_vlcpath);
psz_vlcpath = p_char;
......
......@@ -88,7 +88,7 @@ static struct
# include <stdlib.h>
#endif
void system_Init (libvlc_int_t *libvlc, int *argc, const char *argv[])
void system_Init (void)
{
#ifdef __GLIBC__
const char *glcv = gnu_get_libc_version ();
......@@ -111,8 +111,6 @@ void system_Init (libvlc_int_t *libvlc, int *argc, const char *argv[])
if (once.refs++ == 0)
set_libvlc_path ();
vlc_mutex_unlock (&once.lock);
(void)libvlc; (void)argc; (void)argv;
}
void system_Configure (libvlc_int_t *libvlc,
......
......@@ -31,12 +31,11 @@ static void set_libvlc_path (void)
psz_vlcpath = (char *)PKGLIBDIR;
}
void system_Init (libvlc_int_t *libvlc, int *argc, const char *argv[])
void system_Init (void)
{
pthread_once_t once = PTHREAD_ONCE_INIT;
pthread_once (&once, set_libvlc_path);
(void)libvlc; (void)argc; (void)argv;
}
void system_Configure (libvlc_int_t *libvlc,
......
......@@ -44,9 +44,8 @@
/*****************************************************************************
* system_Init: initialize winsock and misc other things.
*****************************************************************************/
void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
void system_Init( void )
{
VLC_UNUSED( p_this ); VLC_UNUSED( pi_argc ); VLC_UNUSED( ppsz_argv );
WSADATA Data;
MEMORY_BASIC_INFORMATION mbi;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment