diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 1 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 12 | ||||
-rw-r--r-- | winsup/cygwin/winsup.h | 1 |
4 files changed, 21 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c832d9f..84cdb04 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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 diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index b862ee1..e03c3af 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -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; diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index e80e47b..24c59c7 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -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; diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 745519e..a58e356 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -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 (); |