summaryrefslogtreecommitdiff
path: root/src/path.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-01-03 07:22:18 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-03 07:22:18 +0000
commitb1cdf8dadf7487d81262f2c4ab76abb378648381 (patch)
treeb2c64a188996587b886ce7ec67fff169c648cb04 /src/path.h
parentb70912031d2dd899635c7b81fee82edb8047cfaa (diff)
document parent_path()
git-svn-id: https://svn.musicpd.org/mpd/trunk@7128 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/path.h')
-rw-r--r--src/path.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/path.h b/src/path.h
index 5a452ca7c..fef935400 100644
--- a/src/path.h
+++ b/src/path.h
@@ -60,13 +60,20 @@ char *pfx_dir(char *dst,
const char *path, const size_t path_len,
const char *pfx, const size_t pfx_len);
-/* relative music path to absolute music path
- * char * passed is a static variable, so don't free it
- */
+/* relative music path to absolute music path */
char *rmp2amp_r(char *dst, const char *rel_path);
+/* relative playlist path to absolute playlist path */
char *rpp2app_r(char *dst, const char *rel_path);
+/*
+ * parent_path - saner version of dirname(3) with slightly different semantics
+ * - we will return "" instead of "." or "/" if we have no parent
+ * this is because we only deal with internal paths
+ * - we always skip over redundant slashes in the middle, if there are any
+ * - we will never get meaningful paths with trailing slashes in our callers
+ * (set handle_trailing_slashes to true if we do)
+ */
char *parent_path(char *path_max_tmp, const char *path);
/* strips extra "///" and leading "/" and trailing "/" */