summaryrefslogtreecommitdiff
path: root/src/macros.h
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@opera.com>2015-07-13 13:04:24 +0200
committerJoel Klinghed <the_jk@opera.com>2015-07-13 13:04:24 +0200
commit1d8af5a018282dc6a93b9ed7c87d9d2f87287b14 (patch)
treec47c19f7c27fd1774d1455b088eb207c611d30ed /src/macros.h
parent59709e4cb30f2ff8666522d5b758731ab618adbc (diff)
Copy the dependencies from sawmill project
Diffstat (limited to 'src/macros.h')
-rw-r--r--src/macros.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/macros.h b/src/macros.h
new file mode 100644
index 0000000..06d59c6
--- /dev/null
+++ b/src/macros.h
@@ -0,0 +1,19 @@
+/**
+ * \file macros.h
+ * Part of common.h, defines common small macros if needed
+ */
+
+#ifndef MACROS_H
+#define MACROS_H
+
+#ifndef MIN
+/** x < y ? x : y */
+# define MIN(_x, _y) (((_x) < (_y)) ? (_x) : (_y))
+#endif
+
+#ifndef MAX
+/** x > y ? x : y */
+# define MAX(_x, _y) (((_x) > (_y)) ? (_x) : (_y))
+#endif
+
+#endif /* MACROS_H */