aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_browser.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-03 11:51:32 +0200
committerMax Kellermann <max@duempel.org>2008-10-03 11:51:32 +0200
commit44ecb3b869a8106475b984b4a0d212f9b3b3a219 (patch)
tree5c9cd8001f54341a22ddeecfc2781fa979ce63f2 /src/screen_browser.c
parentccc7cf81e560025520777118a00a4c041bd7a149 (diff)
downloadmpd-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 '')
-rw-r--r--src/screen_browser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/screen_browser.c b/src/screen_browser.c
index 1350a56b4..da0dc897c 100644
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
@@ -21,7 +21,6 @@
#include "i18n.h"
#include "options.h"
#include "charset.h"
-#include "support.h"
#include "strfsong.h"
#include "screen_utils.h"
#include "gcc.h"
@@ -136,7 +135,7 @@ browser_lw_callback(unsigned idx, int *highlight, void *data)
if( entity->type==MPD_INFO_ENTITY_TYPE_DIRECTORY ) {
mpd_Directory *dir = entity->info.directory;
- char *directory = utf8_to_locale(basename(dir->path));
+ char *directory = utf8_to_locale(g_basename(dir->path));
g_snprintf(buf, BUFSIZE, "[%s]", directory);
g_free(directory);
@@ -148,7 +147,7 @@ browser_lw_callback(unsigned idx, int *highlight, void *data)
return buf;
} else if( entity->type==MPD_INFO_ENTITY_TYPE_PLAYLISTFILE ) {
mpd_PlaylistFile *plf = entity->info.playlistFile;
- char *filename = utf8_to_locale(basename(plf->path));
+ char *filename = utf8_to_locale(g_basename(plf->path));
g_snprintf(buf, BUFSIZE, playlist_format, filename);
g_free(filename);
@@ -213,7 +212,8 @@ load_playlist(mpdclient_t *c, filelist_entry_t *entry)
char *filename = utf8_to_locale(plf->path);
if (mpdclient_cmd_load_playlist_utf8(c, plf->path) == 0)
- screen_status_printf(_("Loading playlist %s..."), basename(filename));
+ screen_status_printf(_("Loading playlist %s..."),
+ g_basename(filename));
g_free(filename);
return 0;
}