do_get_atom_value = get_atom_value;
return;
}
-
- if (nodeTable)
- return;
-
- tableLength = InitialTableSize;
- nodeTable = (NodePtr *)malloc(InitialTableSize * sizeof(NodePtr));
- nodeTable[None] = NULL;
}
static const char *
if ((lastAtom + 1) >= tableLength) {
NodePtr *table;
+ int newLength;
+
+ if (tableLength == 0)
+ newLength = InitialTableSize;
+ else
+ newLength = tableLength * 2;
- table = (NodePtr *)realloc(nodeTable,
- tableLength * 2 * sizeof(NodePtr));
+ table = realloc(nodeTable, newLength * sizeof(NodePtr));
if (!table) {
if (nd->string != string)
free(nd->string);
free(nd);
return BAD_RESOURCE;
}
- tableLength <<= 1;
+ tableLength = newLength;
+ table[None] = NULL;
nodeTable = table;
}
ktcsg.geometry = argv[5];
uSetErrorFile(NULL);
- XkbcInitAtoms(NULL, NULL);
xkb = XkbcCompileKeymapFromComponents(&ktcsg);