Skip to content

Commit

Permalink
Remove unused config_GetConfDir
Browse files Browse the repository at this point in the history
  • Loading branch information
funman committed Oct 4, 2012
1 parent b5360cd commit 3902c18
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 70 deletions.
1 change: 0 additions & 1 deletion extras/buildsystem/cmake/CMakeLists/src_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

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")

Expand Down
1 change: 0 additions & 1 deletion include/vlc_configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 0 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/libvlccore.sym
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ config_ChainParse
config_ChainParseOptions
config_ExistIntf
config_FindConfig
config_GetConfDir
config_GetDataDir
config_GetLibDir
config_GetFloat
Expand Down
11 changes: 0 additions & 11 deletions src/os2/dirs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 0 additions & 15 deletions src/posix/darwin_dirs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
10 changes: 0 additions & 10 deletions src/posix/dirs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
10 changes: 0 additions & 10 deletions src/symbian/dirs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 0 additions & 20 deletions src/win32/dirs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 3902c18

Please sign in to comment.