* autoload (noload): Avoid clobbering bx register.
* environ.cc (codepage_init): Use case insensitive match. * fhandler_console.cc (cp_get_internal): Delete. (con_to_str): Use get_cp to derive code page. (str_to_con): Ditto. * miscfuncs.cc (get_cp): New function. (sys_wcstombs): New function. Converted from macro. (sys_mbstowcs): Ditto. * winsup.h: Reflect above changes.
This commit is contained in:
@@ -448,20 +448,18 @@ codepage_init (const char *buf)
|
||||
if (!buf || !*buf)
|
||||
return;
|
||||
|
||||
if (strcmp (buf, "oem")== 0)
|
||||
if (strcasematch (buf, "oem"))
|
||||
{
|
||||
current_codepage = oem_cp;
|
||||
set_file_api_mode (current_codepage);
|
||||
}
|
||||
else if (strcmp (buf, "ansi")== 0)
|
||||
else if (strcasematch (buf, "ansi"))
|
||||
{
|
||||
current_codepage = ansi_cp;
|
||||
set_file_api_mode (current_codepage);
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_printf ("Wrong codepage name: %s", buf);
|
||||
}
|
||||
debug_printf ("Wrong codepage name: %s", buf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user