]> Dogcows Code - chaz/rasterize/blobdiff - common.h
add opengl support
[chaz/rasterize] / common.h
index 537e135908d281d05af84a5c9da9337127615a00..ec7913ea4b13853d1880611bf02e877348f476d8 100644 (file)
--- a/common.h
+++ b/common.h
@@ -120,12 +120,15 @@ int imax(int a, int b)
     return a < b ? b : a;
 }
 
-
 /*
- * Define some macros for packing and unpacking bytes to and from larger ints.
+ * Define generic MIN and MAX macros.
  */
-#define PACK(W,N,B) (((B) << (8 * (N))) | ((W) & ~(0xff << (8 * (N)))))
-#define UNPACK(W,N) ((uint8_t)((W) >> (8 * (N))) & 0xff)
+#ifndef MIN
+#define MIN(A,B) (((A) < (B)) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) (((A) > (B)) ? (A) : (B))
+#endif
 
 
 /*
This page took 0.025522 seconds and 4 git commands to generate.