/* winduni.c -- unicode support for the windres program.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2023 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
Rewritten by Kai Tietz, Onevision.
/* Codepages mapped. */
static local_iconv_map codepages[] =
{
- { 0, "MS-ANSI" },
+ { 0, "cp1252" },
{ 1, "WINDOWS-1252" },
{ 437, "MS-ANSI" },
{ 737, "MS-GREEK" },
}
/* Make sure we have zero terminated string. */
- p = tmp = (char *) alloca (a_length + 1);
+ p = tmp = (char *) xmalloc (a_length + 1);
memcpy (tmp, ascii, a_length);
tmp[a_length] = 0;
if (length)
*length = idx;
+
+ free (tmp);
}
/* Convert an unicode string to an ASCII string. We just copy it,
{
rc_uint_type ret = 0;
#if defined (_WIN32) || defined (__CYGWIN__)
- WINBOOL used_def = FALSE;
+ WINBOOL used_def = false;
ret = (rc_uint_type) WideCharToMultiByte (cp, 0, u, -1, mb, mb_len,
NULL, & used_def);