264 Number = Number2 = Number3 = 1;
302 while ((*Sequence >=
L'0') && (*Sequence <=
L'9')) Sequence++;
378 while ((*Sequence >=
L'0') && (*Sequence <=
L'9')) Sequence++;
426 while ((*Sequence >=
L'0') && (*Sequence <=
L'9')) Sequence++;
452 if (Channel->CursorRow <
Number)
455 Channel->CursorRow = 0;
460 Channel->CursorRow -=
Number;
477 Channel->CursorRow +=
Number;
486 if (Channel->CursorCol <
Number)
489 Channel->CursorCol = 0;
494 Channel->CursorCol -=
Number;
511 Channel->CursorCol +=
Number;
520 Channel->CellFlags = 0;
532 Channel->CellFlags &= ~SAC_CELL_FLAG_BLINK;
542 Channel->CellFlags &= ~SAC_CELL_FLAG_BOLD;
552 Channel->CellFlags &= ~SAC_CELL_FLAG_INVERTED;
560 Screen->Cell[Channel->CursorRow][
i].CellFlags = Channel->CellFlags;
561 Screen->Cell[Channel->CursorRow][
i].CellBackColor = Channel->CellForeColor;
562 Screen->Cell[Channel->CursorRow][
i].CellForeColor = Channel->CellBackColor;
563 Screen->Cell[Channel->CursorRow][
i].Char =
L' ';
569 for (
i = 0;
i < (Channel->CursorCol + 1);
i++)
572 Screen->Cell[Channel->CursorRow][
i].CellFlags = Channel->CellFlags;
573 Screen->Cell[Channel->CursorRow][
i].CellBackColor = Channel->CellForeColor;
574 Screen->Cell[Channel->CursorRow][
i].CellForeColor = Channel->CellBackColor;
575 Screen->Cell[Channel->CursorRow][
i].Char =
L' ';
584 Screen->Cell[Channel->CursorRow][
i].CellFlags = Channel->CellFlags;
585 Screen->Cell[Channel->CursorRow][
i].CellBackColor = Channel->CellForeColor;
586 Screen->Cell[Channel->CursorRow][
i].CellForeColor = Channel->CellBackColor;
587 Screen->Cell[Channel->CursorRow][
i].Char =
L' ';
613 Channel->CellForeColor =
Number;
614 Channel->CellBackColor = Number2;
619 Channel->CellBackColor =
Number;
624 Channel->CellForeColor =
Number;
629 Channel->CellFlags =
Number;
630 Channel->CellForeColor = Number2;
631 Channel->CellBackColor = Number3;
652 Channel->CellFlags = 0;
707 if (Channel->OBuffer)
SacFreePool(Channel->OBuffer);
708 if (Channel->IBuffer)
SacFreePool(Channel->IBuffer);
730 ULONG Utf8ProcessedCount, Utf8Count,
R,
C, ForeColor, BackColor, Attribute;
770 Attribute = Channel->CellFlags;
775 ForeColor = Channel->CellForeColor;
776 BackColor = Channel->CellBackColor;
777 Color[1] = BackColor;
778 Color[0] = ForeColor;
792 if ((
Screen->Cell[
R][
C].CellBackColor != BackColor) ||
793 (
Screen->Cell[
R][
C].CellForeColor != ForeColor))
810 ForeColor =
Screen->Cell[
R][
C].CellForeColor;
811 BackColor =
Screen->Cell[
R][
C].CellBackColor;
814 Color[1] = BackColor;
815 Color[0] = ForeColor;
824 if (
Screen->Cell[
R][
C].CellFlags != Attribute)
841 Attribute =
Screen->Cell[
R][
C].CellFlags;
861 *TmpBuffer =
Screen->Cell[
R][
C].Char;
870 &Utf8ProcessedCount))
904 Color[1] = Channel->CellBackColor;
905 Color[0] = Channel->CellForeColor;
973 Channel->CursorCol = 0;
980 Channel->CursorRow++;
1004 Channel->CursorRow--;
1014 for (
C = (4 - Channel->CursorCol % 4);
C;
C--)
1018 Screen->Cell[Channel->CursorRow][Channel->CursorCol].CellFlags = Channel->CellFlags;
1019 Screen->Cell[Channel->CursorRow][Channel->CursorCol].CellBackColor = Channel->CellBackColor;
1020 Screen->Cell[Channel->CursorRow][Channel->CursorCol].CellForeColor = Channel->CellForeColor;
1021 Screen->Cell[Channel->CursorRow][Channel->CursorCol].Char =
L' ';
1024 Channel->CursorCol++;
1040 if (Channel->CursorCol) Channel->CursorCol--;
1048 if (*pwch <
L' ')
continue;
1052 Screen->Cell[Channel->CursorRow][Channel->CursorCol].CellFlags = Channel->CellFlags;
1053 Screen->Cell[Channel->CursorRow][Channel->CursorCol].CellBackColor = Channel->CellBackColor;
1054 Screen->Cell[Channel->CursorRow][Channel->CursorCol].CellForeColor = Channel->CellForeColor;
1055 Screen->Cell[Channel->CursorRow][Channel->CursorCol].Char = *pwch;
1058 Channel->CursorCol++;
1083 ULONG i,
k, TranslatedCount, UTF8TranslationSize;
1103 &UTF8TranslationSize,
1116 UTF8TranslationSize);
1128 for (
i = 0;
i <
k;
i++)
1135 &UTF8TranslationSize,
1138 ASSERT(UTF8TranslationSize > 0);
1152 UTF8TranslationSize);
1201 ASSERT((Channel->IBufferIndex %
sizeof(
WCHAR)) == 0);
1205 return Channel->IBufferIndex;
1215 ASSERT((Channel->IBufferIndex %
sizeof(
WCHAR)) == 0);
1219 Channel->IBufferIndex = BufferIndex;
1223 if (!(Channel->IBufferIndex) &&
1248 if (Channel->ChannelInputBufferLength(Channel) == 0)
1262 ASSERT(CopyChars <= Channel->ChannelInputBufferLength(Channel));
1272 if (Channel->ChannelInputBufferLength(Channel))
1277 Channel->ChannelInputBufferLength(Channel) *
1320 if (Channel->ChannelInputBufferLength(Channel))
1329 LastChar = *LastCharLocation;
ACPI_SIZE strlen(const char *String)
NTSTATUS NTAPI ChannelDestroy(IN PSAC_CHANNEL Channel)
BOOLEAN NTAPI ConMgrIsWriteEnabled(IN PSAC_CHANNEL Channel)
NTSTATUS NTAPI ConMgrWriteData(IN PSAC_CHANNEL Channel, IN PVOID Buffer, IN ULONG BufferLength)
NTSTATUS NTAPI ConMgrFlushData(IN PSAC_CHANNEL Channel)
#define NT_SUCCESS(StatCode)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
long __cdecl _InterlockedExchange(_Interlocked_operand_ long volatile *_Target, long _Value)
#define sprintf(buf, format,...)
#define UNREFERENCED_PARAMETER(P)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
#define STATUS_INVALID_BUFFER_SIZE
#define STATUS_NOT_IMPLEMENTED
#define CHECK_PARAMETER2(x)
#define VT_ANSI_CURSOR_LEFT
#define SacAllocatePool(Length, Tag)
#define VT_ANSI_ERASE_LINE_CHAR
ULONG Utf8ConversionBufferSize
#define VT_ANSI_CURSOR_LEFT_CHAR
#define VT_ANSI_ERASE_START_LINE
#define VT_ANSI_CURSOR_RIGHT_CHAR
#define VT_ANSI_CURSOR_RIGHT
#define VT_ANSI_CURSOR_UP_CHAR
#define CHECK_PARAMETER1(x)
#define CHECK_PARAMETER_WITH_STATUS(Condition, Status)
#define VT_ANSI_ERASE_UP_SCREEN
BOOLEAN NTAPI SacTranslateUtf8ToUnicode(IN CHAR Utf8Char, IN PCHAR Utf8Buffer, OUT PWCHAR Utf8Value)
#define SAC_CELL_FLAG_INVERTED
#define SAC_CELL_FLAG_BOLD
BOOLEAN NTAPI SacTranslateUnicodeToUtf8(IN PWCHAR SourceBuffer, IN ULONG SourceBufferLength, OUT PCHAR DestinationBuffer, IN ULONG DestinationBufferSize, OUT PULONG UTF8Count, OUT PULONG ProcessedCount)
#define VT_ANSI_CURSOR_DOWN_CHAR
#define VT_ANSI_CUP_CURSOR_CHAR
#define VT_ANSI_SET_ATTRIBUTE_CHAR
#define VT_ANSI_HVP_CURSOR_CHAR
#define CHECK_ALLOCATION(x)
#define SAC_VTUTF8_OBUFFER_SIZE
#define ChannelSetEvent(Channel, x)
#define ChannelClearEvent(Channel, x)
#define VT_ANSI_ERASE_ENTIRE_SCREEN
FORCEINLINE BOOLEAN ChannelHasNewIBufferData(IN PSAC_CHANNEL Channel)
PCHAR Utf8ConversionBuffer
#define MAX_UTF8_ENCODE_BLOCK_LENGTH
#define VT_ANSI_CURSOR_DOWN
#define VT_ANSI_SCROLL_CHAR
#define VT_ANSI_ERASE_ENTIRE_LINE
#define VT_ANSI_CURSOR_UP
@ SacSetColorsAndAttributes
#define CHECK_PARAMETER(x)
#define VT_ANSI_ERASE_DOWN_SCREEN
struct _SAC_VTUTF8_SCREEN * PSAC_VTUTF8_SCREEN
#define VT_ANSI_SEPARATOR_CHAR
#define VT_ANSI_ERASE_END_LINE
enum _SAC_ANSI_DISPATCH SAC_ANSI_DISPATCH
@ SacAnsiClearBlinkAttribute
@ SacAnsiSetInverseAttribute
@ SacAnsiSetBoldAttribute
@ SacAnsiClearInverseAttribute
@ SacAnsiClearBoldAttribute
@ SacAnsiSetBlinkAttribute
@ SacAnsiClearEndOfScreen
#define SAC_CELL_FLAG_BLINK
#define SAC_CHANNEL_FLAG_HAS_NEW_DATA_EVENT
#define SAC_VTUTF8_ROW_HEIGHT
#define SAC_VTUTF8_COL_WIDTH
#define SacFreePool(Pointer)
#define SAC_VTUTF8_IBUFFER_SIZE
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
_In_ DWORD _In_ DWORD ReturnBufferSize
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
WCHAR IncomingUnicodeValue
FORCEINLINE VOID VTUTF8ChannelAssertCursor(IN PSAC_CHANNEL Channel)
NTSTATUS NTAPI VTUTF8ChannelOFlush(IN PSAC_CHANNEL Channel)
NTSTATUS NTAPI VTUTF8ChannelOWrite2(IN PSAC_CHANNEL Channel, IN PWCHAR String, IN ULONG Size)
CHAR IncomingUtf8ConversionBuffer[4]
ULONG NTAPI VTUTF8ChannelGetIBufferIndex(IN PSAC_CHANNEL Channel)
BOOLEAN NTAPI VTUTF8ChannelScanForNumber(IN PWCHAR String, OUT PULONG Number)
NTSTATUS NTAPI VTUTF8ChannelOEcho(IN PSAC_CHANNEL Channel, IN PCHAR String, IN ULONG Size)
NTSTATUS NTAPI VTUTF8ChannelOInit(IN PSAC_CHANNEL Channel)
VOID NTAPI VTUTF8ChannelSetIBufferIndex(IN PSAC_CHANNEL Channel, IN ULONG BufferIndex)
NTSTATUS NTAPI VTUTF8ChannelIWrite(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize)
NTSTATUS NTAPI VTUTF8ChannelORead(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize, OUT PULONG ByteCount)
NTSTATUS NTAPI VTUTF8ChannelCreate(IN PSAC_CHANNEL Channel)
NTSTATUS NTAPI VTUTF8ChannelIBufferIsFull(IN PSAC_CHANNEL Channel, OUT PBOOLEAN BufferStatus)
ULONG NTAPI VTUTF8ChannelIBufferLength(IN PSAC_CHANNEL Channel)
NTSTATUS NTAPI VTUTF8ChannelProcessAttributes(IN PSAC_CHANNEL Channel, IN UCHAR Attribute)
SAC_STATIC_ESCAPE_STRING SacStaticEscapeStrings[]
ULONG NTAPI VTUTF8ChannelConsumeEscapeSequence(IN PSAC_CHANNEL Channel, IN PWCHAR String)
NTSTATUS NTAPI VTUTF8ChannelOWrite(IN PSAC_CHANNEL Channel, IN PCHAR String, IN ULONG Length)
NTSTATUS NTAPI VTUTF8ChannelAnsiDispatch(IN PSAC_CHANNEL Channel, IN SAC_ANSI_DISPATCH AnsiCode, IN INT *Data, IN ULONG Length)
NTSTATUS NTAPI VTUTF8ChannelIRead(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize, IN PULONG ReturnBufferSize)
WCHAR NTAPI VTUTF8ChannelIReadLast(IN PSAC_CHANNEL Channel)
NTSTATUS NTAPI VTUTF8ChannelDestroy(IN PSAC_CHANNEL Channel)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount