From 11e470ab4254304192997834e26166cfddc78f80 Mon Sep 17 00:00:00 2001 From: Nikita Langer Date: Thu, 6 Aug 2026 12:12:00 +0200 Subject: ipc --- util.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index c0a50d4..eb3affb 100644 --- a/util.h +++ b/util.h @@ -5,5 +5,15 @@ #define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B)) #define LENGTH(X) (sizeof (X) / sizeof (X)[0]) +#ifdef _DEBUG +#define DEBUG(...) fprintf(stderr, __VA_ARGS__) +#else +#define DEBUG(...) +#endif + void die(const char *fmt, ...); void *ecalloc(size_t nmemb, size_t size); +int normalizepath(const char *path, char **normal); +int mkdirp(const char *path); +int parentdir(const char *path, char **parent); +int nullterminate(char **str, size_t *len); -- cgit