summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2008-12-12 10:49:53 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-02-03 08:51:11 +1000
commit5e0967f5fc2e0fcf2a55128eb03931cf6f5709e9 (patch)
tree03e845035efb92be859978a22ec30bfd303e28d0 /include
parentfaeb18eb7eb20f15528f9c8004d843146ebc2a50 (diff)
dix: add SetBit(arr, bit) and ClearBit(arr, bit) to include/inputstr.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include')
-rw-r--r--include/inputstr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/inputstr.h b/include/inputstr.h
index 2ee4f9be3..2b6de02d9 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)