diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-10 08:17:35 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-10 09:33:18 +1000 |
commit | 5831e2d43ab796b0bc0171078cb8a7586a60d2a8 (patch) | |
tree | 12224c775683617f68a2179020420112908bc648 | |
parent | 19610f620f3b6a414043abe7cb60ccf131dd71ab (diff) |
Move some defines up to the top
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | evtest.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -40,6 +40,16 @@ #include <stdlib.h> #include <dirent.h> +#define BITS_PER_LONG (sizeof(long) * 8) +#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) +#define OFF(x) ((x)%BITS_PER_LONG) +#define BIT(x) (1UL<<OFF(x)) +#define LONG(x) ((x)/BITS_PER_LONG) +#define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) + +#define DEV_INPUT_EVENT "/dev/input" +#define EVENT_DEV_NAME "event" + #ifndef EV_SYN #define EV_SYN 0 #endif @@ -413,16 +423,6 @@ char **names[EV_MAX + 1] = { [EV_SND] = sounds, [EV_REP] = repeats, }; -#define BITS_PER_LONG (sizeof(long) * 8) -#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) -#define OFF(x) ((x)%BITS_PER_LONG) -#define BIT(x) (1UL<<OFF(x)) -#define LONG(x) ((x)/BITS_PER_LONG) -#define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) - -#define DEV_INPUT_EVENT "/dev/input" -#define EVENT_DEV_NAME "event" - /* filter for the AutoDevProbe scandir on /dev/input */ static int EventDevOnly(const struct dirent *dir) { return strncmp(EVENT_DEV_NAME, dir->d_name, 5) == 0; |