Browse code

- added MAX_unsigned()

Andrei Pelinescu-Onciul authored on 30/07/2007 19:43:08
Showing 1 changed files
... ...
@@ -130,6 +130,9 @@
130 130
 #define MIN_int(a, b) (((a)<(b))?(a):(b))
131 131
 #define MAX_int(a, b) (((a)>(b))?(a):(b))
132 132
 
133
+#define MIN_unsigned(a, b) (unsigned)(((unsigned)(a)<(unsigned)(b))?(a):(b))
134
+#define MAX_unsigned(a, b) (unsigned)(((unsigned)(a)>(unsigned)(b))?(a):(b))
135
+
133 136
 #if 0
134 137
 #define MIN_int(a, b) ((b)+(((a)-(b))& -((a)<(b))))
135 138
 #define MAX_int(a, b) ((a)-(((a)-(b))& -((b)>(a))))