summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-03-16 23:30:21 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-03-16 23:30:21 -0400
commit4da8ba603b588bef38f772c18d883fbf5ddc9e65 (patch)
tree583b6182ebc22baf1c1ce39a4686da0375ff0f04 /util.h
parentc85f569daf3e0e99c9e8941d0234711afdb58cd7 (diff)
downloadbfs-4da8ba603b588bef38f772c18d883fbf5ddc9e65.tar.xz
Color link targets for -ls
Fixes #18.
Diffstat (limited to 'util.h')
-rw-r--r--util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/util.h b/util.h
index 553f37d..971860b 100644
--- a/util.h
+++ b/util.h
@@ -123,4 +123,13 @@ int xlocaltime(const time_t *timep, struct tm *result);
*/
void format_mode(mode_t mode, char str[11]);
+/**
+ * basename() variant that doesn't modify the input.
+ *
+ * @param path
+ * The path in question.
+ * @return A pointer into path at the base name offset.
+ */
+const char *xbasename(const char *path);
+
#endif // BFS_UTIL_H