aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2016-08-02 00:51:13 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-10-10 22:52:30 +0200
commit7b0bdde5c5ce290d52d6e6aba1cd73fe3130093a (patch)
tree4eb75ae67bb48ad19de23369965221a6fa070575 /nx-X11
parentb4571a8ff2a0b361745b9a068539e7d9fd718fd0 (diff)
downloadnx-libs-7b0bdde5c5ce290d52d6e6aba1cd73fe3130093a.tar.gz
nx-libs-7b0bdde5c5ce290d52d6e6aba1cd73fe3130093a.tar.bz2
nx-libs-7b0bdde5c5ce290d52d6e6aba1cd73fe3130093a.zip
update makekeys.c to libX11 1.3.4 (+ fix)
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/lib/X11/util/makekeys.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/nx-X11/lib/X11/util/makekeys.c b/nx-X11/lib/X11/util/makekeys.c
index 6cbce0693..ea8694d7d 100644
--- a/nx-X11/lib/X11/util/makekeys.c
+++ b/nx-X11/lib/X11/util/makekeys.c
@@ -33,9 +33,6 @@ from The Open Group.
#include <nx-X11/keysymdef.h>
#include <stdio.h>
#include <stdlib.h>
-#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
-char *malloc();
-#endif /* macII */
typedef unsigned long Signature;
@@ -46,14 +43,14 @@ static struct info {
KeySym val;
} info[KTNUM];
-#define MIN_REHASH 10
+#define MIN_REHASH 15
#define MATCHES 10
-char tab[KTNUM];
-unsigned short offsets[KTNUM];
-unsigned short indexes[KTNUM];
-KeySym values[KTNUM];
-char buf[1024];
+static char tab[KTNUM];
+static unsigned short offsets[KTNUM];
+static unsigned short indexes[KTNUM];
+static KeySym values[KTNUM];
+static char buf[1024];
int
main(int argc, char *argv[])
@@ -100,12 +97,11 @@ main(int argc, char *argv[])
key);
continue;
}
- name = malloc((unsigned)strlen(key)+1);
+ name = strdup(key);
if (!name) {
fprintf(stderr, "makekeys: out of memory!\n");
exit(1);
}
- (void)strcpy(name, key);
info[ksnum].name = name;
ksnum++;
if (ksnum == KTNUM) {