X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unicode.c;h=c68017aeea79834da7902f07c9827a4b51313c8c;hb=6b362191f1a2c6897e7b7bfa80beec1cd1f722fd;hp=d1428bb62b7994843e82c3025b9783e39d5eeae6;hpb=abfe064c7b1610498aa361426c5d96d1b32d8bef;p=PuTTY.git diff --git a/unicode.c b/unicode.c index d1428bb6..c68017ae 100644 --- a/unicode.c +++ b/unicode.c @@ -516,12 +516,12 @@ void init_ucs(Config *cfg, struct unicode_data *ucsdata) if (DIRECT_FONT(ucsdata->unitab_line[i])) continue; if (!ucsdata->uni_tbl) { - ucsdata->uni_tbl = smalloc(256 * sizeof(char *)); + ucsdata->uni_tbl = snewn(256, char *); memset(ucsdata->uni_tbl, 0, 256 * sizeof(char *)); } j = ((ucsdata->unitab_line[i] >> 8) & 0xFF); if (!ucsdata->uni_tbl[j]) { - ucsdata->uni_tbl[j] = smalloc(256 * sizeof(char)); + ucsdata->uni_tbl[j] = snewn(256, char); memset(ucsdata->uni_tbl[j], 0, 256 * sizeof(char)); } ucsdata->uni_tbl[j][ucsdata->unitab_line[i] & 0xFF] = i; @@ -1094,7 +1094,7 @@ int decode_codepage(char *cp_name) return codepage; } -char *cp_name(int codepage) +const char *cp_name(int codepage) { const struct cp_list_item *cpi, *cpno; static char buf[32]; @@ -1134,7 +1134,7 @@ char *cp_name(int codepage) * Return the nth code page in the list, for use in the GUI * configurer. */ -char *cp_enumerate(int index) +const char *cp_enumerate(int index) { if (index < 0 || index >= lenof(cp_list)) return NULL;