diff options
author | Max Kellermann <max@duempel.org> | 2008-10-03 11:51:32 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-03 11:51:32 +0200 |
commit | 44ecb3b869a8106475b984b4a0d212f9b3b3a219 (patch) | |
tree | 5c9cd8001f54341a22ddeecfc2781fa979ce63f2 /src/support.c | |
parent | ccc7cf81e560025520777118a00a4c041bd7a149 (diff) | |
download | mpd-44ecb3b869a8106475b984b4a0d212f9b3b3a219.tar.gz mpd-44ecb3b869a8106475b984b4a0d212f9b3b3a219.tar.xz mpd-44ecb3b869a8106475b984b4a0d212f9b3b3a219.zip |
use g_basename() instead of basename()
g_basename() is always available, no need to implement a fallback.
Also use g_path_get_dirname(), g_path_get_basename().
Diffstat (limited to 'src/support.c')
-rw-r--r-- | src/support.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/support.c b/src/support.c index ca0266c1b..3ceac5a3a 100644 --- a/src/support.c +++ b/src/support.c @@ -43,28 +43,6 @@ remove_trailing_slash(char *path) return path; } -#ifndef HAVE_BASENAME -char * -basename(char *path) -{ - char *end; - - assert(path != NULL); - - path = remove_trailing_slash(path); - end = path + strlen(path); - - while (end > path && *end != '/') - end--; - - if (*end == '/' && end != path) - return end+1; - - return path; -} -#endif /* HAVE_BASENAME */ - - #ifndef HAVE_STRCASESTR const char * strcasestr(const char *haystack, const char *needle) |