From 5e0967f5fc2e0fcf2a55128eb03931cf6f5709e9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 12 Dec 2008 10:49:53 +1000 Subject: dix: add SetBit(arr, bit) and ClearBit(arr, bit) to include/inputstr.h Signed-off-by: Peter Hutterer --- include/inputstr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') 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) -- cgit v1.2.3