summaryrefslogtreecommitdiff
path: root/src/util-strings.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-02-18 13:43:23 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-02-23 10:56:53 +1000
commit671eb8cbbb4dc5c88d38c935c176d61604154584 (patch)
tree5c5c00feea0c24c16ca73d1fbc83a340dc6a96fa /src/util-strings.h
parentfd9d165a7724dd518f4ad2a92187637130345389 (diff)
downloadlibinput-671eb8cbbb4dc5c88d38c935c176d61604154584.tar.gz
utils: add a safe version of basename
So we don't need to worry about the libgen.h include game. And we can switch trunkname over to that, making it a bit simpler. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/util-strings.h')
-rw-r--r--src/util-strings.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util-strings.h b/src/util-strings.h
index ad007f69..9d044067 100644
--- a/src/util-strings.h
+++ b/src/util-strings.h
@@ -392,5 +392,8 @@ strstartswith(const char *str, const char *prefix)
return prefixlen > 0 ? strneq(str, prefix, strlen(prefix)) : false;
}
+const char *
+safe_basename(const char *filename);
+
char *
trunkname(const char *filename);