summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-10-19 11:14:39 -0400
committerpommicket <pommicket@gmail.com>2023-10-19 11:14:39 -0400
commit94c2b5a926cd7273272fb9fe268dd61c50426c59 (patch)
treed3a396ddf0e99d7ab1b2b3f955a4b51e5ff0df4e /util.c
parent69d702f2076930b8cc88c73420fc849eb4b807ce (diff)
local .ted.cfg
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.c b/util.c
index 98c7dbc..de73f0e 100644
--- a/util.c
+++ b/util.c
@@ -463,6 +463,10 @@ void qsort_with_context(void *base, size_t nmemb, size_t size,
}
#endif
+bool is_path_separator(char c) {
+ return strchr(ALL_PATH_SEPARATORS, c) != NULL;
+}
+
const char *path_filename(const char *path) {
for (int i = (int)strlen(path) - 1; i >= 0; --i) {
if (strchr(ALL_PATH_SEPARATORS, path[i]))