Move set_program_name and init_nls to host_init. On windows

fix in this fuction console and argument charset as well.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-10-13 20:03:42 +02:00
parent 4cd3c4fec7
commit ae5540d3d4
24 changed files with 282 additions and 78 deletions

View file

@ -49,24 +49,6 @@
#include <windows.h>
#include <winioctl.h>
char *
grub_util_tchar_to_utf8 (LPCTSTR in)
{
#if SIZEOF_TCHAR == 1
return xstrdup (path);
#elif SIZEOF_TCHAR == 2
size_t ssz;
for (ssz = 0; in[ssz]; ssz++);
size_t tsz = GRUB_MAX_UTF8_PER_UTF16 * ssz + 1;
grub_uint8_t *ret = xmalloc (tsz);
*grub_utf16_to_utf8 (ret, in, ssz) = '\0';
return (char *) ret;
#else
#error "Unsupported TCHAR size"
#endif
}
#if SIZEOF_TCHAR == 1
#define tcsnicmp strncasecmp
#define tclen strlen