* defs.h (STRCMP, STREQ, STREQN): New macros.
[deliverable/binutils-gdb.git] / gdb / gdbtypes.h
index d15e0c43d354c91c956eeeaf320cdfc620b1c6b0..a54b62adadf099e1b781aeb46a244b22bb1a560c 100644 (file)
@@ -56,6 +56,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #define FT_NUM_MEMBERS         28      /* Highest FT_* above, plus one. */
 
+/* Some macros for char-based bitfields.  */
+
+#define B_SET(a,x)     ((a)[(x)>>3] |= (1 << ((x)&7)))
+#define B_CLR(a,x)     ((a)[(x)>>3] &= ~(1 << ((x)&7)))
+#define B_TST(a,x)     ((a)[(x)>>3] & (1 << ((x)&7)))
+#define B_TYPE         unsigned char
+#define        B_BYTES(x)      ( 1 + ((x)>>3) )
+#define        B_CLRALL(a,x)   memset ((a), 0, B_BYTES(x))
+
 /* Different kinds of data types are distinguished by the `code' field.  */
 
 enum type_code
This page took 0.0235300000000001 seconds and 4 git commands to generate.