summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-09-05 13:08:33 +0200
committerCorinna Vinschen <corinna@vinschen.de>2018-09-05 13:08:33 +0200
commit213d8cac24ce234255179717723626ed16b33fe8 (patch)
treee6dccd64da04ee848ddf8423d537d76ddf637d44
parent9bbda85e27ee9d2d1ab7104b3a07f12ce7b393ce (diff)
downloadcygnal-213d8cac24ce234255179717723626ed16b33fe8.tar.gz
cygnal-213d8cac24ce234255179717723626ed16b33fe8.tar.bz2
cygnal-213d8cac24ce234255179717723626ed16b33fe8.zip
Cygwin: console: use UNICODE API throughout
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/fhandler_console.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 9a6c9b15e..b4674b8be 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -759,7 +759,7 @@ dev_console::scroll_buffer (HANDLE h, int x1, int y1, int x2, int y2, int xn, in
SMALL_RECT sr1, sr2;
CHAR_INFO fill;
COORD dest;
- fill.Char.AsciiChar = ' ';
+ fill.Char.UnicodeChar = L' ';
fill.Attributes = current_win32_attr;
fillin (h);
@@ -775,7 +775,7 @@ dev_console::scroll_buffer (HANDLE h, int x1, int y1, int x2, int y2, int xn, in
sr1.Bottom = sr2.Bottom;
dest.X = xn >= 0 ? xn : dwWinSize.X - 1;
dest.Y = yn >= 0 ? yn : b.srWindow.Bottom;
- ScrollConsoleScreenBuffer (h, &sr1, &sr2, dest, &fill);
+ ScrollConsoleScreenBufferW (h, &sr1, &sr2, dest, &fill);
}
inline void
@@ -822,7 +822,7 @@ fhandler_console::open (int flags, mode_t)
set_output_handle (NULL);
/* Open the input handle as handle_ */
- h = CreateFile ("CONIN$", GENERIC_READ | GENERIC_WRITE,
+ h = CreateFileW (L"CONIN$", GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, &sec_none,
OPEN_EXISTING, 0, 0);
@@ -833,7 +833,7 @@ fhandler_console::open (int flags, mode_t)
}
set_io_handle (h);
- h = CreateFile ("CONOUT$", GENERIC_READ | GENERIC_WRITE,
+ h = CreateFileW (L"CONOUT$", GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, &sec_none,
OPEN_EXISTING, 0, 0);
@@ -1226,9 +1226,9 @@ dev_console::scroll_window (HANDLE h, int x1, int y1, int x2, int y2)
br.Right = b.dwSize.X - 1;
br.Bottom = b.dwSize.Y - 1;
dest.X = dest.Y = 0;
- fill.Char.AsciiChar = ' ';
+ fill.Char.UnicodeChar = L' ';
fill.Attributes = current_win32_attr;
- ScrollConsoleScreenBuffer (h, &br, NULL, dest, &fill);
+ ScrollConsoleScreenBufferW (h, &br, NULL, dest, &fill);
/* Since we're moving the console buffer under the console window
we only have to move the console window if the user scrolled the
window upwards. The number of lines is the distance to the