Xlib: Fixes for util/makekeys
Bernardo Innocenti
bernie at codewiz.org
Wed Aug 22 16:48:48 PDT 2007
Daniel Stone wrote:
> On Mon, Jun 11, 2007 at 10:02:56PM -0400, Bernardo Innocenti wrote:
>> this is a small workaround for util/makekeys. We triggered this
>> bug by adding 20 new keys in x11proto/keysymdef.h.
>
> I need to bump this higher anyway when I fix the keysym lookup disaster
> once and for all. I've got the code, just needs cleaning up and
> merging.
Is this still planned? (this is my old patch)
diff --git a/src/util/makekeys.c b/src/util/makekeys.c
index 214ea5c..afc3854 100644
--- a/src/util/makekeys.c
+++ b/src/util/makekeys.c
@@ -42,7 +42,7 @@ char *malloc();
typedef unsigned long Signature;
-#define KTNUM 3000
+#define KTNUM 4000
static struct info {
char *name;
@@ -157,6 +157,11 @@ next1: ;
}
z = best_z;
+ if (z == 0) {
+ fprintf(stderr, "makekeys: try increasing KTNUM!\n");
+ exit(1);
+ }
+
printf("#ifdef NEEDKTABLE\n");
printf("const unsigned char _XkeyTable[] = {\n");
printf("0,\n");
--
1.5.2
--
// Bernardo Innocenti
\X/ http://www.codewiz.org/
More information about the xorg
mailing list