Commit 3902c186 authored by Rafaël Carré's avatar Rafaël Carré

Remove unused config_GetConfDir

parent b5360cd0
add_definitions(-Dasm=__asm__ -D_INTL_REDIRECT_MACROS)
add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_PREFIX}/locale")
add_definitions(-DSYSCONFDIR="${CMAKE_INSTALL_PREFIX}/etc")
add_definitions(-DPLUGIN_PATH="${CMAKE_INSTALL_PREFIX}/lib/vlc")
add_definitions(-DDATA_PATH="${CMAKE_INSTALL_PREFIX}/share/vlc")
......
......@@ -120,7 +120,6 @@ VLC_API void config_ResetAll( vlc_object_t * );
VLC_API module_config_t * config_FindConfig( vlc_object_t *, const char * ) VLC_USED;
VLC_API char * config_GetDataDir(void) VLC_USED VLC_MALLOC;
VLC_API char *config_GetLibDir(void) VLC_USED;
VLC_API const char * config_GetConfDir( void ) VLC_USED;
typedef enum vlc_userdir
{
......
......@@ -167,7 +167,6 @@ lib_LTLIBRARIES = libvlccore.la
AM_CPPFLAGS = $(INCICONV) $(IDN_CFLAGS) \
-DMODULE_STRING=\"main\" \
-DLOCALEDIR=\"$(localedir)\" \
-DSYSCONFDIR=\"$(sysconfdir)\" \
-DPKGDATADIR=\"$(vlcdatadir)\" \
-DPKGLIBDIR=\"$(vlclibdir)\"
AM_CFLAGS = $(CFLAGS_libvlccore)
......
......@@ -39,7 +39,6 @@ config_ChainParse
config_ChainParseOptions
config_ExistIntf
config_FindConfig
config_GetConfDir
config_GetDataDir
config_GetLibDir
config_GetFloat
......
......@@ -64,17 +64,6 @@ char *config_GetDataDir (void)
return datadir;
}
/**
* Determines the system configuration directory.
*
* @return a string (always succeeds).
*/
const char *config_GetConfDir( void )
{
#warning FIXME: memory leak
return config_GetLibDir ();
}
char *config_GetUserDir (vlc_userdir_t type)
{
switch (type)
......
......@@ -42,21 +42,6 @@
# define MAXPATHLEN 1024
#endif
static char *configdir = NULL;
static pthread_once_t once = PTHREAD_ONCE_INIT;
static void init_dirs( void )
{
configdir = config_GetUserDir(VLC_CONFIG_DIR);
}
const char *config_GetConfDir( void )
{
pthread_once(&once, init_dirs);
return configdir;
}
static char *config_GetLibPath (void)
{
/* Get the full program path and name */
......
......@@ -58,16 +58,6 @@ char *config_GetLibDir (void)
}
#endif
/**
* Determines the system configuration directory.
*
* @return a string (always succeeds).
*/
const char *config_GetConfDir( void )
{
return SYSCONFDIR;
}
static char *config_GetHomeDir (void)
{
/* 1/ Try $HOME */
......
......@@ -55,16 +55,6 @@ const char *config_GetLibDir (void)
return "C:\\Sys\\Bin";
}
/**
* Determines the system configuration directory.
*
* @return a string (always succeeds).
*/
const char *config_GetConfDir( void )
{
return "C:\\Data\\Others";
}
char *config_GetUserDir (vlc_userdir_t type)
{
switch (type)
......
......@@ -67,26 +67,6 @@ char *config_GetDataDir (void)
return (path != NULL) ? strdup (path) : config_GetLibDir ();
}
const char *config_GetConfDir (void)
{
static char appdir[PATH_MAX] = "";
wchar_t wdir[MAX_PATH];
#warning FIXME: thread-safety!
if (*appdir)
return appdir;
/* Get the "Application Data" folder for all users */
if( S_OK == SHGetFolderPathW( NULL, CSIDL_COMMON_APPDATA
| CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, wdir ) )
{
WideCharToMultiByte (CP_UTF8, 0, wdir, -1,
appdir, PATH_MAX, NULL, NULL);
return appdir;
}
return NULL;
}
static char *config_GetShellDir (int csidl)
{
wchar_t wdir[MAX_PATH];
......
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