From 8bb96d46e8171595d61421765949536d6993323d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 29 Sep 2008 13:16:48 +0200 Subject: path: add mpd_basename() function This is like basename(3) but with predictable semantics independent of C library or build options used. This is also much more strict and does not account for trailing slashes (mpd should never deal with trailing slashes on internal functions). --- src/path.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/path.h') diff --git a/src/path.h b/src/path.h index a91728126..2c5801528 100644 --- a/src/path.h +++ b/src/path.h @@ -88,4 +88,12 @@ void pathcpy_trunc(char *dest, const char *src); */ void utf8_to_fs_playlist_path(char *path_max_tmp, const char *utf8path); +/* + * Like basename(3) but with predictable semantics independent + * of C library or build options used. This is also much more strict + * and does not account for trailing slashes (mpd should never deal with + * trailing slashes on internal functions). + */ +const char *mpd_basename(const char *path); + #endif -- cgit v1.2.3