Remove a few remaining uses of the KeySym type 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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
diff --git a/makekeys/makekeys.c b/makekeys/makekeys.c
index cf96f13..c731e40 100644
--- a/makekeys/makekeys.c
+++ b/makekeys/makekeys.c
@@ -28,12 +28,13 @@ from The Open Group.
/* Constructs hash tables for XStringToKeysym and XKeysymToString. */
-#include <X11/X.h>
-#include <X11/Xos.h>
+#include "xkbcommon/xkbcommon.h"
+
#include <X11/keysymdef.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
typedef uint32_t Signature;
@@ -41,7 +42,7 @@ typedef uint32_t Signature;
static struct info {
char *name;
- KeySym val;
+ xkb_keysym_t val;
} info[KTNUM];
#define MIN_REHASH 15
@@ -50,11 +51,11 @@ static struct info {
static char tab[KTNUM];
static unsigned short offsets[KTNUM];
static unsigned short indexes[KTNUM];
-static KeySym values[KTNUM];
+static xkb_keysym_t values[KTNUM];
static int ksnum = 0;
static int
-parse_line(const char *buf, char *key, KeySym *val, char *prefix)
+parse_line(const char *buf, char *key, xkb_keysym_t *val, char *prefix)
{
int i;
char alias[128];
@@ -109,7 +110,7 @@ main(int argc, char *argv[])
int best_max_rehash;
int best_z = 0;
int num_found;
- KeySym val;
+ xkb_keysym_t val;
char key[128], prefix[128];
char buf[1024];
diff --git a/test/xkey.c b/test/xkey.c
index 00e0929..52914a2 100644
--- a/test/xkey.c
+++ b/test/xkey.c
@@ -3,17 +3,18 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <X11/X.h>
static void print_keysym(const char *s)
{
- KeySym ks = xkb_string_to_keysym(s);
+ xkb_keysym_t ks = xkb_string_to_keysym(s);
if (ks == NoSymbol)
printf("NoSymbol\n");
else
printf("0x%lX\n", ks);
}
-static void print_string(KeySym ks)
+static void print_string(xkb_keysym_t ks)
{
char s[16];
@@ -24,7 +25,7 @@ static void print_string(KeySym ks)
int main(int argc, char *argv[])
{
int mode;
- KeySym sym;
+ xkb_keysym_t sym;
if (argc < 3) {
fprintf(stderr, "error: not enough arguments\n");