summaryrefslogtreecommitdiff
path: root/src/TMkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/TMkey.c')
-rw-r--r--src/TMkey.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/TMkey.c b/src/TMkey.c
index 92fe81f..3087407 100644
--- a/src/TMkey.c
+++ b/src/TMkey.c
@@ -59,6 +59,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/TMkey.c,v 3.10 2001/12/14 19:56:30 dawes Exp $ */
#define XK_MISCELLANY
#define XK_LATIN1
@@ -68,11 +69,8 @@ in this Software without prior written authorization from The Open Group.
#include "IntrinsicI.h"
#include <X11/keysymdef.h>
-
-#ifdef __STDC__
-#define Const const
-#else
-#define Const /**/
+#ifdef XKB
+#include <X11/XKBlib.h>
#endif
#define FLUSHKEYCACHE(ctx) \
@@ -86,7 +84,7 @@ in this Software without prior written authorization from The Open Group.
*/
#define FM(i) i >> (8 - TMKEYCACHELOG2)
-static Const unsigned char modmix[256] = {
+static const unsigned char modmix[256] = {
FM(0x0f), FM(0x8f), FM(0x4f), FM(0xcf), FM(0x2f), FM(0xaf), FM(0x6f), FM(0xef),
FM(0x1f), FM(0x9f), FM(0x5f), FM(0xdf), FM(0x3f), FM(0xbf), FM(0x7f), FM(0xff),
FM(0x07), FM(0x87), FM(0x47), FM(0xc7), FM(0x27), FM(0xa7), FM(0x67), FM(0xe7),
@@ -219,8 +217,7 @@ void _XtAllocTMContext(pd)
pd->tm_context = ctx;
}
-static unsigned int num_bits(mask)
- unsigned long mask;
+static unsigned int num_bits(unsigned long mask)
{
register unsigned long y;
@@ -601,9 +598,7 @@ void XtTranslateKey(dpy, keycode, modifiers,
}
#else
{
- XkbLookupKeySym(dpy, keycode, modifiers, modifiers_return,
- keysym_return);
- return;
+ XkbLookupKeySym(dpy, keycode, modifiers, modifiers_return, keysym_return);
}
#endif
@@ -692,7 +687,7 @@ void XtKeysymToKeycodeList(dpy, keysym, keycodes_return, keycount_return)
KeySym lsym, usym;
unsigned maxcodes = 0;
unsigned ncodes = 0;
- KeyCode *keycodes, *codeP;
+ KeyCode *keycodes, *codeP = NULL;
DPY_TO_APPCON(dpy);
LOCK_APP(app);