dix: unexport and document CountBits()
Not used by any drivers/modules, so no need to keep it exported. Also adding a bit of documentation. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
1cf7b33ab4
commit
e7e248f303
|
@ -509,4 +509,13 @@ void LastEventTimeToggleResetFlag(int deviceid, Bool state);
|
||||||
|
|
||||||
void LastEventTimeToggleResetAll(Bool state);
|
void LastEventTimeToggleResetAll(Bool state);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief count the bits set in the given bitmask
|
||||||
|
*
|
||||||
|
* @param mask pointer to bitmask
|
||||||
|
* @param len size of bitmask in bits (may span multiple bytes)
|
||||||
|
* @return number of bits set in the given bitmask
|
||||||
|
*/
|
||||||
|
int CountBits(const uint8_t * mask, int len);
|
||||||
|
|
||||||
#endif /* _XSERVER_INPUT_PRIV_H */
|
#endif /* _XSERVER_INPUT_PRIV_H */
|
||||||
|
|
|
@ -63,7 +63,6 @@ extern _X_EXPORT void AssignTypeAndName(DeviceIntPtr dev,
|
||||||
#define BitIsOn(ptr, bit) (!!(((const BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))))
|
#define BitIsOn(ptr, bit) (!!(((const BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))))
|
||||||
#define SetBit(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 ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7)))
|
||||||
extern _X_EXPORT int CountBits(const uint8_t * mask, int len);
|
|
||||||
|
|
||||||
#define EMASKSIZE (MAXDEVICES + 2)
|
#define EMASKSIZE (MAXDEVICES + 2)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue