diff options
| author | 2014-07-29 17:14:53 +0200 | |
|---|---|---|
| committer | 2014-07-29 20:35:36 +0200 | |
| commit | 66d5bb2c84cd9f92eb146a8496bda4c9c9b0f0ce (patch) | |
| tree | cc33e46f01fc6bc0a81255ef667ee5c7931ec269 | |
| parent | 3c853a405b522cb8ce50414f47c944f8ee5c5854 (diff) | |
| download | xkbcat-66d5bb2c84cd9f92eb146a8496bda4c9c9b0f0ce.tar.gz xkbcat-66d5bb2c84cd9f92eb146a8496bda4c9c9b0f0ce.zip | |
Convert BIT macro to inlined function
Inlined just like a macro, but has typechecking to prevent bloopers.
| -rw-r--r-- | xkbcat.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -23,7 +23,9 @@ char *DEFAULT_DISPLAY = ":0"; const int DEFAULT_DELAY = 10000; -#define BIT(c, x) ( c[x/8]& (1<<(x%8)) ) +static inline int BIT(char *c, int x) { + return ( c[x/8]& (1<<(x%8)) ); +} const int KEYSYM_STRLEN = 64; /* Globals */ |
