mesa: move CEILING() macro into macros.h
authorBrian Paul <brianp@vmware.com>
Sat, 12 Nov 2011 18:50:32 +0000 (11:50 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 15 Nov 2011 14:49:26 +0000 (07:49 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/image.c
src/mesa/main/macros.h
src/mesa/main/pack.c

index 3b16d3d..3a6f01c 100644 (file)
@@ -55,9 +55,6 @@
 
 
 
-/** Compute ceiling of integer quotient of A divided by B. */
-#define CEILING( A, B )  ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
-
 
 /**
  * \return GL_TRUE if type is packed pixel type, GL_FALSE otherwise.
index d90905f..029f609 100644 (file)
@@ -662,6 +662,10 @@ do {                        \
 #define LEN_SQUARED_2FV( V ) ((V)[0]*(V)[0]+(V)[1]*(V)[1])
 
 
+/** Compute ceiling of integer quotient of A divided by B. */
+#define CEILING( A, B )  ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
+
+
 /** casts to silence warnings with some compilers */
 #define ENUM_TO_INT(E)     ((GLint)(E))
 #define ENUM_TO_FLOAT(E)   ((GLfloat)(GLint)(E))
index de29395..a3cfb59 100644 (file)
@@ -34,6 +34,7 @@
 #include "enums.h"
 #include "image.h"
 #include "imports.h"
+#include "macros.h"
 #include "mtypes.h"
 #include "pack.h"
 #include "pixeltransfer.h"
 
 
 
-/** Compute ceiling of integer quotient of A divided by B. */
-#define CEILING( A, B )  ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
-
-
 /**
  * Flip the 8 bits in each byte of the given array.
  *