* 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:
Christopher Faylor
2002-06-26 05:29:41 +00:00
parent 109e482278
commit f279e522b0
6 changed files with 52 additions and 25 deletions

View File

@@ -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