shl: misc: add SHL_HAS_BITS() helper

This helper checks whether a bitmask has all the given bits set.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-10-01 12:21:10 +02:00
parent 79ef4f9505
commit 54108a2b49

View File

@ -38,6 +38,8 @@
#include <stdlib.h>
#include <xkbcommon/xkbcommon.h>
#define SHL_HAS_BITS(_bitmask, _bits) (((_bitmask) & (_bits)) == (_bits))
static inline int shl_strtou(const char *input, unsigned int *output)
{
unsigned long val;