{ "iso-10646-18", iso_10646_18_syms, 159 }, /* ethiopic */
{ "iso-ir-197", iso_ir_197_syms, 160 }, /* sami */
{ "iso-ir-209", iso_ir_209_syms, 160 }, /* sami */
+ /* When you add a new charset with a long (> 15 chars) name,
+ * please update the chosen_charset definition below. */
};
/* Functions for both dumpkeys and loadkeys. */
int prefer_unicode = 0;
-static char *chosen_charset = NULL;
+static char chosen_charset[16] = "";
void
list_charsets(FILE *f) {
if(p->name[0])
syms[0].table[i] = p->name;
}
- if (chosen_charset)
- free(chosen_charset);
- chosen_charset = strdup(charset);
+ strcpy(chosen_charset, charset);
return 0;
}
}
if (!strcmp(s,p->name))
return (p->uni ^ 0xf000);
}
- } else /* if (!chosen_charset) */ {
+ } else /* if (!chosen_charset[0]) */ {
/* note: some keymaps use latin1 but with euro,
so set_charset() would fail */
/* note: some keymaps with charset line still use
symbols from more than one character set,
- so we cannot have the `if (!chosen_charset)' here */
+ so we cannot have the `if (!chosen_charset[0])' here */
for (i = 0; i < 256 - 160; i++)
if (!strcmp(s, latin1_syms[i].name)) {