keymap-dump: unbreak some complex lines It's very hard to read as-is. Apologies for those reading over a VT100. Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
diff --git a/src/xkbcomp/keymap-dump.c b/src/xkbcomp/keymap-dump.c
index fe41675..942d541 100644
--- a/src/xkbcomp/keymap-dump.c
+++ b/src/xkbcomp/keymap-dump.c
@@ -297,12 +297,8 @@ write_action(struct xkb_keymap *keymap, struct buf *buf,
else
args = ModMaskText(keymap, action->mods.mods.mods);
write_buf(buf, "%s%s(modifiers=%s%s%s)%s", prefix, type, args,
- (action->type != ACTION_TYPE_MOD_LOCK &&
- (action->mods.flags & ACTION_LOCK_CLEAR)) ?
- ",clearLocks" : "",
- (action->type != ACTION_TYPE_MOD_LOCK &&
- (action->mods.flags & ACTION_LATCH_TO_LOCK)) ?
- ",latchToLock" : "",
+ (action->type != ACTION_TYPE_MOD_LOCK && (action->mods.flags & ACTION_LOCK_CLEAR)) ? ",clearLocks" : "",
+ (action->type != ACTION_TYPE_MOD_LOCK && (action->mods.flags & ACTION_LATCH_TO_LOCK)) ? ",latchToLock" : "",
suffix);
break;
@@ -310,16 +306,10 @@ write_action(struct xkb_keymap *keymap, struct buf *buf,
case ACTION_TYPE_GROUP_LATCH:
case ACTION_TYPE_GROUP_LOCK:
write_buf(buf, "%s%s(group=%s%d%s%s)%s", prefix, type,
- (!(action->group.flags & ACTION_ABSOLUTE_SWITCH) &&
- action->group.group > 0) ? "+" : "",
- (action->group.flags & ACTION_ABSOLUTE_SWITCH) ?
- action->group.group + 1 : action->group.group,
- (action->type != ACTION_TYPE_GROUP_LOCK &&
- (action->group.flags & ACTION_LOCK_CLEAR)) ?
- ",clearLocks" : "",
- (action->type != ACTION_TYPE_GROUP_LOCK &&
- (action->group.flags & ACTION_LATCH_TO_LOCK)) ?
- ",latchToLock" : "",
+ (!(action->group.flags & ACTION_ABSOLUTE_SWITCH) && action->group.group > 0) ? "+" : "",
+ (action->group.flags & ACTION_ABSOLUTE_SWITCH) ? action->group.group + 1 : action->group.group,
+ (action->type != ACTION_TYPE_GROUP_LOCK && (action->group.flags & ACTION_LOCK_CLEAR)) ? ",clearLocks" : "",
+ (action->type != ACTION_TYPE_GROUP_LOCK && (action->group.flags & ACTION_LATCH_TO_LOCK)) ? ",latchToLock" : "",
suffix);
break;
@@ -374,16 +364,14 @@ write_action(struct xkb_keymap *keymap, struct buf *buf,
case ACTION_TYPE_PTR_DEFAULT:
write_buf(buf, "%s%s(", prefix, type);
write_buf(buf, "affect=button,button=%s%d",
- (!(action->dflt.flags & ACTION_ABSOLUTE_SWITCH) &&
- action->dflt.value >= 0) ? "+" : "",
+ (!(action->dflt.flags & ACTION_ABSOLUTE_SWITCH) && action->dflt.value >= 0) ? "+" : "",
action->dflt.value);
write_buf(buf, ")%s", suffix);
break;
case ACTION_TYPE_SWITCH_VT:
write_buf(buf, "%s%s(screen=%s%d,%ssame)%s", prefix, type,
- (!(action->screen.flags & ACTION_ABSOLUTE_SWITCH) &&
- action->screen.screen >= 0) ? "+" : "",
+ (!(action->screen.flags & ACTION_ABSOLUTE_SWITCH) && action->screen.screen >= 0) ? "+" : "",
action->screen.screen,
(action->screen.flags & ACTION_SAME_SCREEN) ? "!" : "",
suffix);