[KERNEL32]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 14 Jun 2013 01:00:49 +0000 (01:00 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 14 Jun 2013 01:00:49 +0000 (01:00 +0000)
Code formatting only + member variable type fix.

svn path=/trunk/; revision=59211

reactos/dll/win32/kernel32/client/console/console.c
reactos/include/reactos/subsys/win/conmsg.h

index 9f7e727..da10ae8 100644 (file)
@@ -1958,17 +1958,15 @@ GetConsoleCP(VOID)
     CONSOLE_API_MESSAGE ApiMessage;
 
     /* Get the Input Code Page */
-    ApiMessage.Data.ConsoleCPRequest.InputCP = TRUE;
+    ApiMessage.Data.ConsoleCPRequest.InputCP  = TRUE;
+    ApiMessage.Data.ConsoleCPRequest.CodePage = 0;
 
     Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
                                  NULL,
                                  CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepGetCP),
                                  sizeof(CONSOLE_GETSETINPUTOUTPUTCP));
-    if (!NT_SUCCESS(Status))
-    {
-        BaseSetLastNTError(Status);
-        return 0;
-    }
+
+    if (!NT_SUCCESS(Status)) BaseSetLastNTError(Status);
 
     return ApiMessage.Data.ConsoleCPRequest.CodePage;
 }
@@ -1987,17 +1985,15 @@ SetConsoleCP(UINT wCodePageID)
     CONSOLE_API_MESSAGE ApiMessage;
 
     /* Set the Input Code Page */
-    ApiMessage.Data.ConsoleCPRequest.InputCP = TRUE;
+    ApiMessage.Data.ConsoleCPRequest.InputCP  = TRUE;
     ApiMessage.Data.ConsoleCPRequest.CodePage = wCodePageID;
 
     Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
                                  NULL,
                                  CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetCP),
                                  sizeof(CONSOLE_GETSETINPUTOUTPUTCP));
-    if (!NT_SUCCESS(Status))
-    {
-        BaseSetLastNTError(Status);
-    }
+
+    if (!NT_SUCCESS(Status)) BaseSetLastNTError(Status);
 
     return NT_SUCCESS(Status);
 }
@@ -2016,17 +2012,15 @@ GetConsoleOutputCP(VOID)
     CONSOLE_API_MESSAGE ApiMessage;
 
     /* Get the Output Code Page */
-    ApiMessage.Data.ConsoleCPRequest.InputCP = FALSE;
+    ApiMessage.Data.ConsoleCPRequest.InputCP  = FALSE;
+    ApiMessage.Data.ConsoleCPRequest.CodePage = 0;
 
     Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
                                  NULL,
                                  CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepGetCP),
                                  sizeof(CONSOLE_GETSETINPUTOUTPUTCP));
-    if (!NT_SUCCESS(Status))
-    {
-        BaseSetLastNTError (Status);
-        return 0;
-    }
+
+    if (!NT_SUCCESS(Status)) BaseSetLastNTError(Status);
 
     return ApiMessage.Data.ConsoleCPRequest.CodePage;
 }
@@ -2045,17 +2039,15 @@ SetConsoleOutputCP(UINT wCodePageID)
     CONSOLE_API_MESSAGE ApiMessage;
 
     /* Set the Output Code Page */
-    ApiMessage.Data.ConsoleCPRequest.InputCP = FALSE;
+    ApiMessage.Data.ConsoleCPRequest.InputCP  = FALSE;
     ApiMessage.Data.ConsoleCPRequest.CodePage = wCodePageID;
 
     Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
                                  NULL,
                                  CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetCP),
                                  sizeof(CONSOLE_GETSETINPUTOUTPUTCP));
-    if (!NT_SUCCESS(Status))
-    {
-        BaseSetLastNTError(Status);
-    }
+
+    if (!NT_SUCCESS(Status)) BaseSetLastNTError(Status);
 
     return NT_SUCCESS(Status);
 }
index 69b70ef..4434865 100644 (file)
@@ -361,10 +361,10 @@ typedef struct
     CODE_TYPE CodeType;
     union
     {
-        PVOID pCode;
-        PCHAR AsciiChar;
+        PVOID  pCode;
+        PCHAR  AsciiChar;
         PWCHAR UnicodeChar;
-        PWORD Attribute;
+        PWORD  Attribute;
     } pCode;    // Either a pointer to a character or to an attribute.
 } CONSOLE_READOUTPUTCODE, *PCONSOLE_READOUTPUTCODE;
 
@@ -379,14 +379,13 @@ typedef struct
 
     ULONG NrCharactersWritten;
 
-    USHORT CodeType;
+    CODE_TYPE CodeType;
     union
     {
-        // PVOID String;
-        PVOID pCode;
-        PCHAR AsciiChar;
+        PVOID  pCode;
+        PCHAR  AsciiChar;
         PWCHAR UnicodeChar;
-        PWORD Attribute;
+        PWORD  Attribute;
     } pCode;    // Either a pointer to a character or to an attribute.
 } CONSOLE_WRITEOUTPUTCODE, *PCONSOLE_WRITEOUTPUTCODE;
 
@@ -397,9 +396,9 @@ typedef struct
     CODE_TYPE CodeType;
     union
     {
-        CHAR AsciiChar;
+        CHAR  AsciiChar;
         WCHAR UnicodeChar;
-        WORD Attribute;
+        WORD  Attribute;
     } Code; // Either a character or an attribute.
 
     COORD Coord;