Author: gschneider
Date: Mon May 17 20:43:21 2010
New Revision: 47255
URL:
http://svn.reactos.org/svn/reactos?rev=47255&view=rev
Log:
[WIN32CSR]
- Fix a FIXME: convert ASCII char to Unicode char with input codepage
- Rename define parameters to make sense (prefix s - source, d - destination)
Modified:
trunk/reactos/subsystems/win32/csrss/win32csr/conio.c
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/conio.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/conio.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/conio.c [iso-8859-1] Mon May 17 20:43:21
2010
@@ -26,11 +26,14 @@
#define ConsoleInputUnicodeCharToAnsiChar(Console, dChar, sWChar) \
WideCharToMultiByte((Console)->CodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL)
+#define ConsoleInputAnsiCharToUnicodeChar(Console, dWChar, sChar) \
+ MultiByteToWideChar((Console)->CodePage, 0, (sChar), 1, (dWChar), 1)
+
#define ConsoleUnicodeCharToAnsiChar(Console, dChar, sWChar) \
WideCharToMultiByte((Console)->OutputCodePage, 0, (sWChar), 1, (dChar), 1, NULL,
NULL)
-#define ConsoleAnsiCharToUnicodeChar(Console, sWChar, dChar) \
- MultiByteToWideChar((Console)->OutputCodePage, 0, (dChar), 1, (sWChar), 1)
+#define ConsoleAnsiCharToUnicodeChar(Console, dWChar, sChar) \
+ MultiByteToWideChar((Console)->OutputCodePage, 0, (sChar), 1, (dWChar), 1)
/* FUNCTIONS *****************************************************************/
@@ -616,7 +619,7 @@
else
{
if(Request->Data.ReadConsoleRequest.Unicode)
- UnicodeBuffer[i] = Input->InputEvent.Event.KeyEvent.uChar.AsciiChar;
/* FIXME */
+ ConsoleInputAnsiCharToUnicodeChar(Console, &UnicodeBuffer[i],
&Input->InputEvent.Event.KeyEvent.uChar.AsciiChar);
else
Buffer[i] = Input->InputEvent.Event.KeyEvent.uChar.AsciiChar;
}