[PATCH] dix: add SetBit(arr, bit) and ClearBit(arr, bit) to include/inputstr.h

Peter Hutterer peter.hutterer at who-t.net
Wed Jan 28 19:09:26 PST 2009


---
 include/inputstr.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/inputstr.h b/include/inputstr.h
index 2ee4f9b..2b6de02 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -57,6 +57,8 @@ SOFTWARE.
 #include "privates.h"
 
 #define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))
+#define SetBit(ptr, bit)  (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
+#define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7)))
 
 #define SameClient(obj,client) \
 	(CLIENT_BITS((obj)->resource) == (client)->clientAsMask)
-- 
1.6.0.6




More information about the xorg mailing list