* fhandler_console.cc (char_command): Add escape sequence for codepage

ansi <-> oem switching for ncurses frame drawing capabilities.
	* dcrt0.cc: Add local variable alternate_charset_active.
	* winsup.h: Add global external variable alternate_charset_active.
This commit is contained in:
Corinna Vinschen
2003-10-15 08:23:26 +00:00
parent 0f8117bf42
commit ce34c904cc
4 changed files with 21 additions and 0 deletions

View File

@@ -66,6 +66,12 @@ con_to_str (char *d, const char *s, DWORD sz)
inline BOOL
str_to_con (char *d, const char *s, DWORD sz)
{
if (alternate_charset_active)
{
/* no translation when alternate charset is active */
memcpy(d, s, sz);
return TRUE;
}
return cp_convert (GetConsoleOutputCP (), d, get_cp (), s, sz);
}
@@ -1111,6 +1117,12 @@ fhandler_console::char_command (char c)
case 9: /* dim */
dev_state->intensity = INTENSITY_DIM;
break;
case 10: /* end alternate charset */
alternate_charset_active = FALSE;
break;
case 11: /* start alternate charset */
alternate_charset_active = TRUE;
break;
case 24:
dev_state->underline = FALSE;
break;