diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-06-15 20:32:14 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-06-16 02:28:08 +0200 |
| commit | 753a645f463f2d72234554bc211cc32f65129929 (patch) | |
| tree | 5b87d5f0781b9c27c63074326f8a3cf8e3906419 /src | |
| parent | 78085b21f2dc7b1d49a0c54ab56b567fc195d440 (diff) | |
refactor: Use the bitmask_t type
Use the bitmask_t for all bitfields, to simplify future expansions
to larger bit fields.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src')
| -rw-r--r-- | src/gestures.c | 2 | ||||
| -rw-r--r-- | src/memory.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gestures.c b/src/gestures.c index 2dafe79..0cc2e0b 100644 --- a/src/gestures.c +++ b/src/gestures.c | |||
| @@ -38,7 +38,7 @@ static const int BUTTON_HOLD_MS = 200; | |||
| 38 | */ | 38 | */ |
| 39 | static void extract_buttons(struct Gestures *gs, struct MTouch* mt) | 39 | static void extract_buttons(struct Gestures *gs, struct MTouch* mt) |
| 40 | { | 40 | { |
| 41 | unsigned btdata = mt->state.button & BITONES(DIM_BUTTON); | 41 | bitmask_t btdata = mt->state.button & BITONES(DIM_BUTTON); |
| 42 | int npoint = bitcount(mt->mem.pointing); | 42 | int npoint = bitcount(mt->mem.pointing); |
| 43 | if (mt->state.button == BITMASK(MT_BUTTON_LEFT)) { | 43 | if (mt->state.button == BITMASK(MT_BUTTON_LEFT)) { |
| 44 | if (npoint == 2) | 44 | if (npoint == 2) |
diff --git a/src/memory.c b/src/memory.c index 39621da..4cfb7da 100644 --- a/src/memory.c +++ b/src/memory.c | |||
| @@ -61,7 +61,7 @@ static void update_configuration(struct Memory *m, | |||
| 61 | const struct MTState *state) | 61 | const struct MTState *state) |
| 62 | { | 62 | { |
| 63 | const struct MTFinger *f = state->finger; | 63 | const struct MTFinger *f = state->finger; |
| 64 | unsigned fingers = BITONES(state->nfinger); | 64 | bitmask_t fingers = BITONES(state->nfinger); |
| 65 | int i; | 65 | int i; |
| 66 | m->added = 0; | 66 | m->added = 0; |
| 67 | foreach_bit(i, fingers) | 67 | foreach_bit(i, fingers) |
