From d5c19e2c58588a512627849dacd9c1cee9ac754d Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sat, 24 Feb 2024 14:47:18 +0000 Subject: [PATCH] Namespace the path functions --- cpath/include/cpath.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cpath/include/cpath.h b/cpath/include/cpath.h index 06f7018..1248497 100644 --- a/cpath/include/cpath.h +++ b/cpath/include/cpath.h @@ -6,13 +6,12 @@ #define NUMPARTS(...) \ (sizeof((const char *[]){"", __VA_ARGS__}) / sizeof(const char *) - 1) -#define JOIN_PATH(DST, ...) join_path(DST, NUMPARTS(__VA_ARGS__), __VA_ARGS__) +#define wapp_join_path(DST, ...) \ + join_path(DST, NUMPARTS(__VA_ARGS__), __VA_ARGS__) +#define wapp_dirname(DST, PATH) dirup(DST, 1, PATH) +#define wapp_dirup(DST, COUNT, PATH) dirup(DST, COUNT, PATH) void join_path(char *dst, u64 count, ...); - -#define DIRNAME(DST, PATH) dirup(DST, 1, PATH) -#define DIRUP(DST, COUNT, PATH) dirup(DST, COUNT, PATH) - void dirup(char *dst, u64 levels, const char *path); #endif // !PATH_UTILS_H