mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[CONSRV]: Use an optional parameter for passing things to the "line discipline" functions.
svn path=/branches/condrv_restructure/; revision=65640
This commit is contained in:
parent
f6b392dd4c
commit
f995f5fef8
6 changed files with 18 additions and 17 deletions
|
@ -238,10 +238,10 @@ ConDrvDeinitInputBuffer(IN PCONSOLE Console)
|
|||
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 @@ ConDrvReadConsole(IN PCONSOLE Console,
|
|||
|
||||
/* Call the line-discipline */
|
||||
return TermReadStream(Console,
|
||||
ExeName,
|
||||
Unicode,
|
||||
Buffer,
|
||||
ReadControl,
|
||||
Parameter,
|
||||
NumCharsToRead,
|
||||
NumCharsRead);
|
||||
}
|
||||
|
|
|
@ -31,11 +31,11 @@ DummyDeinitTerminal(IN OUT PTERMINAL This)
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -302,10 +302,10 @@ Quit:
|
|||
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 @@ ReadChars(IN PGET_INPUT_INFO InputInfo,
|
|||
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 @@ ReadChars(IN PGET_INPUT_INFO InputInfo,
|
|||
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",
|
||||
|
|
|
@ -296,17 +296,18 @@ ConSrvTermDeinitTerminal(IN OUT PTERMINAL This)
|
|||
|
||||
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;
|
||||
|
|
|
@ -217,13 +217,13 @@ typedef struct _TERMINAL_VTBL
|
|||
/* 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,
|
||||
|
|
|
@ -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), \
|
||||
|
|
Loading…
Reference in a new issue