/* 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;
static struct info {
char *name;
- KeySym val;
+ xkb_keysym_t val;
} info[KTNUM];
#define MIN_REHASH 15
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];
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];
#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];
int main(int argc, char *argv[])
{
int mode;
- KeySym sym;
+ xkb_keysym_t sym;
if (argc < 3) {
fprintf(stderr, "error: not enough arguments\n");