aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/XKBBind.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-16 18:27:28 -0700
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:28 +0200
commit2824899d280f2b169b3e745b222f9a981c1ce5f7 (patch)
treeb36bb27f59fc802561e78aa344755808b71a0279 /nx-X11/lib/X11/XKBBind.c
parent3c5880e7254dcd04ea8e54d53ec99880e2dfdc27 (diff)
downloadnx-libs-2824899d280f2b169b3e745b222f9a981c1ce5f7.tar.gz
nx-libs-2824899d280f2b169b3e745b222f9a981c1ce5f7.tar.bz2
nx-libs-2824899d280f2b169b3e745b222f9a981c1ce5f7.zip
Rearrange some variable declarations & initializations in XKB
Little things noticed during XKB restyling that seemed to make the code easier to read. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/XKBBind.c')
-rw-r--r--nx-X11/lib/X11/XKBBind.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/nx-X11/lib/X11/XKBBind.c b/nx-X11/lib/X11/XKBBind.c
index 1952422bd..37f1b8ad6 100644
--- a/nx-X11/lib/X11/XKBBind.c
+++ b/nx-X11/lib/X11/XKBBind.c
@@ -450,23 +450,24 @@ XRefreshKeyboardMapping(register XMappingEvent * event)
fprintf(stderr, " symbols: %d..%d\n", first, last);
}
if (changes.changed & XkbKeyActionsMask) {
- int last, first = changes.first_key_act;
+ int first = changes.first_key_act;
+ int last = changes.first_key_act + changes.num_key_acts - 1;
- last = changes.first_key_act + changes.num_key_acts - 1;
fprintf(stderr, " acts: %d..%d\n", first, last);
}
if (changes.changed & XkbKeyBehaviorsMask) {
- int last, first = changes.first_key_behavior;
- last = first + changes.num_key_behaviors - 1;
+ int first = changes.first_key_behavior;
+ int last = first + changes.num_key_behaviors - 1;
+
fprintf(stderr, " behaviors: %d..%d\n", first, last);
}
if (changes.changed & XkbVirtualModsMask) {
fprintf(stderr, "virtual mods: 0x%04x\n", changes.vmods);
}
if (changes.changed & XkbExplicitComponentsMask) {
- int last, first = changes.first_key_explicit;
+ int first = changes.first_key_explicit;
+ int last = first + changes.num_key_explicit - 1;
- last = first + changes.num_key_explicit - 1;
fprintf(stderr, " explicit: %d..%d\n", first, last);
}
#endif
@@ -643,10 +644,9 @@ XkbTranslateKeySym(register Display *dpy,
if ((!xkb->cvt.KSToUpper) && (mods & LockMask)) {
register int i;
int change;
- char ch;
for (i = change = 0; i < n; i++) {
- ch = toupper(buffer[i]);
+ char ch = toupper(buffer[i]);
change = (change || (buffer[i] != ch));
buffer[i] = ch;
}