Author: hbelusca
Date: Sun Dec 14 16:53:47 2014
New Revision: 65640
URL:
http://svn.reactos.org/svn/reactos?rev=65640&view=rev
Log:
[CONSRV]: Use an optional parameter for passing things to the "line discipline"
functions.
Modified:
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/coninput.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyterm.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/coninput.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/coninput.c [iso-8859-1]
Sun Dec 14 16:53:47 2014
@@ -238,10 +238,10 @@
NTSTATUS NTAPI
ConDrvReadConsole(IN PCONSOLE Console,
IN PCONSOLE_INPUT_BUFFER InputBuffer,
- /**/IN PUNICODE_STRING ExeName /**/OPTIONAL/**/,/**/
IN BOOLEAN Unicode,
OUT PVOID Buffer,
IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl,
+ IN PVOID Parameter OPTIONAL,
IN ULONG NumCharsToRead,
OUT PULONG NumCharsRead OPTIONAL)
{
@@ -260,10 +260,10 @@
/* Call the line-discipline */
return TermReadStream(Console,
- ExeName,
Unicode,
Buffer,
ReadControl,
+ Parameter,
NumCharsToRead,
NumCharsRead);
}
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyterm.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyterm.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyterm.c [iso-8859-1]
Sun Dec 14 16:53:47 2014
@@ -31,11 +31,11 @@
static NTSTATUS NTAPI
DummyReadStream(IN OUT PTERMINAL This,
- /**/IN PUNICODE_STRING ExeName /**/OPTIONAL/**/,/**/
IN BOOLEAN Unicode,
/**PWCHAR Buffer,**/
OUT PVOID Buffer,
IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl,
+ IN PVOID Parameter OPTIONAL,
IN ULONG NumCharsToRead,
OUT PULONG NumCharsRead OPTIONAL)
{
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.c [iso-8859-1] Sun Dec
14 16:53:47 2014
@@ -302,10 +302,10 @@
NTSTATUS NTAPI
ConDrvReadConsole(IN PCONSOLE Console,
IN PCONSOLE_INPUT_BUFFER InputBuffer,
- /**/IN PUNICODE_STRING ExeName /**/OPTIONAL/**/,/**/
IN BOOLEAN Unicode,
OUT PVOID Buffer,
IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl,
+ IN PVOID Parameter OPTIONAL,
IN ULONG NumCharsToRead,
OUT PULONG NumCharsRead OPTIONAL);
static NTSTATUS
@@ -324,7 +324,7 @@
ULONG NrCharactersRead = 0;
ULONG CharSize = (ReadConsoleRequest->Unicode ? sizeof(WCHAR) : sizeof(CHAR));
- /* Compute the executable name, if needed */
+ /* Retrieve the executable name, if needed */
if (ReadConsoleRequest->InitialNumBytes == 0 &&
ReadConsoleRequest->ExeLength <=
sizeof(ReadConsoleRequest->StaticBuffer))
{
@@ -366,10 +366,10 @@
DPRINT("Calling ConDrvReadConsole(%wZ)\n", &ExeName);
Status = ConDrvReadConsole(InputBuffer->Header.Console,
InputBuffer,
- &ExeName,
ReadConsoleRequest->Unicode,
Buffer,
&ReadControl,
+ &ExeName,
ReadConsoleRequest->NumBytes / CharSize, //
NrCharactersToRead
&NrCharactersRead);
DPRINT("ConDrvReadConsole returned (%d ; Status = 0x%08x)\n",
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c [iso-8859-1]
Sun Dec 14 16:53:47 2014
@@ -296,17 +296,18 @@
static NTSTATUS NTAPI
ConSrvTermReadStream(IN OUT PTERMINAL This,
- /**/IN PUNICODE_STRING ExeName /**/OPTIONAL/**/,/**/
IN BOOLEAN Unicode,
/**PWCHAR Buffer,**/
OUT PVOID Buffer,
IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl,
+ IN PVOID Parameter OPTIONAL,
IN ULONG NumCharsToRead,
OUT PULONG NumCharsRead OPTIONAL)
{
PFRONTEND FrontEnd = This->Data;
PCONSRV_CONSOLE Console = FrontEnd->Console;
PCONSOLE_INPUT_BUFFER InputBuffer = &Console->InputBuffer;
+ PUNICODE_STRING ExeName = Parameter;
// STATUS_PENDING : Wait if more to read ; STATUS_SUCCESS : Don't wait.
NTSTATUS Status = STATUS_PENDING;
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]
Sun Dec 14 16:53:47 2014
@@ -217,13 +217,13 @@
/* Interface used only for text-mode screen buffers */
NTSTATUS (NTAPI *ReadStream)(IN OUT PTERMINAL This,
- /**/IN PUNICODE_STRING ExeName /**/OPTIONAL/**/,/**/
- IN BOOLEAN Unicode,
- /**PWCHAR Buffer,**/
- OUT PVOID Buffer,
- IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl,
- IN ULONG NumCharsToRead,
- OUT PULONG NumCharsRead OPTIONAL);
+ IN BOOLEAN Unicode,
+ /**PWCHAR Buffer,**/
+ OUT PVOID Buffer,
+ IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl,
+ IN PVOID Parameter OPTIONAL,
+ IN ULONG NumCharsToRead,
+ OUT PULONG NumCharsRead OPTIONAL);
NTSTATUS (NTAPI *WriteStream)(IN OUT PTERMINAL This,
PTEXTMODE_SCREEN_BUFFER Buff,
PWCHAR Buffer,
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h [iso-8859-1] Sun
Dec 14 16:53:47 2014
@@ -10,9 +10,9 @@
/* Macros used to call functions in the TERMINAL_VTBL virtual table */
-#define TermReadStream(Console, ExeName, /**/ Unicode, /**/ Buffer, ReadControl,
NumCharsToRead, NumCharsRead) \
- (Console)->TermIFace.Vtbl->ReadStream(&(Console)->TermIFace, (ExeName),
/**/ (Unicode), /**/ \
- (Buffer), (ReadControl), (NumCharsToRead),
(NumCharsRead))
+#define TermReadStream(Console, /**/ Unicode, /**/ Buffer, ReadControl, Parameter,
NumCharsToRead, NumCharsRead) \
+ (Console)->TermIFace.Vtbl->ReadStream(&(Console)->TermIFace, /**/
(Unicode), /**/ \
+ (Buffer), (ReadControl), (Parameter),
(NumCharsToRead), (NumCharsRead))
#define TermWriteStream(Console, ScreenBuffer, Buffer, Length, Attrib) \
(Console)->TermIFace.Vtbl->WriteStream(&(Console)->TermIFace,
(ScreenBuffer), (Buffer), \