summaryrefslogtreecommitdiffstats
path: root/eglib
diff options
context:
space:
mode:
Diffstat (limited to 'eglib')
-rw-r--r--eglib/gmain.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/eglib/gmain.h b/eglib/gmain.h
index 172031ac..2ed00fb3 100644
--- a/eglib/gmain.h
+++ b/eglib/gmain.h
@@ -66,6 +66,18 @@ typedef enum {
#define TRUE (!FALSE)
#endif
+#undef MAX
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+
+#undef MIN
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+
+#undef ABS
+#define ABS(a) (((a) < 0) ? -(a) : (a))
+
+#undef CLAMP
+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
+
typedef enum {
G_IO_IN = POLLIN,
G_IO_OUT = POLLOUT,