mirror of https://github.com/E-Almqvist/ewm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
574 B
19 lines
574 B
12 years ago
|
/* See LICENSE file for copyright and license details. */
|
||
|
|
||
|
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
||
|
#define MIN(A, B) ((A) < (B) ? (A) : (B))
|
||
10 years ago
|
#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
|
||
12 years ago
|
|
||
4 years ago
|
#ifdef _DEBUG
|
||
|
#define DEBUG(...) fprintf(stderr, __VA_ARGS__)
|
||
|
#else
|
||
|
#define DEBUG(...)
|
||
|
#endif
|
||
|
|
||
9 years ago
|
void die(const char *fmt, ...);
|
||
|
void *ecalloc(size_t nmemb, size_t size);
|
||
4 years ago
|
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);
|