From 4da8ba603b588bef38f772c18d883fbf5ddc9e65 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 16 Mar 2017 23:30:21 -0400 Subject: Color link targets for -ls Fixes #18. --- util.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'util.h') 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 -- cgit v1.2.3