Author: hbelusca
Date: Tue Aug 12 14:59:13 2014
New Revision: 63874
URL:
http://svn.reactos.org/svn/reactos?rev=63874&view=rev
Log:
[CONSRV]: Still some code refactoring....
Modified:
branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c [iso-8859-1] Tue Aug
12 14:59:13 2014
@@ -26,7 +26,7 @@
/* GLOBALS ********************************************************************/
static ULONG ConsoleListSize;
-static PCONSOLE* ConsoleList; /* The list of the ConSrv consoles */
+static PCONSRV_CONSOLE* ConsoleList; /* The list of the ConSrv consoles */
static RTL_RESOURCE ListLock;
#define ConSrvLockConsoleListExclusive() \
@@ -41,13 +41,13 @@
static NTSTATUS
InsertConsole(OUT PHANDLE Handle,
- IN PCONSOLE Console)
+ IN PCONSRV_CONSOLE Console)
{
#define CONSOLE_HANDLES_INCREMENT 2 * 3
NTSTATUS Status = STATUS_SUCCESS;
ULONG i = 0;
- PCONSOLE* Block;
+ PCONSRV_CONSOLE* Block;
ASSERT( (ConsoleList == NULL && ConsoleListSize == 0) ||
(ConsoleList != NULL && ConsoleListSize != 0) );
@@ -70,7 +70,7 @@
/* Allocate a new handles table */
Block = ConsoleAllocHeap(HEAP_ZERO_MEMORY,
(ConsoleListSize +
- CONSOLE_HANDLES_INCREMENT) * sizeof(PCONSOLE));
+ CONSOLE_HANDLES_INCREMENT) *
sizeof(PCONSRV_CONSOLE));
if (Block == NULL)
{
Status = STATUS_UNSUCCESSFUL;
@@ -83,7 +83,7 @@
/* Copy the handles from the old table to the new one */
RtlCopyMemory(Block,
ConsoleList,
- ConsoleListSize * sizeof(PCONSOLE));
+ ConsoleListSize * sizeof(PCONSRV_CONSOLE));
ConsoleFreeHeap(ConsoleList);
}
ConsoleList = Block;
@@ -105,7 +105,7 @@
RemoveConsoleByHandle(IN HANDLE Handle)
{
NTSTATUS Status = STATUS_SUCCESS;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
BOOLEAN ValidHandle = ((HandleToULong(Handle) & 0x3) == 0x3);
ULONG Index = HandleToULong(Handle) >> 2;
@@ -135,7 +135,7 @@
#endif
static NTSTATUS
-RemoveConsoleByPointer(IN PCONSOLE Console)
+RemoveConsoleByPointer(IN PCONSRV_CONSOLE Console)
{
ULONG i = 0;
@@ -162,13 +162,13 @@
}
BOOLEAN NTAPI
-ConSrvValidateConsole(OUT PCONSOLE* Console,
+ConSrvValidateConsole(OUT PCONSRV_CONSOLE* Console,
IN HANDLE ConsoleHandle,
IN CONSOLE_STATE ExpectedState,
IN BOOLEAN LockConsole)
{
BOOLEAN RetVal = FALSE;
- PCONSOLE ValidatedConsole;
+ PCONSRV_CONSOLE ValidatedConsole;
BOOLEAN ValidHandle = ((HandleToULong(ConsoleHandle) & 0x3) == 0x3);
ULONG Index = HandleToULong(ConsoleHandle) >> 2;
@@ -239,11 +239,11 @@
NTSTATUS
ConSrvGetConsole(IN PCONSOLE_PROCESS_DATA ProcessData,
- OUT PCONSOLE* Console,
+ OUT PCONSRV_CONSOLE* Console,
IN BOOLEAN LockConsole)
{
NTSTATUS Status = STATUS_INVALID_HANDLE;
- PCONSOLE GrabConsole;
+ PCONSRV_CONSOLE GrabConsole;
// if (Console == NULL) return STATUS_INVALID_PARAMETER;
ASSERT(Console);
@@ -266,7 +266,7 @@
}
VOID
-ConSrvReleaseConsole(IN PCONSOLE Console,
+ConSrvReleaseConsole(IN PCONSRV_CONSOLE Console,
IN BOOLEAN WasConsoleLocked)
{
LONG RefCount = 0;
@@ -319,13 +319,13 @@
NTSTATUS NTAPI
ConSrvInitConsole(OUT PHANDLE NewConsoleHandle,
- OUT PCONSOLE* NewConsole,
+ OUT PCONSRV_CONSOLE* NewConsole,
IN OUT PCONSOLE_START_INFO ConsoleStartInfo,
IN ULONG ConsoleLeaderProcessId)
{
NTSTATUS Status;
HANDLE ConsoleHandle;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
CONSOLE_INFO ConsoleInfo;
SIZE_T Length = 0;
@@ -453,7 +453,7 @@
}
VOID NTAPI
-ConSrvDeleteConsole(PCONSOLE Console)
+ConSrvDeleteConsole(PCONSRV_CONSOLE Console)
{
DPRINT("ConSrvDeleteConsole\n");
@@ -541,7 +541,7 @@
}
NTSTATUS NTAPI
-ConSrvGetConsoleProcessList(IN PCONSOLE Console,
+ConSrvGetConsoleProcessList(IN PCONSRV_CONSOLE Console,
IN OUT PULONG ProcessIdsList,
IN ULONG MaxIdListItems,
OUT PULONG ProcessIdsTotal)
@@ -798,7 +798,7 @@
{
NTSTATUS Status;
PCONSOLE_GETSETCONSOLETITLE TitleRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.TitleRequest;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
if (!CsrValidateMessageBuffer(ApiMessage,
(PVOID)&TitleRequest->Title,
@@ -833,7 +833,7 @@
{
NTSTATUS Status;
PCONSOLE_GETSETCONSOLETITLE TitleRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.TitleRequest;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
if (!CsrValidateMessageBuffer(ApiMessage,
(PVOID)&TitleRequest->Title,
@@ -868,7 +868,7 @@
{
NTSTATUS Status;
PCONSOLE_GETINPUTOUTPUTCP GetConsoleCPRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetConsoleCPRequest;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
DPRINT("SrvGetConsoleCP, getting %s Code Page\n",
GetConsoleCPRequest->OutputCP ? "Output" : "Input");
@@ -892,7 +892,7 @@
{
NTSTATUS Status = STATUS_INVALID_PARAMETER;
PCONSOLE_SETINPUTOUTPUTCP SetConsoleCPRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetConsoleCPRequest;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
DPRINT("SrvSetConsoleCP, setting %s Code Page\n",
SetConsoleCPRequest->OutputCP ? "Output" : "Input");
@@ -912,7 +912,7 @@
{
NTSTATUS Status;
PCONSOLE_GETPROCESSLIST GetProcessListRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetProcessListRequest;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
if (!CsrValidateMessageBuffer(ApiMessage,
(PVOID)&GetProcessListRequest->ProcessIdsList,
@@ -938,7 +938,7 @@
{
NTSTATUS Status;
PCONSOLE_GENERATECTRLEVENT GenerateCtrlEventRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GenerateCtrlEventRequest;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
@@ -955,7 +955,7 @@
{
NTSTATUS Status;
PCONSOLE_PROCESS_DATA ProcessData =
ConsoleGetPerProcessData(CsrGetClientThread()->Process);
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
Status = ConSrvGetConsole(ProcessData, &Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
@@ -982,7 +982,7 @@
{
NTSTATUS Status;
PCONSOLE_GETMOUSEINFO GetMouseInfoRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetMouseInfoRequest;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
@@ -1004,7 +1004,7 @@
{
NTSTATUS Status;
PCONSOLE_GETKBDLAYOUTNAME GetKbdLayoutNameRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetKbdLayoutNameRequest;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.c [iso-8859-1] Tue Aug
12 14:59:13 2014
@@ -482,7 +482,7 @@
{
NTSTATUS Status = STATUS_SUCCESS;
HANDLE ConsoleHandle;
- PCONSOLE Console;
+ PCONSRV_CONSOLE Console;
/*
* We are about to create a new console. However when ConSrvNewProcess
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1]
Tue Aug 12 14:59:13 2014
@@ -12,20 +12,10 @@
#include "rect.h"
-#define CSR_DEFAULT_CURSOR_SIZE 25
-
/* Default attributes */
#define DEFAULT_SCREEN_ATTRIB (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED)
#define DEFAULT_POPUP_ATTRIB (FOREGROUND_BLUE | FOREGROUND_RED | \
BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED |
BACKGROUND_INTENSITY)
-
-/* VGA character cell */
-typedef struct _CHAR_CELL
-{
- CHAR Char;
- BYTE Attributes;
-} CHAR_CELL, *PCHAR_CELL;
-C_ASSERT(sizeof(CHAR_CELL) == 2);
/* Object type magic numbers */
@@ -323,8 +313,6 @@
} CONSOLE; // , *PCONSOLE;
-// #include "conio_winsrv.h"
-
/* console.c */
VOID NTAPI
ConDrvPause(PCONSOLE Console);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h [iso-8859-1]
Tue Aug 12 14:59:13 2014
@@ -18,8 +18,21 @@
#define CONSRV_CONSOLE CONSOLE
#define PCONSRV_CONSOLE PCONSOLE
+// #define _CONSRV_CONSOLE _WINSRV_CONSOLE
+// #define CONSRV_CONSOLE WINSRV_CONSOLE
+// #define PCONSRV_CONSOLE PWINSRV_CONSOLE
+
#define CSR_DEFAULT_CURSOR_SIZE 25
+
+/* VGA character cell */
+typedef struct _CHAR_CELL
+{
+ CHAR Char;
+ BYTE Attributes;
+} CHAR_CELL, *PCHAR_CELL;
+C_ASSERT(sizeof(CHAR_CELL) == 2);
+
typedef struct _FRONTEND FRONTEND, *PFRONTEND;
/* HACK: */ typedef struct _CONSOLE_INFO *PCONSOLE_INFO;
@@ -105,6 +118,7 @@
/******************************* Console Set-up *******************************/
/* This **MUST** be FIRST!! */
// CONSOLE;
+ // PCONSOLE Console;
// LONG ReferenceCount; /* Is incremented each time a handle to
something in the console (a screen-buffer or the input buffer of this console) gets
referenced */
// CRITICAL_SECTION Lock;