[CONDRV]: Quick fix for ASCII strings for ConDrvWriteConsoleOutputString.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 4 Aug 2014 21:09:46 +0000 (21:09 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 4 Aug 2014 21:09:46 +0000 (21:09 +0000)
[CONSRV]: Commit something forgotten from previous revision.

svn path=/branches/condrv_restructure/; revision=63808

win32ss/user/winsrv/consrv/condrv/text.c
win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c

index 98d5a85..96e3003 100644 (file)
@@ -966,6 +966,12 @@ ConDrvWriteConsoleOutputString(IN PCONSOLE Console,
         {
             Status = STATUS_NO_MEMORY;
         }
+
+        // FIXME: Quick fix: fix the CodeType and CodeSize since the
+        // ASCII string was converted into UNICODE.
+        // A proper fix needs to be written.
+        CodeType = CODE_UNICODE;
+        CodeSize = RTL_FIELD_SIZE(CODE_ELEMENT, UnicodeChar);
     }
     else
     {
index 96cc38f..1231148 100644 (file)
 
 /* GLOBALS ********************************************************************/
 
-#define GetNextConsole(Console) \
-    CONTAINING_RECORD(Console->Entry.Flink, TUI_CONSOLE_DATA, Entry)
-
-#define GetPrevConsole(Console) \
-    CONTAINING_RECORD(Console->Entry.Blink, TUI_CONSOLE_DATA, Entry)
-
-
 /* TUI Console Window Class name */
 #define TUI_CONSOLE_WINDOW_CLASS L"TuiConsoleWindowClass"
 
@@ -46,6 +39,13 @@ typedef struct _TUI_CONSOLE_DATA
     // TUI_CONSOLE_INFO TuiInfo;   /* TUI terminal settings */
 } TUI_CONSOLE_DATA, *PTUI_CONSOLE_DATA;
 
+#define GetNextConsole(Console) \
+    CONTAINING_RECORD(Console->Entry.Flink, TUI_CONSOLE_DATA, Entry)
+
+#define GetPrevConsole(Console) \
+    CONTAINING_RECORD(Console->Entry.Blink, TUI_CONSOLE_DATA, Entry)
+
+
 /* List of the maintained virtual consoles and its lock */
 static LIST_ENTRY VirtConsList;
 static PTUI_CONSOLE_DATA ActiveConsole; /* The active console on screen */