aboutsummaryrefslogtreecommitdiffstats
path: root/Macros.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-09-15 08:00:00 +0200
committerDaniel Lange <DLange@git.local>2020-09-15 08:00:00 +0200
commitf80394a20254938142011855f2954b3f63fe5909 (patch)
treeb777de460977f21a6257540d6a687c86882850dc /Macros.h
parent59eeadec918a955b40427a1b012992161050c939 (diff)
downloaddebian_htop-f80394a20254938142011855f2954b3f63fe5909.tar.gz
debian_htop-f80394a20254938142011855f2954b3f63fe5909.tar.bz2
debian_htop-f80394a20254938142011855f2954b3f63fe5909.zip
New upstream version 3.0.2upstream/3.0.2
Diffstat (limited to 'Macros.h')
-rw-r--r--Macros.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Macros.h b/Macros.h
new file mode 100644
index 0000000..cb84b29
--- /dev/null
+++ b/Macros.h
@@ -0,0 +1,16 @@
+#ifndef HEADER_Macros
+#define HEADER_Macros
+
+#ifndef MINIMUM
+#define MINIMUM(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+#ifndef MAXIMUM
+#define MAXIMUM(a, b) ((a) > (b) ? (a) : (b))
+#endif
+
+#ifndef CLAMP
+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : MAXIMUM(x, low))
+#endif
+
+#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy