summaryrefslogtreecommitdiff
path: root/src/usuals.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/usuals.h')
-rw-r--r--src/usuals.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/usuals.h b/src/usuals.h
new file mode 100644
index 0000000..6dc7b08
--- /dev/null
+++ b/src/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__ */