-#ifdef WINDOWS
-#include <windows.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
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;
* 1254 -> ISO 8859-9
* 1255 -> ISO 8859-8
* 1256 -> ISO 8859-6
- * 1257 -> ISO 8859-4
+ * 1257 -> ISO 8859-13 (changed from 8859-4 on advice of a Lithuanian)
*
* and for anything else, choose direct-to-font.
*/
case 1254: cp_name = "ISO-8859-9"; break;
case 1255: cp_name = "ISO-8859-8"; break;
case 1256: cp_name = "ISO-8859-6"; break;
- case 1257: cp_name = "ISO-8859-4"; break;
+ case 1257: cp_name = "ISO-8859-13"; break;
/* default: leave it blank, which will select -1, direct->font */
}
}
return codepage;
}
-char *cp_name(int codepage)
+const char *cp_name(int codepage)
{
const struct cp_list_item *cpi, *cpno;
static char buf[32];
* 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;