mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 12:29:32 +08:00
* fhandler_console.cc (set_console_title): Convert title string to
wchar_t and call SetConsoleTitleW.
This commit is contained in:
parent
f17f20c139
commit
7774a4b029
@ -1,3 +1,8 @@
|
||||
2009-06-04 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_console.cc (set_console_title): Convert title string to
|
||||
wchar_t and call SetConsoleTitleW.
|
||||
|
||||
2009-06-04 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space to
|
||||
|
@ -1892,12 +1892,11 @@ fhandler_console::set_close_on_exec (bool val)
|
||||
void __stdcall
|
||||
set_console_title (char *title)
|
||||
{
|
||||
char buf[257];
|
||||
strncpy (buf, title, sizeof (buf) - 1);
|
||||
buf[sizeof (buf) - 1] = '\0';
|
||||
wchar_t buf[257];
|
||||
sys_mbstowcs (buf, sizeof buf, title);
|
||||
lock_ttys here (15000);
|
||||
SetConsoleTitle (buf);
|
||||
debug_printf ("title '%s'", buf);
|
||||
SetConsoleTitleW (buf);
|
||||
debug_printf ("title '%W'", buf);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user