diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2009-02-03 13:28:07 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2009-02-03 13:28:07 -0800 |
commit | b9140a510efa49b36973d02f1e110d33d22e653d (patch) | |
tree | 36275e98e9511144b2a2c9137d54356a90605d57 /src/nv_type.h | |
parent | 3890a0aefc4c133999a10fad9d32745b635634ac (diff) |
Add NV_/RIVA_ prefixes to fix build warnings.
xserver commit 5e0967f5 pollutes the namespace by adding a "SetBit" macro to
inputstr.h that conflicts with the preexisting ones in nv_type.h and
riva_type.h.
Diffstat (limited to 'src/nv_type.h')
-rw-r--r-- | src/nv_type.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nv_type.h b/src/nv_type.h index 2710c5a..8ebb9a8 100644 --- a/src/nv_type.h +++ b/src/nv_type.h @@ -14,13 +14,13 @@ #define NV_ARCH_40 0x40 -#define BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1) << (b)) -#define MASKEXPAND(mask) BITMASK(1?mask,0?mask) -#define SetBF(mask,value) ((value) << (0?mask)) -#define GetBF(var,mask) (((unsigned)((var) & MASKEXPAND(mask))) >> (0?mask) ) -#define SetBitField(value,from,to) SetBF(to, GetBF(value,from)) -#define SetBit(n) (1<<(n)) -#define Set8Bits(value) ((value)&0xff) +#define NV_BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1) << (b)) +#define NV_MASKEXPAND(mask) NV_BITMASK(1?mask,0?mask) +#define NV_SetBF(mask,value) ((value) << (0?mask)) +#define NV_GetBF(var,mask) (((unsigned)((var) & NV_MASKEXPAND(mask))) >> (0?mask) ) +#define NV_SetBitField(value,from,to) NV_SetBF(to, NV_GetBF(value,from)) +#define NV_SetBit(n) (1<<(n)) +#define NV_Set8Bits(value) ((value)&0xff) typedef struct { int bitsPerPixel; |