diff options
Diffstat (limited to 'module/usuals.h')
-rw-r--r-- | module/usuals.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/module/usuals.h b/module/usuals.h new file mode 100644 index 0000000..6dc7b08 --- /dev/null +++ b/module/usuals.h @@ -0,0 +1,32 @@ + +#ifndef __USUALS_H__ +#define __USUALS_H__ + +#include <sys/types.h> + +#include "config.h" + +#include <errno.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +#define countof(x) (sizeof(x) / sizeof(x[0])) + +#ifdef _DEBUG + #include "assert.h" + #define ASSERT(x) assert(x) +#else + #define ASSERT(x) +#endif + +#endif /* __USUALS_H__ */ |