summaryrefslogtreecommitdiff
path: root/src/usuals.h
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2006-03-07 00:11:27 +0000
committerStef Walter <stef@memberwebs.com>2006-03-07 00:11:27 +0000
commit28262d8b7dc5262ed9ef3a1e3d1d5662701e24ba (patch)
tree124cfd4c274c6f4b84869f4b0301945b56215ccd /src/usuals.h
Initial import
y
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__ */