diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-18 15:11:23 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-18 15:11:23 (GMT) |
commit | 3a94aaa6cb69b47612e4f299ef44bbb6d8869827 (patch) | |
tree | 38b517499284c2f8ba3ff0efc49b56a2a594746e /win/tclWinConsole.c | |
parent | f2f4614f5cd6f0493ed0e46688b28017c8fc93b9 (diff) | |
download | tcl-3a94aaa6cb69b47612e4f299ef44bbb6d8869827.zip tcl-3a94aaa6cb69b47612e4f299ef44bbb6d8869827.tar.gz tcl-3a94aaa6cb69b47612e4f299ef44bbb6d8869827.tar.bz2 |
TCHAR -> WCHAR converions (and corresponding Win32 API call changes), since we are impicitly compiling with -DUNICODE
Diffstat (limited to 'win/tclWinConsole.c')
-rw-r--r-- | win/tclWinConsole.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index d61a030..6800115 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -193,8 +193,8 @@ static const Tcl_ChannelType consoleChannelType = { * * ReadConsoleBytes, WriteConsoleBytes -- * - * Wrapper for ReadConsole{A,W}, that takes and returns number of bytes - * instead of number of TCHARS. + * Wrapper for ReadConsoleW, that takes and returns number of bytes + * instead of number of WCHARS. * *---------------------------------------------------------------------- */ @@ -208,7 +208,7 @@ ReadConsoleBytes( { DWORD ntchars; BOOL result; - int tcharsize = sizeof(TCHAR); + int tcharsize = sizeof(WCHAR); /* * If user types a Ctrl-Break or Ctrl-C, ReadConsole will return @@ -221,7 +221,7 @@ ReadConsoleBytes( * will run and take whatever action it deems appropriate. */ do { - result = ReadConsole(hConsole, lpBuffer, nbytes / tcharsize, &ntchars, + result = ReadConsoleW(hConsole, lpBuffer, nbytes / tcharsize, &ntchars, NULL); } while (result && ntchars == 0 && GetLastError() == ERROR_OPERATION_ABORTED); if (nbytesread != NULL) { @@ -239,9 +239,9 @@ WriteConsoleBytes( { DWORD ntchars; BOOL result; - int tcharsize = sizeof(TCHAR); + int tcharsize = sizeof(WCHAR); - result = WriteConsole(hConsole, lpBuffer, nbytes / tcharsize, &ntchars, + result = WriteConsoleW(hConsole, lpBuffer, nbytes / tcharsize, &ntchars, NULL); if (nbyteswritten != NULL) { *nbyteswritten = ntchars * tcharsize; |