diff options
Diffstat (limited to 'util.h')
| -rw-r--r-- | util.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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); |
