diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-04-28 14:50:53 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-04-28 14:50:53 +0100 |
commit | ce9af0fefb2cd0dd5fe5743dcca12f17eedd1ce5 (patch) | |
tree | f64ac36338b62e5657760fb5c7bbd56056a9eecd /src | |
parent | e8f3bdf8207a8870ff80b9ef0cef55564b85f3b4 (diff) | |
download | xine-lib-ce9af0fefb2cd0dd5fe5743dcca12f17eedd1ce5.tar.gz xine-lib-ce9af0fefb2cd0dd5fe5743dcca12f17eedd1ce5.tar.bz2 |
Add xine_get_pluginroot() for win32. Completely untested.
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-utils/utils.c | 14 | ||||
-rw-r--r-- | src/xine-utils/xineutils.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index cc3ffdc2c..768b41da4 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -371,6 +371,20 @@ static void xine_get_rootdir(char *rootdir, size_t maxlen) { if ((s = strrchr(rootdir, XINE_DIRECTORY_SEPARATOR_CHAR))) *s = '\0'; } +const char *xine_get_pluginroot(void) { + static char pluginroot[1024] = {0, }; + + if (!pluginroot[0]) { + char *sep, *sep2; + strcpy (pluginroot, xine_get_plugindir ()); + sep = strrchr (pluginroot, '/'); + sep2 = strrchr (pluginroot, '\\'); + *(sep < sep2 ? sep : sep2) = 0; + } + + return pluginroot; +} + const char *xine_get_plugindir(void) { static char plugindir[1024] = {0, }; diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h index 120cb3578..aeee9e7b3 100644 --- a/src/xine-utils/xineutils.h +++ b/src/xine-utils/xineutils.h @@ -643,6 +643,7 @@ const char *xine_get_homedir(void) XINE_PROTECTED; /* * Get other xine directories. */ +const char *xine_get_pluginroot(void) XINE_PROTECTED; const char *xine_get_plugindir(void) XINE_PROTECTED; const char *xine_get_fontdir(void) XINE_PROTECTED; const char *xine_get_localedir(void) XINE_PROTECTED; |