From 44ecb3b869a8106475b984b4a0d212f9b3b3a219 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 3 Oct 2008 11:51:32 +0200 Subject: 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(). --- src/support.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/support.c') 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) -- cgit v1.2.3