* 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

@ -1,3 +1,10 @@
2003-10-13 Micha Nelissen <M.Nelissen@student.tue.nl>
* 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.
2003-10-14 Corinna Vinschen <corinna@vinschen.de>
* exceptions.cc (ctrl_c_handler): Don't send SIGHUP on

View File

@ -57,6 +57,7 @@ bool display_title;
bool strip_title_path;
bool allow_glob = TRUE;
codepage_type current_codepage = ansi_cp;
bool alternate_charset_active;
int cygwin_finished_initializing;

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;

View File

@ -90,6 +90,7 @@ extern "C" DWORD WINAPI GetLastError (void);
enum codepage_type {ansi_cp, oem_cp};
extern codepage_type current_codepage;
extern bool alternate_charset_active;
UINT get_cp ();