Author: ion
Date: Mon Aug 26 10:40:31 2013
New Revision: 59831
URL: http://svn.reactos.org/svn/reactos?rev=59831&view=rev
Log:
[SACDRV]: SAC expects its memory allocations to be zeroed out.
[SACMSG]: Re-commit the .mc file with CRLF endings, this is essential for correct output.
[SACDRV]: Fix bug in VTUTF8ChannelAnsiDispatch (freeing stack memory with pool API).
[SACDRV]: Fix the way in which the cell buffer was being computed. This way works (tm) and is also much easier to read.
[SACDRV]: Fix bug in VTUTF8ChannelIRead (incorrect char vs byte sizing).
VT-UTF8 output and input works now in the !SAC channel. There's still some lurking bugs, however, such as when hitting the 24th row (probably an off-by-one memcpy).
Modified:
trunk/reactos/drivers/sac/driver/memory.c
trunk/reactos/drivers/sac/driver/sacdrv.h
trunk/reactos/drivers/sac/driver/vtutf8chan.c
trunk/reactos/include/reactos/mc/sacmsg.mc
Modified: trunk/reactos/drivers/sac/driver/memory.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/memory.…
==============================================================================
--- trunk/reactos/drivers/sac/driver/memory.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/sac/driver/memory.c [iso-8859-1] Mon Aug 26 10:40:31 2013
@@ -94,7 +94,8 @@
IN ULONG Line)
{
PVOID p;
- p = ExAllocatePoolWithTag(NonPagedPool, PoolSize, Tag);
+ p = ExAllocatePoolWithTag(NonPagedPool, PoolSize, 'HACK');
+ RtlZeroMemory(p, PoolSize);
SAC_DBG(SAC_DBG_MM, "Returning block 0x%X.\n", p);
return p;
#if 0
@@ -342,7 +343,7 @@
/* Release the lock, delete the address, and return */
KeReleaseSpinLock(&MemoryLock, OldIrql);
#endif
- ExFreePool(*Block);
+ SAC_DBG(SAC_DBG_MM, "exiting: 0x%p.\n", *Block);
+ ExFreePoolWithTag(*Block, 'HACK');
*Block = NULL;
- SAC_DBG(SAC_DBG_MM, "exiting.\n");
}
Modified: trunk/reactos/drivers/sac/driver/sacdrv.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/sacdrv.…
==============================================================================
--- trunk/reactos/drivers/sac/driver/sacdrv.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/sac/driver/sacdrv.h [iso-8859-1] Mon Aug 26 10:40:31 2013
@@ -311,6 +311,14 @@
C_ASSERT(sizeof(SAC_CURSOR_DATA) == 6);
//
+// Screen buffer when in VT-UTF8 Mode
+//
+typedef struct _SAC_VTUTF8_SCREEN
+{
+ SAC_CURSOR_DATA Cell[SAC_VTUTF8_ROW_HEIGHT][SAC_VTUTF8_COL_WIDTH];
+} SAC_VTUTF8_SCREEN, *PSAC_VTUTF8_SCREEN;
+
+//
// Small optimization to easily recognize the most common VT-100/ANSI codes
//
typedef struct _SAC_STATIC_ESCAPE_STRING
Modified: trunk/reactos/drivers/sac/driver/vtutf8chan.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/vtutf8c…
==============================================================================
--- trunk/reactos/drivers/sac/driver/vtutf8chan.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/sac/driver/vtutf8chan.c [iso-8859-1] Mon Aug 26 10:40:31 2013
@@ -71,7 +71,7 @@
IN ULONG Length)
{
NTSTATUS Status = STATUS_SUCCESS;
- PCHAR LocalBuffer = NULL;
+ PCHAR LocalBuffer = NULL, Tmp;
INT l;
CHECK_PARAMETER1(Channel);
@@ -80,17 +80,17 @@
{
/* Send the [2J (Clear Screen and Reset Cursor) */
case SacAnsiClearScreen:
- LocalBuffer = "\x1B[2J";
+ Tmp = "\x1B[2J";
break;
/* Send the [0J (Clear From Position Till End Of Screen) */
case SacAnsiClearEndOfScreen:
- LocalBuffer = "\x1B[0J";
+ Tmp = "\x1B[0J";
break;
/* Send the [0K (Clear from Position Till End Of Line) */
case SacAnsiClearEndOfLine:
- LocalBuffer = "\x1B[0K";
+ Tmp = "\x1B[0K";
break;
/* Send a combination of two [#m attribute changes */
@@ -111,6 +111,7 @@
l = sprintf(LocalBuffer, "\x1B[%dm\x1B[%dm", Data[1], Data[0]);
ASSERT((l + 1)*sizeof(UCHAR) < SAC_VTUTF8_COL_WIDTH);
ASSERT(LocalBuffer);
+ Tmp = LocalBuffer;
break;
/* Send the [#;#H (Cursor Positio) sequence */
@@ -131,41 +132,42 @@
l = sprintf(LocalBuffer, "\x1B[%d;%dH", Data[1] + 1, Data[0] + 1);
ASSERT((l + 1)*sizeof(UCHAR) < SAC_VTUTF8_COL_WIDTH);
ASSERT(LocalBuffer);
+ Tmp = LocalBuffer;
break;
/* Send the [0m sequence (Set Attribute 0) */
case SacAnsiClearAttributes:
- LocalBuffer = "\x1B[0m";
+ Tmp = "\x1B[0m";
break;
/* Send the [7m sequence (Set Attribute 7) */
case SacAnsiSetInverseAttribute:
- LocalBuffer = "\x1B[7m";
+ Tmp = "\x1B[7m";
break;
/* Send the [27m sequence (Set Attribute 27) */
case SacAnsiClearInverseAttribute:
- LocalBuffer = "\x1B[27m";
+ Tmp = "\x1B[27m";
break;
/* Send the [5m sequence (Set Attribute 5) */
case SacAnsiSetBlinkAttribute:
- LocalBuffer = "\x1B[5m";
+ Tmp = "\x1B[5m";
break;
/* Send the [25m sequence (Set Attribute 25) */
case SacAnsiClearBlinkAttribute:
- LocalBuffer = "\x1B[25m";
+ Tmp = "\x1B[25m";
break;
/* Send the [1m sequence (Set Attribute 1) */
case SacAnsiSetBoldAttribute:
- LocalBuffer = "\x1B[1m";
+ Tmp = "\x1B[1m";
break;
/* Send the [22m sequence (Set Attribute 22) */
case SacAnsiClearBoldAttribute:
- LocalBuffer = "\x1B[22m";
+ Tmp = "\x1B[22m";
break;
/* We don't recognize it */
@@ -178,7 +180,7 @@
if (NT_SUCCESS(Status))
{
/* Go write out the sequence */
- Status = ConMgrWriteData(Channel, LocalBuffer, strlen(LocalBuffer));
+ Status = ConMgrWriteData(Channel, Tmp, strlen(Tmp));
if (NT_SUCCESS(Status))
{
/* Now flush it */
@@ -242,7 +244,7 @@
{
ULONG Number, Number2, Number3, i, Action, Result;
PWCHAR Sequence;
- PSAC_CURSOR_DATA Cursor;
+ PSAC_VTUTF8_SCREEN Cursor;
ASSERT(String[0] == VT_ANSI_ESCAPE);
/* Microsoft's driver does this after the O(n) check below. Be smarter. */
@@ -439,7 +441,7 @@
if (!Result) Result = Sequence - String + 1;
/* Get the current cell buffer */
- Cursor = (PSAC_CURSOR_DATA)Channel->OBuffer;
+ Cursor = (PSAC_VTUTF8_SCREEN)Channel->OBuffer;
VTUTF8ChannelAssertCursor(Channel);
/* Handle all the supported SAC ANSI commands */
@@ -555,14 +557,10 @@
for (i = Channel->CursorCol; i < SAC_VTUTF8_COL_WIDTH; i++)
{
/* Replace everything after the current position with blanks */
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorFlags = Channel->CursorFlags;
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorBackColor = Channel->CursorColor;
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorColor = Channel->CursorBackColor;
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorValue = ' ';
+ Cursor->Cell[Channel->CursorRow][i].CursorFlags = Channel->CursorFlags;
+ Cursor->Cell[Channel->CursorRow][i].CursorBackColor = Channel->CursorColor;
+ Cursor->Cell[Channel->CursorRow][i].CursorColor = Channel->CursorBackColor;
+ Cursor->Cell[Channel->CursorRow][i].CursorValue = ' ';
}
break;
@@ -571,14 +569,10 @@
for (i = 0; i < (Channel->CursorCol + 1); i++)
{
/* Replace everything after the current position with blanks */
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorFlags = Channel->CursorFlags;
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorBackColor = Channel->CursorColor;
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorColor = Channel->CursorBackColor;
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorValue = ' ';
+ Cursor->Cell[Channel->CursorRow][i].CursorFlags = Channel->CursorFlags;
+ Cursor->Cell[Channel->CursorRow][i].CursorBackColor = Channel->CursorColor;
+ Cursor->Cell[Channel->CursorRow][i].CursorColor = Channel->CursorBackColor;
+ Cursor->Cell[Channel->CursorRow][i].CursorValue = ' ';
}
break;
@@ -587,14 +581,10 @@
for (i = 0; i < SAC_VTUTF8_COL_WIDTH; i++)
{
/* Replace them all with blanks */
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorFlags = Channel->CursorFlags;
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorBackColor = Channel->CursorColor;
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorColor = Channel->CursorBackColor;
- Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
- (i * SAC_VTUTF8_ROW_HEIGHT)].CursorValue = ' ';
+ Cursor->Cell[Channel->CursorRow][i].CursorFlags = Channel->CursorFlags;
+ Cursor->Cell[Channel->CursorRow][i].CursorBackColor = Channel->CursorColor;
+ Cursor->Cell[Channel->CursorRow][i].CursorColor = Channel->CursorBackColor;
+ Cursor->Cell[Channel->CursorRow][i].CursorValue = ' ';
}
break;
@@ -738,7 +728,7 @@
VTUTF8ChannelOFlush(IN PSAC_CHANNEL Channel)
{
NTSTATUS Status;
- PSAC_CURSOR_DATA Cursor;
+ PSAC_VTUTF8_SCREEN Cursor;
INT Color[2], Position[2];
ULONG Utf8ProcessedCount, Utf8Count, R, C, ForeColor, BackColor, Attribute;
PWCHAR TmpBuffer;
@@ -746,7 +736,7 @@
CHECK_PARAMETER(Channel);
/* Set the cell buffer position */
- Cursor = (PSAC_CURSOR_DATA)Channel->OBuffer;
+ Cursor = (PSAC_VTUTF8_SCREEN)Channel->OBuffer;
/* Allocate a temporary buffer */
TmpBuffer = SacAllocatePool(40, GLOBAL_BLOCK_TAG);
@@ -802,10 +792,8 @@
for (C = 0; C < SAC_VTUTF8_COL_WIDTH; C++)
{
/* Check if there's been a change in colors */
- if ((Cursor[(R * SAC_VTUTF8_COL_WIDTH) +
- (C * SAC_VTUTF8_ROW_HEIGHT)].CursorBackColor != BackColor) ||
- (Cursor[(R * SAC_VTUTF8_COL_WIDTH) +
- (C * SAC_VTUTF8_ROW_HEIGHT)].CursorColor != ForeColor))
+ if ((Cursor->Cell[R][C].CursorBackColor != BackColor) ||
+ (Cursor->Cell[R][C].CursorColor != ForeColor))
{
/* New colors are being drawn -- are we also on a new row now? */
if (Overflow)
@@ -822,10 +810,8 @@
}
/* Cache the new colors */
- ForeColor = Cursor[(R * SAC_VTUTF8_COL_WIDTH) +
- (C * SAC_VTUTF8_ROW_HEIGHT)].CursorColor;
- BackColor = Cursor[(R * SAC_VTUTF8_COL_WIDTH) +
- (C * SAC_VTUTF8_ROW_HEIGHT)].CursorBackColor;
+ ForeColor = Cursor->Cell[R][C].CursorColor;
+ BackColor = Cursor->Cell[R][C].CursorBackColor;
/* Set them on the screen */
Color[1] = BackColor;
@@ -837,8 +823,8 @@
if (!NT_SUCCESS(Status)) goto Quickie;
}
- /* Check if there's been a chance in attributes */
- if (Cursor->CursorFlags != Attribute)
+ /* Check if there's been a change in attributes */
+ if (Cursor->Cell[R][C].CursorFlags != Attribute)
{
/* Yep! Are we also on a new row now? */
if (Overflow)
@@ -855,7 +841,7 @@
}
/* Set the new attributes on screen */
- Attribute = Cursor->CursorFlags;
+ Attribute = Cursor->Cell[R][C].CursorFlags;
Status = VTUTF8ChannelProcessAttributes(Channel, Attribute);
if (!NT_SUCCESS(Status)) goto Quickie;
}
@@ -867,16 +853,15 @@
Position[1] = R;
Position[0] = C;
Status = VTUTF8ChannelAnsiDispatch(Channel,
- SacAnsiSetPosition,
- Position,
- sizeof(Position));
+ SacAnsiSetPosition,
+ Position,
+ sizeof(Position));
if (!NT_SUCCESS(Status)) goto Quickie;
Overflow = FALSE;
}
/* Write the character into our temporary buffer */
- *TmpBuffer = Cursor[(R * SAC_VTUTF8_COL_WIDTH) +
- (C * SAC_VTUTF8_ROW_HEIGHT)].CursorValue;
+ *TmpBuffer = Cursor->Cell[R][C].CursorValue;
TmpBuffer[1] = UNICODE_NULL;
/* Convert it to UTF-8 */
@@ -896,6 +881,7 @@
if (Utf8Count)
{
/* Write it out on the wire */
+ SAC_DBG(1, "Row: %d\tCol : %d\t\tValue : (%c) -> (%c)\n", R, C, *TmpBuffer, *Utf8ConversionBuffer);
Status = ConMgrWriteData(Channel, Utf8ConversionBuffer, Utf8Count);
if (!NT_SUCCESS(Status)) goto Quickie;
}
@@ -947,10 +933,10 @@
NTSTATUS
NTAPI
VTUTF8ChannelOWrite2(IN PSAC_CHANNEL Channel,
- IN PCHAR String,
+ IN PWCHAR String,
IN ULONG Size)
{
- PSAC_CURSOR_DATA Cursor;
+ PSAC_VTUTF8_SCREEN Cursor;
ULONG i, EscapeSize, R, C;
PWSTR pwch;
CHECK_PARAMETER1(Channel);
@@ -958,11 +944,12 @@
VTUTF8ChannelAssertCursor(Channel);
/* Loop every character */
- Cursor = (PSAC_CURSOR_DATA)Channel->OBuffer;
+ Cursor = (PSAC_VTUTF8_SCREEN) Channel->OBuffer;
for (i = 0; i < Size; i++)
{
/* Check what the character is */
- pwch = (PWSTR)&String[i];
+ pwch = &String[i];
+ SAC_DBG(1, "Writing on VT-UTF8: (%lx)\n", *pwch);
switch (*pwch)
{
/* It's an escape sequence... */
@@ -1010,17 +997,13 @@
for (C = 0; C < SAC_VTUTF8_COL_WIDTH; C++)
{
/* And replace it with one from the row below */
- Cursor[(R * SAC_VTUTF8_COL_WIDTH) +
- (C * SAC_VTUTF8_ROW_HEIGHT)] =
- Cursor[((R + 1)* SAC_VTUTF8_COL_WIDTH) +
- (C * SAC_VTUTF8_ROW_HEIGHT)];
+ Cursor->Cell[R][C] = Cursor->Cell[R + 1][C];
}
}
/* Now we're left with the before-last row, zero it out */
ASSERT(R == (SAC_VTUTF8_ROW_HEIGHT - 1));
- RtlZeroMemory(&Cursor[SAC_VTUTF8_COL_WIDTH * R],
- sizeof(SAC_CURSOR_DATA) * SAC_VTUTF8_COL_WIDTH);
+ RtlZeroMemory(&Cursor[R], sizeof(Cursor[R]));
/* Reset the row back by one */
Channel->CursorRow--;
@@ -1037,14 +1020,10 @@
{
/* Fill each remaining character with a space */
VTUTF8ChannelAssertCursor(Channel);
- Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
- (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorFlags = Channel->CursorFlags;
- Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
- (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorBackColor = Channel->CursorBackColor;
- Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
- (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorColor = Channel->CursorColor;
- Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
- (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorValue = ' ';
+ Cursor->Cell[Channel->CursorRow][Channel->CursorCol].CursorFlags = Channel->CursorFlags;
+ Cursor->Cell[Channel->CursorRow][Channel->CursorCol].CursorBackColor = Channel->CursorBackColor;
+ Cursor->Cell[Channel->CursorRow][Channel->CursorCol].CursorColor = Channel->CursorColor;
+ Cursor->Cell[Channel->CursorRow][Channel->CursorCol].CursorValue = ' ';
/* Move to the next character position, but don't overflow */
Channel->CursorCol++;
@@ -1075,14 +1054,10 @@
/* Otherwise, print it out with the current attributes */
VTUTF8ChannelAssertCursor(Channel);
- Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
- (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorFlags = Channel->CursorFlags;
- Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
- (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorBackColor = Channel->CursorBackColor;
- Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
- (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorColor = Channel->CursorColor;
- Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
- (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorValue = *pwch;
+ Cursor->Cell[Channel->CursorRow][Channel->CursorCol].CursorFlags = Channel->CursorFlags;
+ Cursor->Cell[Channel->CursorRow][Channel->CursorCol].CursorBackColor = Channel->CursorBackColor;
+ Cursor->Cell[Channel->CursorRow][Channel->CursorCol].CursorColor = Channel->CursorColor;
+ Cursor->Cell[Channel->CursorRow][Channel->CursorCol].CursorValue = *pwch;
/* Move forward one character, but make sure not to overflow */
Channel->CursorCol++;
@@ -1203,7 +1178,8 @@
CHECK_PARAMETER2(String);
/* Call the lower level function */
- Status = VTUTF8ChannelOWrite2(Channel, String, Length / sizeof(WCHAR));
+ SAC_DBG(1, "Writing on VT-UTF8: %S\n", String);
+ Status = VTUTF8ChannelOWrite2(Channel, (PWCHAR)String, Length / sizeof(WCHAR));
if (NT_SUCCESS(Status))
{
/* Is the channel enabled for output? */
@@ -1266,7 +1242,7 @@
IN ULONG BufferSize,
IN PULONG ReturnBufferSize)
{
- ULONG CopyChars;
+ ULONG CopyChars, ReadLength;
CHECK_PARAMETER1(Channel);
CHECK_PARAMETER2(Buffer);
CHECK_PARAMETER_WITH_STATUS(BufferSize > 0, STATUS_INVALID_BUFFER_SIZE);
@@ -1283,29 +1259,33 @@
else
{
/* Use the smallest number of bytes either in the buffer or requested */
- CopyChars = min(Channel->ChannelInputBufferLength(Channel) * sizeof(WCHAR),
- BufferSize);
+ ReadLength = min(Channel->ChannelInputBufferLength(Channel) * sizeof(WCHAR),
+ BufferSize);
+
+ /* Do some cheezy buffer alignment */
+ CopyChars = ReadLength / sizeof(WCHAR);
+ ReadLength = CopyChars * sizeof(WCHAR);
ASSERT(CopyChars <= Channel->ChannelInputBufferLength(Channel));
/* Copy them into the caller's buffer */
- RtlCopyMemory(Buffer, Channel->IBuffer, CopyChars);
+ RtlCopyMemory(Buffer, Channel->IBuffer, ReadLength);
/* Update the channel's index past the copied (read) bytes */
VTUTF8ChannelSetIBufferIndex(Channel,
- VTUTF8ChannelGetIBufferIndex(Channel) - CopyChars);
+ VTUTF8ChannelGetIBufferIndex(Channel) - ReadLength);
/* Are there still bytes that haven't been read yet? */
if (Channel->ChannelInputBufferLength(Channel))
{
/* Shift them up in the buffer */
RtlMoveMemory(Channel->IBuffer,
- &Channel->IBuffer[CopyChars],
+ &Channel->IBuffer[ReadLength],
Channel->ChannelInputBufferLength(Channel) *
sizeof(WCHAR));
}
/* Return the number of bytes we actually copied */
- *ReturnBufferSize = CopyChars;
+ *ReturnBufferSize = ReadLength;
}
/* Return success */
Modified: trunk/reactos/include/reactos/mc/sacmsg.mc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/mc/sacmsg.…
==============================================================================
--- trunk/reactos/include/reactos/mc/sacmsg.mc [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/mc/sacmsg.mc [iso-8859-1] Mon Aug 26 10:40:31 2013
@@ -1,760 +1,760 @@
-MessageId=1
-SymbolicName=SAC_INIT_STATUS
-Language=English
-
-Computer is booting, SAC started and initialized.
-
-Use the "ch -?" command for information about using channels.
-Use the "?" command for general help.
-
-.
-
-MessageId=2
-SymbolicName=SAC_NEWLINE
-Language=English
-
-.
-
-MessageId=3
-SymbolicName=SAC_PROMPT
-Language=English
-SAC>%0
-.
-
-MessageId=4
-SymbolicName=SACDRV_4
-Language=English
-The SAC is unavailable, it was directly unloaded.
-.
-
-MessageId=5
-SymbolicName=SACDRV_5
-Language=English
-The SAC will become unavailable soon. The computer is shutting down.
-
-.
-
-MessageId=6
-SymbolicName=SACDRV_6
-Language=English
-A parameter was incorrect or missing. Try the 'help' command for more details.
-.
-
-MessageId=7
-SymbolicName=SACDRV_7
-Language=English
-Thread information is now ON.
-.
-
-MessageId=8
-SymbolicName=SACDRV_8
-Language=English
-Thread information is now OFF.
-.
-
-MessageId=9
-SymbolicName=SACDRV_9
-Language=English
-Paging is now ON.
-.
-
-MessageId=10
-SymbolicName=SACDRV_10
-Language=English
-Paging is now OFF.
-.
-
-MessageId=11
-SymbolicName=SAC_OUT_OF_MEMORY_PROMPT
-Language=English
-THIS LOOKS LIKE A BUG???
-.
-
-MessageId=12
-SymbolicName=SACDRV_12
-Language=English
-d Dump the current kernel log.
-.
-
-MessageId=13
-SymbolicName=SACDRV_13
-Language=English
-f Toggle detailed or abbreviated tlist info.
-.
-
-MessageId=14
-SymbolicName=SACDRV_14
-Language=English
-? or help Display this list.
-.
-
-MessageId=15
-SymbolicName=SACDRV_15
-Language=English
-i List all IP network numbers and their IP addresses.
-.
-
-MessageId=16
-SymbolicName=SACDRV_16
-Language=English
-i <#> <ip> <subnet> <gateway> Set IP addr., subnet and gateway.
-.
-
-MessageId=18
-SymbolicName=SACDRV_18
-Language=English
-k <pid> Kill the given process.
-.
-
-MessageId=19
-SymbolicName=SACDRV_19
-Language=English
-l <pid> Lower the priority of a process to the lowest possible.
-.
-
-MessageId=20
-SymbolicName=SACDRV_20
-Language=English
-m <pid> <MB-allow> Limit the memory usage of a process to <MB-allow>.
-.
-
-MessageId=21
-SymbolicName=SACDRV_21
-Language=English
-p Toggle paging the display.
-.
-
-MessageId=22
-SymbolicName=SACDRV_22
-Language=English
-r <pid> Raise the priority of a process by one.
-.
-
-MessageId=23
-SymbolicName=SACDRV_23
-Language=English
-s Display the current time and date (24 hour clock used).
-.
-
-MessageId=24
-SymbolicName=SACDRV_24
-Language=English
-s mm/dd/yyyy hh:mm Set the current time and date (24 hour clock used).
-.
-
-MessageId=25
-SymbolicName=SACDRV_25
-Language=English
-t Tlist.
-.
-
-MessageId=27
-SymbolicName=SACDRV_27
-Language=English
-restart Restart the system immediately.
-.
-
-MessageId=28
-SymbolicName=SACDRV_28
-Language=English
-shutdown Shutdown the system immediately.
-.
-
-MessageId=29
-SymbolicName=SACDRV_29
-Language=English
-crashdump Crash the system. You must have crash dump enabled.
-.
-
-MessageId=31
-SymbolicName=SACDRV_31
-Language=English
-id Display the computer identification information.
-.
-
-MessageId=32
-SymbolicName=SACDRV_32
-Language=English
-lock Lock access to Command Prompt channels.
-.
-
-MessageId=48
-SymbolicName=SAC_FAIL_PROMPT
-Language=English
-Failed with status 0x%%X.
-.
-
-MessageId=49
-SymbolicName=SACDRV_49
-Language=English
-Date: %%02d/%%02d/%%02d Time (GMT): %%02d:%%02d:%%02d:%%04d
-.
-
-MessageId=50
-SymbolicName=SACDRV_50
-Language=English
-SAC could not retrieve the IP Address.
-.
-
-MessageId=51
-SymbolicName=SACDRV_51
-Language=English
-SAC could not clear the existing IP Address.
-.
-
-MessageId=52
-SymbolicName=SACDRV_52
-Language=English
-SAC could not set the IP Address.
-.
-
-MessageId=54
-SymbolicName=SACDRV_54
-Language=English
-SAC successfully set the IP Address, subnet mask, and gateway.
-.
-
-MessageId=55
-SymbolicName=SACDRV_55
-Language=English
-SAC failed to terminate the process.
-.
-
-MessageId=56
-SymbolicName=SACDRV_56
-Language=English
-SAC successfully terminated the process.
-.
-
-MessageId=57
-SymbolicName=SACDRV_57
-Language=English
-SAC failed to lower the process priority.
-.
-
-MessageId=58
-SymbolicName=SACDRV_58
-Language=English
-SAC successfully lowered the process priority.
-.
-
-MessageId=59
-SymbolicName=SACDRV_59
-Language=English
-SAC failed to raise the process priority.
-.
-
-MessageId=60
-SymbolicName=SACDRV_60
-Language=English
-SAC successfully raised the process priority.
-.
-
-MessageId=61
-SymbolicName=SACDRV_61
-Language=English
-SAC failed to limit the available process memory.
-.
-
-MessageId=62
-SymbolicName=SACDRV_62
-Language=English
-SAC successfully limited the available process memory.
-.
-
-MessageId=63
-SymbolicName=SACDRV_63
-Language=English
-SAC cannot raise the priority of a process that was not previously lowered.
-.
-
-MessageId=64
-SymbolicName=SACDRV_64
-Language=English
-SAC cannot raise the process priority any higher.
-.
-
-MessageId=65
-SymbolicName=SAC_SHUTDOWN_FAIL_PROMPT
-Language=English
-SAC failed to shutdown the system.
-.
-
-MessageId=66
-SymbolicName=SAC_RESTART_FAIL_PROMPT
-Language=English
-SAC failed to restart the system.
-.
-
-MessageId=67
-SymbolicName=SACDRV_67
-Language=English
-SAC failed to crashdump the system.
-.
-
-MessageId=68
-SymbolicName=SACDRV_68
-Language=English
-SAC failed to retrieve the task list.
-.
-
-MessageId=69
-SymbolicName=SACDRV_69
-Language=English
-memory: %%4ld kb uptime:%%3ld %%2ld:%%02ld:%%02ld.%%03ld
-
-
-.
-
-MessageId=70
-SymbolicName=SACDRV_70
-Language=English
-No pagefile in use.
-.
-
-MessageId=71
-SymbolicName=SACDRV_71
-Language=English
-PageFile: %%wZ
-.
-
-MessageId=72
-SymbolicName=SACDRV_72
-Language=English
- Current Size: %%6ld kb Total Used: %%6ld kb Peak Used %%6ld kb
-.
-
-MessageId=73
-SymbolicName=SACDRV_73
-Language=English
-
- Memory:%%7ldK Avail:%%7ldK TotalWs:%%7ldK InRam Kernel:%%5ldK P:%%5ldK
-.
-
-MessageId=74
-SymbolicName=SACDRV_74
-Language=English
- Commit:%%7ldK/%%7ldK Limit:%%7ldK Peak:%%7ldK Pool N:%%5ldK P:%%5ldK
-.
-
-MessageId=75
-SymbolicName=SACDRV_75
-Language=English
- User Time Kernel Time Ws Faults Commit Pri Hnd Thd Pid Name
-.
-
-MessageId=76
-SymbolicName=SACDRV_76
-Language=English
- %%6ld %%8ld File Cache
-.
-
-MessageId=77
-SymbolicName=SACDRV_77
-Language=English
-%%3ld:%%02ld:%%02ld.%%03ld %%3ld:%%02ld:%%02ld.%%03ld%%6ld %%8ld %%7ld %%2ld %%4ld %%3ld %%4ld %%wZ
-.
-
-MessageId=78
-SymbolicName=SACDRV_78
-Language=English
-%%3ld:%%02ld:%%02ld.%%03ld %%3ld:%%02ld:%%02ld.%%03ld
-.
-
-MessageId=79
-SymbolicName=SACDRV_79
-Language=English
-pid:%%3lx pri:%%2ld Hnd:%%5ld Pf:%%7ld Ws:%%7ldK %%wZ
-.
-
-MessageId=80
-SymbolicName=SACDRV_80
-Language=English
- tid pri Ctx Swtch StrtAddr User Time Kernel Time State
-.
-
-MessageId=81
-SymbolicName=SACDRV_81
-Language=English
- %%3lx %%2ld %%9ld %%p %%2ld:%%02ld:%%02ld.%%03ld %%2ld:%%02ld:%%02ld.%%03ld %%s%%s
-.
-
-MessageId=82
-SymbolicName=SACDRV_82
-Language=English
-----Press <Enter> for more----
-.
-
-MessageId=83
-SymbolicName=SACDRV_83
-Language=English
-SAC is retrieving IP Addresses...
-.
-
-MessageId=84
-SymbolicName=SACDRV_84
-Language=English
-Could not retrieve IP Address(es).
-.
-
-MessageId=85
-SymbolicName=SACDRV_85
-Language=English
-There are no IP Addresses available.
-.
-
-MessageId=86
-SymbolicName=SACDRV_86
-Language=English
-Net: %%d, Ip=%%d.%%d.%%d.%%d Subnet=%%d.%%d.%%d.%%d Gateway=%%d.%%d.%%d.%%d
-.
-
-MessageId=87
-SymbolicName=SACDRV_87
-Language=English
-Date: %%02d/%%02d/%%02d Time (GMT): %%02d:%%02d
-.
-
-MessageId=88
-SymbolicName=SACDRV_88
-Language=English
-The year is restricted from 1980 to 2099.
-.
-
-MessageId=89
-SymbolicName=SACDRV_89
-Language=English
-That process has been killed and is being cleaned up by the system.
-.
-
-MessageId=90
-SymbolicName=SACDRV_90
-Language=English
-A duplicate process id is being cleaned up by the system. Try the
-command again in a few seconds.
-.
-
-MessageId=92
-SymbolicName=SACDRV_92
-Language=English
- Computer Name: %%ws
-.
-
-MessageId=93
-SymbolicName=SACDRV_93
-Language=English
- Computer GUID: %%ws
-.
-
-MessageId=94
-SymbolicName=SACDRV_94
-Language=English
- Processor Architecture: %%ws
-.
-
-MessageId=95
-SymbolicName=SACDRV_95
-Language=English
- Build Number: %%ws
-.
-
-MessageId=96
-SymbolicName=SACDRV_96
-Language=English
- Product: %%ws
-.
-
-MessageId=97
-SymbolicName=SACDRV_97
-Language=English
- Applied Service Pack: %%ws
-.
-
-MessageId=98
-SymbolicName=SAC_NO_DATA_MSG
-Language=English
-None%0
-.
-
-MessageId=99
-SymbolicName=SACDRV_99
-Language=English
- Version Number: %%ws
-.
-
-MessageId=100
-SymbolicName=SAC_DATACENTER_SUITE_MSG
-Language=English
-Windows Server 2003 Datacenter Edition%0
-.
-
-MessageId=101
-SymbolicName=SAC_EMBEDDED_SUITE_MSG
-Language=English
-Windows Server 2003 Embedded%0
-.
-
-MessageId=102
-SymbolicName=SAC_ENTERPRISE_SUITE_MSG
-Language=English
-Windows Server 2003 Enterprise Edition%0
-.
-
-MessageId=103
-SymbolicName=SAC_NO_SUITE_MSG
-Language=English
-Windows Server 2003%0
-.
-
-MessageId=104
-SymbolicName=SACDRV_104
-Language=English
-Computer identification information is unavailable.
-.
-
-MessageId=105
-SymbolicName=SACDRV_105
-Language=English
-Unrecognized command. Try the 'help' command for more details.
-.
-
-MessageId=106
-SymbolicName=SACDRV_106
-Language=English
-Error: The SAC channel cannot be closed.
-.
-
-MessageId=107
-SymbolicName=SACDRV_107
-Language=English
-Error: Could not find a channel with that name.
-.
-
-MessageId=108
-SymbolicName=SACDRV_108
-Language=English
-Channel List
-
-(Use "ch -?" for information on using channels)
-
-# Status Channel Name
-.
-
-MessageId=109
-SymbolicName=SACDRV_109
-Language=English
-EVENT: A new channel has been created. Use "ch -?" for channel help.
-Channel: %%s
-.
-
-MessageId=110
-SymbolicName=SACDRV_110
-Language=English
-EVENT: A channel has been closed.
-Channel: %%s
-.
-
-MessageId=111
-SymbolicName=SACDRV_111
-Language=English
-Name: %%s
-Description: %%s
-Type: %%s
-Channel GUID: %%08lx-%%04x-%%04x-%%02x%%02x-%%02x%%02x%%02x%%02x%%02x%%02x
-Application Type GUID: %%08lx-%%04x-%%04x-%%02x%%02x-%%02x%%02x%%02x%%02x%%02x%%02x
-
-Press <esc><tab> for next channel.
-Press <esc><tab>0 to return to the SAC channel.
-Use any other key to view this channel.
-
-.
-
-MessageId=112
-SymbolicName=SACDRV_112
-Language=English
-ch Channel management commands. Use ch -? for more help.
-.
-
-MessageId=113
-SymbolicName=SAC_RESTART_TIME_PROMPT
-Language=English
- Time since last reboot: %%d:%%02d:%%02d
-.
-
-MessageId=114
-SymbolicName=SAC_RESTART_PROMPT
-Language=English
-SAC preparing to restart the system.
-.
-
-MessageId=115
-SymbolicName=SAC_SHUTDOWN_PROMPT
-Language=English
-SAC preparing to shutdown the system.
-.
-
-MessageId=116
-SymbolicName=SACDRV_116
-Language=English
-Error! Failed to remove channel!
-
-Please contact your system administrator.
-
-.
-
-MessageId=119
-SymbolicName=SACDRV_119
-Language=English
-cmd Create a Command Prompt channel.
-.
-
-MessageId=120
-SymbolicName=SACDRV_120
-Language=English
-Timeout: Unable to launch a Command Prompt. The service responsible for
- launching Command Prompt channels has timed out. This may be
- because the service is malfunctioning or is unresponsive.
-.
-
-MessageId=121
-SymbolicName=SACDRV_121
-Language=English
-The Command Prompt session was successfully launched.
-.
-
-MessageId=128
-SymbolicName=SACDRV_128
-Language=English
-Error: The SAC Command Console session failed to be created.
-.
-
-MessageId=131
-SymbolicName=SACDRV_131
-Language=English
-Error: Unable to launch a Command Prompt. The service responsible for launching
- Command Prompt channels has not yet registered. This may be because the
- service is not yet started, is disabled by the administrator, is
- malfunctioning or is unresponsive.
-.
-
-MessageId=132
-SymbolicName=SACDRV_132
-Language=English
-EVENT: The CMD command is now available.
-.
-
-MessageId=133
-SymbolicName=SACDRV_133
-Language=English
-EVENT: The CMD command is unavailable.
-.
-
-MessageId=134
-SymbolicName=SACDRV_134
-Language=English
-EVENT: An attempt was made to close a channel but failed.
-Channel: %%s
-.
-
-MessageId=135
-SymbolicName=SACDRV_135
-Language=English
-EVENT: An attempt to close a channel failed because it is already closed.
-Channel: %%s
-.
-
-MessageId=136
-SymbolicName=SACDRV_136
-Language=English
-Channel management commands:
-
-ch List all channels.
-
-Status Legend: (AB)
-A: Channel operational status
- 'A' = Channel is active.
- 'I' = Channel is inactive.
-B: Channel Type
- 'V' = VT-UTF8 emulation.
- 'R' = Raw - no emulation.
-
-ch -si <#> Switch to a channel by its number.
-ch -sn <name> Switch to a channel by its name.
-ch -ci <#> Close a channel by its number.
-ch -cn <name> Close a channel by its name.
-
-Press <esc><tab> to select a channel.
-Press <esc><tab>0 to return to the SAC channel.
-.
-
-MessageId=137
-SymbolicName=SACDRV_137
-Language=English
-Error: There is no channel present at the specified index.
-.
-
-MessageId=144
-SymbolicName=SAC_CHANNEL_NAME
-Language=English
-SAC%0
-.
-
-MessageId=145
-SymbolicName=SAC_CHANNEL_DESCRIPTION
-Language=English
-Special Administration Console%0
-.
-
-MessageId=146
-SymbolicName=SACDRV_146
-Language=English
-Command Prompt%0
-.
-
-MessageId=147
-SymbolicName=SACDRV_147
-Language=English
-Locked access to all Command Prompt channels.
-.
-
-MessageId=148
-SymbolicName=SACDRV_148
-Language=English
-Launching of Command Prompt channels is disabled.
-.
-
-MessageId=149
-SymbolicName=SACDRV_149
-Language=English
-The specified subnet mask is invalid.
-.
-
-MessageId=150
-SymbolicName=SACDRV_150
-Language=English
-Error, missing network interface number.
-.
-
-MessageId=151
-SymbolicName=SACDRV_151
-Language=English
-The specified IP address is invalid.
-.
-
-MessageId=152
-SymbolicName=SACDRV_152
-Language=English
-The specified gateway IP address is invalid.
-.
-
-MessageId=153
-SymbolicName=SAC_UNINITIALIZED_MSG
-Language=English
-not yet initialized%0
-.
-
-MessageId=154
-SymbolicName=SACDRV_154
-Language=English
-The maximum number of channels has been reached.
-.
+MessageId=1
+SymbolicName=SAC_INIT_STATUS
+Language=English
+
+Computer is booting, SAC started and initialized.
+
+Use the "ch -?" command for information about using channels.
+Use the "?" command for general help.
+
+.
+
+MessageId=2
+SymbolicName=SAC_NEWLINE
+Language=English
+
+.
+
+MessageId=3
+SymbolicName=SAC_PROMPT
+Language=English
+SAC>%0
+.
+
+MessageId=4
+SymbolicName=SACDRV_4
+Language=English
+The SAC is unavailable, it was directly unloaded.
+.
+
+MessageId=5
+SymbolicName=SACDRV_5
+Language=English
+The SAC will become unavailable soon. The computer is shutting down.
+
+.
+
+MessageId=6
+SymbolicName=SACDRV_6
+Language=English
+A parameter was incorrect or missing. Try the 'help' command for more details.
+.
+
+MessageId=7
+SymbolicName=SACDRV_7
+Language=English
+Thread information is now ON.
+.
+
+MessageId=8
+SymbolicName=SACDRV_8
+Language=English
+Thread information is now OFF.
+.
+
+MessageId=9
+SymbolicName=SACDRV_9
+Language=English
+Paging is now ON.
+.
+
+MessageId=10
+SymbolicName=SACDRV_10
+Language=English
+Paging is now OFF.
+.
+
+MessageId=11
+SymbolicName=SAC_OUT_OF_MEMORY_PROMPT
+Language=English
+THIS LOOKS LIKE A BUG???
+.
+
+MessageId=12
+SymbolicName=SACDRV_12
+Language=English
+d Dump the current kernel log.
+.
+
+MessageId=13
+SymbolicName=SACDRV_13
+Language=English
+f Toggle detailed or abbreviated tlist info.
+.
+
+MessageId=14
+SymbolicName=SACDRV_14
+Language=English
+? or help Display this list.
+.
+
+MessageId=15
+SymbolicName=SACDRV_15
+Language=English
+i List all IP network numbers and their IP addresses.
+.
+
+MessageId=16
+SymbolicName=SACDRV_16
+Language=English
+i <#> <ip> <subnet> <gateway> Set IP addr., subnet and gateway.
+.
+
+MessageId=18
+SymbolicName=SACDRV_18
+Language=English
+k <pid> Kill the given process.
+.
+
+MessageId=19
+SymbolicName=SACDRV_19
+Language=English
+l <pid> Lower the priority of a process to the lowest possible.
+.
+
+MessageId=20
+SymbolicName=SACDRV_20
+Language=English
+m <pid> <MB-allow> Limit the memory usage of a process to <MB-allow>.
+.
+
+MessageId=21
+SymbolicName=SACDRV_21
+Language=English
+p Toggle paging the display.
+.
+
+MessageId=22
+SymbolicName=SACDRV_22
+Language=English
+r <pid> Raise the priority of a process by one.
+.
+
+MessageId=23
+SymbolicName=SACDRV_23
+Language=English
+s Display the current time and date (24 hour clock used).
+.
+
+MessageId=24
+SymbolicName=SACDRV_24
+Language=English
+s mm/dd/yyyy hh:mm Set the current time and date (24 hour clock used).
+.
+
+MessageId=25
+SymbolicName=SACDRV_25
+Language=English
+t Tlist.
+.
+
+MessageId=27
+SymbolicName=SACDRV_27
+Language=English
+restart Restart the system immediately.
+.
+
+MessageId=28
+SymbolicName=SACDRV_28
+Language=English
+shutdown Shutdown the system immediately.
+.
+
+MessageId=29
+SymbolicName=SACDRV_29
+Language=English
+crashdump Crash the system. You must have crash dump enabled.
+.
+
+MessageId=31
+SymbolicName=SACDRV_31
+Language=English
+id Display the computer identification information.
+.
+
+MessageId=32
+SymbolicName=SACDRV_32
+Language=English
+lock Lock access to Command Prompt channels.
+.
+
+MessageId=48
+SymbolicName=SAC_FAIL_PROMPT
+Language=English
+Failed with status 0x%%X.
+.
+
+MessageId=49
+SymbolicName=SACDRV_49
+Language=English
+Date: %%02d/%%02d/%%02d Time (GMT): %%02d:%%02d:%%02d:%%04d
+.
+
+MessageId=50
+SymbolicName=SACDRV_50
+Language=English
+SAC could not retrieve the IP Address.
+.
+
+MessageId=51
+SymbolicName=SACDRV_51
+Language=English
+SAC could not clear the existing IP Address.
+.
+
+MessageId=52
+SymbolicName=SACDRV_52
+Language=English
+SAC could not set the IP Address.
+.
+
+MessageId=54
+SymbolicName=SACDRV_54
+Language=English
+SAC successfully set the IP Address, subnet mask, and gateway.
+.
+
+MessageId=55
+SymbolicName=SACDRV_55
+Language=English
+SAC failed to terminate the process.
+.
+
+MessageId=56
+SymbolicName=SACDRV_56
+Language=English
+SAC successfully terminated the process.
+.
+
+MessageId=57
+SymbolicName=SACDRV_57
+Language=English
+SAC failed to lower the process priority.
+.
+
+MessageId=58
+SymbolicName=SACDRV_58
+Language=English
+SAC successfully lowered the process priority.
+.
+
+MessageId=59
+SymbolicName=SACDRV_59
+Language=English
+SAC failed to raise the process priority.
+.
+
+MessageId=60
+SymbolicName=SACDRV_60
+Language=English
+SAC successfully raised the process priority.
+.
+
+MessageId=61
+SymbolicName=SACDRV_61
+Language=English
+SAC failed to limit the available process memory.
+.
+
+MessageId=62
+SymbolicName=SACDRV_62
+Language=English
+SAC successfully limited the available process memory.
+.
+
+MessageId=63
+SymbolicName=SACDRV_63
+Language=English
+SAC cannot raise the priority of a process that was not previously lowered.
+.
+
+MessageId=64
+SymbolicName=SACDRV_64
+Language=English
+SAC cannot raise the process priority any higher.
+.
+
+MessageId=65
+SymbolicName=SAC_SHUTDOWN_FAIL_PROMPT
+Language=English
+SAC failed to shutdown the system.
+.
+
+MessageId=66
+SymbolicName=SAC_RESTART_FAIL_PROMPT
+Language=English
+SAC failed to restart the system.
+.
+
+MessageId=67
+SymbolicName=SACDRV_67
+Language=English
+SAC failed to crashdump the system.
+.
+
+MessageId=68
+SymbolicName=SACDRV_68
+Language=English
+SAC failed to retrieve the task list.
+.
+
+MessageId=69
+SymbolicName=SACDRV_69
+Language=English
+memory: %%4ld kb uptime:%%3ld %%2ld:%%02ld:%%02ld.%%03ld
+
+
+.
+
+MessageId=70
+SymbolicName=SACDRV_70
+Language=English
+No pagefile in use.
+.
+
+MessageId=71
+SymbolicName=SACDRV_71
+Language=English
+PageFile: %%wZ
+.
+
+MessageId=72
+SymbolicName=SACDRV_72
+Language=English
+ Current Size: %%6ld kb Total Used: %%6ld kb Peak Used %%6ld kb
+.
+
+MessageId=73
+SymbolicName=SACDRV_73
+Language=English
+
+ Memory:%%7ldK Avail:%%7ldK TotalWs:%%7ldK InRam Kernel:%%5ldK P:%%5ldK
+.
+
+MessageId=74
+SymbolicName=SACDRV_74
+Language=English
+ Commit:%%7ldK/%%7ldK Limit:%%7ldK Peak:%%7ldK Pool N:%%5ldK P:%%5ldK
+.
+
+MessageId=75
+SymbolicName=SACDRV_75
+Language=English
+ User Time Kernel Time Ws Faults Commit Pri Hnd Thd Pid Name
+.
+
+MessageId=76
+SymbolicName=SACDRV_76
+Language=English
+ %%6ld %%8ld File Cache
+.
+
+MessageId=77
+SymbolicName=SACDRV_77
+Language=English
+%%3ld:%%02ld:%%02ld.%%03ld %%3ld:%%02ld:%%02ld.%%03ld%%6ld %%8ld %%7ld %%2ld %%4ld %%3ld %%4ld %%wZ
+.
+
+MessageId=78
+SymbolicName=SACDRV_78
+Language=English
+%%3ld:%%02ld:%%02ld.%%03ld %%3ld:%%02ld:%%02ld.%%03ld
+.
+
+MessageId=79
+SymbolicName=SACDRV_79
+Language=English
+pid:%%3lx pri:%%2ld Hnd:%%5ld Pf:%%7ld Ws:%%7ldK %%wZ
+.
+
+MessageId=80
+SymbolicName=SACDRV_80
+Language=English
+ tid pri Ctx Swtch StrtAddr User Time Kernel Time State
+.
+
+MessageId=81
+SymbolicName=SACDRV_81
+Language=English
+ %%3lx %%2ld %%9ld %%p %%2ld:%%02ld:%%02ld.%%03ld %%2ld:%%02ld:%%02ld.%%03ld %%s%%s
+.
+
+MessageId=82
+SymbolicName=SACDRV_82
+Language=English
+----Press <Enter> for more----
+.
+
+MessageId=83
+SymbolicName=SACDRV_83
+Language=English
+SAC is retrieving IP Addresses...
+.
+
+MessageId=84
+SymbolicName=SACDRV_84
+Language=English
+Could not retrieve IP Address(es).
+.
+
+MessageId=85
+SymbolicName=SACDRV_85
+Language=English
+There are no IP Addresses available.
+.
+
+MessageId=86
+SymbolicName=SACDRV_86
+Language=English
+Net: %%d, Ip=%%d.%%d.%%d.%%d Subnet=%%d.%%d.%%d.%%d Gateway=%%d.%%d.%%d.%%d
+.
+
+MessageId=87
+SymbolicName=SACDRV_87
+Language=English
+Date: %%02d/%%02d/%%02d Time (GMT): %%02d:%%02d
+.
+
+MessageId=88
+SymbolicName=SACDRV_88
+Language=English
+The year is restricted from 1980 to 2099.
+.
+
+MessageId=89
+SymbolicName=SACDRV_89
+Language=English
+That process has been killed and is being cleaned up by the system.
+.
+
+MessageId=90
+SymbolicName=SACDRV_90
+Language=English
+A duplicate process id is being cleaned up by the system. Try the
+command again in a few seconds.
+.
+
+MessageId=92
+SymbolicName=SACDRV_92
+Language=English
+ Computer Name: %%ws
+.
+
+MessageId=93
+SymbolicName=SACDRV_93
+Language=English
+ Computer GUID: %%ws
+.
+
+MessageId=94
+SymbolicName=SACDRV_94
+Language=English
+ Processor Architecture: %%ws
+.
+
+MessageId=95
+SymbolicName=SACDRV_95
+Language=English
+ Build Number: %%ws
+.
+
+MessageId=96
+SymbolicName=SACDRV_96
+Language=English
+ Product: %%ws
+.
+
+MessageId=97
+SymbolicName=SACDRV_97
+Language=English
+ Applied Service Pack: %%ws
+.
+
+MessageId=98
+SymbolicName=SAC_NO_DATA_MSG
+Language=English
+None%0
+.
+
+MessageId=99
+SymbolicName=SACDRV_99
+Language=English
+ Version Number: %%ws
+.
+
+MessageId=100
+SymbolicName=SAC_DATACENTER_SUITE_MSG
+Language=English
+Windows Server 2003 Datacenter Edition%0
+.
+
+MessageId=101
+SymbolicName=SAC_EMBEDDED_SUITE_MSG
+Language=English
+Windows Server 2003 Embedded%0
+.
+
+MessageId=102
+SymbolicName=SAC_ENTERPRISE_SUITE_MSG
+Language=English
+Windows Server 2003 Enterprise Edition%0
+.
+
+MessageId=103
+SymbolicName=SAC_NO_SUITE_MSG
+Language=English
+Windows Server 2003%0
+.
+
+MessageId=104
+SymbolicName=SACDRV_104
+Language=English
+Computer identification information is unavailable.
+.
+
+MessageId=105
+SymbolicName=SACDRV_105
+Language=English
+Unrecognized command. Try the 'help' command for more details.
+.
+
+MessageId=106
+SymbolicName=SACDRV_106
+Language=English
+Error: The SAC channel cannot be closed.
+.
+
+MessageId=107
+SymbolicName=SACDRV_107
+Language=English
+Error: Could not find a channel with that name.
+.
+
+MessageId=108
+SymbolicName=SACDRV_108
+Language=English
+Channel List
+
+(Use "ch -?" for information on using channels)
+
+# Status Channel Name
+.
+
+MessageId=109
+SymbolicName=SACDRV_109
+Language=English
+EVENT: A new channel has been created. Use "ch -?" for channel help.
+Channel: %%s
+.
+
+MessageId=110
+SymbolicName=SACDRV_110
+Language=English
+EVENT: A channel has been closed.
+Channel: %%s
+.
+
+MessageId=111
+SymbolicName=SACDRV_111
+Language=English
+Name: %%s
+Description: %%s
+Type: %%s
+Channel GUID: %%08lx-%%04x-%%04x-%%02x%%02x-%%02x%%02x%%02x%%02x%%02x%%02x
+Application Type GUID: %%08lx-%%04x-%%04x-%%02x%%02x-%%02x%%02x%%02x%%02x%%02x%%02x
+
+Press <esc><tab> for next channel.
+Press <esc><tab>0 to return to the SAC channel.
+Use any other key to view this channel.
+
+.
+
+MessageId=112
+SymbolicName=SACDRV_112
+Language=English
+ch Channel management commands. Use ch -? for more help.
+.
+
+MessageId=113
+SymbolicName=SAC_RESTART_TIME_PROMPT
+Language=English
+ Time since last reboot: %%d:%%02d:%%02d
+.
+
+MessageId=114
+SymbolicName=SAC_RESTART_PROMPT
+Language=English
+SAC preparing to restart the system.
+.
+
+MessageId=115
+SymbolicName=SAC_SHUTDOWN_PROMPT
+Language=English
+SAC preparing to shutdown the system.
+.
+
+MessageId=116
+SymbolicName=SACDRV_116
+Language=English
+Error! Failed to remove channel!
+
+Please contact your system administrator.
+
+.
+
+MessageId=119
+SymbolicName=SACDRV_119
+Language=English
+cmd Create a Command Prompt channel.
+.
+
+MessageId=120
+SymbolicName=SACDRV_120
+Language=English
+Timeout: Unable to launch a Command Prompt. The service responsible for
+ launching Command Prompt channels has timed out. This may be
+ because the service is malfunctioning or is unresponsive.
+.
+
+MessageId=121
+SymbolicName=SACDRV_121
+Language=English
+The Command Prompt session was successfully launched.
+.
+
+MessageId=128
+SymbolicName=SACDRV_128
+Language=English
+Error: The SAC Command Console session failed to be created.
+.
+
+MessageId=131
+SymbolicName=SACDRV_131
+Language=English
+Error: Unable to launch a Command Prompt. The service responsible for launching
+ Command Prompt channels has not yet registered. This may be because the
+ service is not yet started, is disabled by the administrator, is
+ malfunctioning or is unresponsive.
+.
+
+MessageId=132
+SymbolicName=SACDRV_132
+Language=English
+EVENT: The CMD command is now available.
+.
+
+MessageId=133
+SymbolicName=SACDRV_133
+Language=English
+EVENT: The CMD command is unavailable.
+.
+
+MessageId=134
+SymbolicName=SACDRV_134
+Language=English
+EVENT: An attempt was made to close a channel but failed.
+Channel: %%s
+.
+
+MessageId=135
+SymbolicName=SACDRV_135
+Language=English
+EVENT: An attempt to close a channel failed because it is already closed.
+Channel: %%s
+.
+
+MessageId=136
+SymbolicName=SACDRV_136
+Language=English
+Channel management commands:
+
+ch List all channels.
+
+Status Legend: (AB)
+A: Channel operational status
+ 'A' = Channel is active.
+ 'I' = Channel is inactive.
+B: Channel Type
+ 'V' = VT-UTF8 emulation.
+ 'R' = Raw - no emulation.
+
+ch -si <#> Switch to a channel by its number.
+ch -sn <name> Switch to a channel by its name.
+ch -ci <#> Close a channel by its number.
+ch -cn <name> Close a channel by its name.
+
+Press <esc><tab> to select a channel.
+Press <esc><tab>0 to return to the SAC channel.
+.
+
+MessageId=137
+SymbolicName=SACDRV_137
+Language=English
+Error: There is no channel present at the specified index.
+.
+
+MessageId=144
+SymbolicName=SAC_CHANNEL_NAME
+Language=English
+SAC%0
+.
+
+MessageId=145
+SymbolicName=SAC_CHANNEL_DESCRIPTION
+Language=English
+Special Administration Console%0
+.
+
+MessageId=146
+SymbolicName=SACDRV_146
+Language=English
+Command Prompt%0
+.
+
+MessageId=147
+SymbolicName=SACDRV_147
+Language=English
+Locked access to all Command Prompt channels.
+.
+
+MessageId=148
+SymbolicName=SACDRV_148
+Language=English
+Launching of Command Prompt channels is disabled.
+.
+
+MessageId=149
+SymbolicName=SACDRV_149
+Language=English
+The specified subnet mask is invalid.
+.
+
+MessageId=150
+SymbolicName=SACDRV_150
+Language=English
+Error, missing network interface number.
+.
+
+MessageId=151
+SymbolicName=SACDRV_151
+Language=English
+The specified IP address is invalid.
+.
+
+MessageId=152
+SymbolicName=SACDRV_152
+Language=English
+The specified gateway IP address is invalid.
+.
+
+MessageId=153
+SymbolicName=SAC_UNINITIALIZED_MSG
+Language=English
+not yet initialized%0
+.
+
+MessageId=154
+SymbolicName=SACDRV_154
+Language=English
+The maximum number of channels has been reached.
+.
Author: ion
Date: Mon Aug 26 06:25:41 2013
New Revision: 59828
URL: http://svn.reactos.org/svn/reactos?rev=59828&view=rev
Log:
[SACDRV]: Implement VTUTF8ChannelOWrite2. Time to try out the !SAC on VT-UTF8 mode now.
Modified:
trunk/reactos/drivers/sac/driver/vtutf8chan.c
Modified: trunk/reactos/drivers/sac/driver/vtutf8chan.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/vtutf8c…
==============================================================================
--- trunk/reactos/drivers/sac/driver/vtutf8chan.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/sac/driver/vtutf8chan.c [iso-8859-1] Mon Aug 26 06:25:41 2013
@@ -305,86 +305,115 @@
switch (Action)
{
case SacCursorUp:
+ /* Check if we are scrolling too high */
if (Channel->CursorRow < Number)
{
+ /* Reset the row to the top */
Channel->CursorRow = 0;
}
else
{
+ /* We're fine -- scroll up by that much */
Channel->CursorRow -= Number;
}
+
+ /* All done */
VTUTF8ChannelAssertCursor(Channel);
break;
case SacCursorDown:
+ /* Check if we are scrolling too low */
if (Channel->CursorRow >= SAC_VTUTF8_ROW_HEIGHT)
{
+ /* Reset the row to the bottom */
Channel->CursorRow = SAC_VTUTF8_ROW_HEIGHT;
}
else
{
+ /* We're fine -- scroll down by that much */
Channel->CursorRow += Number;
}
+
+ /* All done */
VTUTF8ChannelAssertCursor(Channel);
break;
case SacCursorLeft:
+ /* Check if we're scrolling too much to the left */
if (Channel->CursorCol < Number)
{
+ /* Reset the column to the left-most margin */
Channel->CursorCol = 0;
}
else
{
+ /* We're fine -- scroll left by that much */
Channel->CursorCol -= Number;
}
+
+ /* All done */
VTUTF8ChannelAssertCursor(Channel);
break;
case SacCursorRight:
+ /* Check if we're scrolling too much to the right */
if (Channel->CursorCol >= SAC_VTUTF8_COL_WIDTH)
{
+ /* Reset the column to the right-most margin */
Channel->CursorCol = SAC_VTUTF8_COL_WIDTH;
}
else
{
+ /* We're fine -- scroll right by that much */
Channel->CursorCol += Number;
}
+
+ /* All done */
VTUTF8ChannelAssertCursor(Channel);
break;
case SacFontNormal:
+ /* Reset the cursor attributes */
Channel->CursorFlags = 0;
Channel->CursorBackColor = SetBackColorBlack;
Channel->CursorColor = SetColorWhite;
break;
case SacFontBlink:
+ /* Set the appropriate flag */
Channel->CursorFlags |= SAC_CURSOR_FLAG_BLINK;
break;
case SacFontBlinkOff:
+ /* Clear the appropriate flag */
Channel->CursorFlags &= ~SAC_CURSOR_FLAG_BLINK;
break;
case SacFontBold:
+ /* Set the appropriate flag */
Channel->CursorFlags |= SAC_CURSOR_FLAG_BOLD;
break;
case SacFontBoldOff:
+ /* Clear the appropriate flag */
Channel->CursorFlags &= ~SAC_CURSOR_FLAG_BOLD;
break;
case SacFontInverse:
+ /* Set the appropriate flag */
Channel->CursorFlags |= SAC_CURSOR_FLAG_INVERTED;
break;
case SacFontInverseOff:
+ /* Clear the appropriate flag */
Channel->CursorFlags &= ~SAC_CURSOR_FLAG_INVERTED;
break;
case SacEraseEndOfLine:
+ /* Loop all columns in this line past the current position */
for (i = Channel->CursorCol; i < SAC_VTUTF8_COL_WIDTH; i++)
{
+ /* Replace everything after the current position with blanks */
Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
(i * SAC_VTUTF8_ROW_HEIGHT)].CursorFlags = Channel->CursorFlags;
Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
@@ -397,8 +426,10 @@
break;
case SacEraseStartOfLine:
+ /* Loop all columns in this line, before the current position */
for (i = 0; i < (Channel->CursorCol + 1); i++)
{
+ /* Replace everything after the current position with blanks */
Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
(i * SAC_VTUTF8_ROW_HEIGHT)].CursorFlags = Channel->CursorFlags;
Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
@@ -411,8 +442,10 @@
break;
case SacEraseLine:
+ /* Loop all the columns in this line */
for (i = 0; i < SAC_VTUTF8_COL_WIDTH; i++)
{
+ /* Replace them all with blanks */
Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
(i * SAC_VTUTF8_ROW_HEIGHT)].CursorFlags = Channel->CursorFlags;
Cursor[(Channel->CursorRow * SAC_VTUTF8_COL_WIDTH) +
@@ -445,24 +478,30 @@
break;
case SacSetColors:
+ /* Set the cursor colors */
Channel->CursorColor = Number;
Channel->CursorBackColor = Number2;
break;
case SacSetBackgroundColor:
+ /* Set the cursor back color */
Channel->CursorBackColor = Number;
break;
case SacSetFontColor:
+ /* Set the cursor text color */
Channel->CursorColor = Number;
break;
case SacSetColorsAndAttributes:
+ /* Set the cursor flag and colors */
Channel->CursorFlags = Number;
Channel->CursorColor = Number2;
Channel->CursorBackColor = Number3;
break;
+
default:
+ /* Unknown, do nothing */
break;
}
@@ -549,16 +588,16 @@
IN ULONG BufferSize,
OUT PULONG ByteCount)
{
+ ASSERT(FALSE);
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTAPI
-VTUTF8ChannelOFlush(
- IN PSAC_CHANNEL Channel
- )
-{
- return STATUS_NOT_IMPLEMENTED;
+VTUTF8ChannelOFlush(IN PSAC_CHANNEL Channel)
+{
+ ASSERT(FALSE);
+ return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
@@ -567,7 +606,156 @@
IN PCHAR String,
IN ULONG Size)
{
- return STATUS_NOT_IMPLEMENTED;
+ PSAC_CURSOR_DATA Cursor;
+ ULONG i, EscapeSize, R, C;
+ PWSTR pwch;
+ CHECK_PARAMETER1(Channel);
+ CHECK_PARAMETER2(String);
+ VTUTF8ChannelAssertCursor(Channel);
+
+ /* Loop every character */
+ Cursor = (PSAC_CURSOR_DATA)Channel->OBuffer;
+ for (i = 0; i < Size; i++)
+ {
+ /* Check what the character is */
+ pwch = (PWSTR)&String[i];
+ switch (*pwch)
+ {
+ /* It's an escape sequence... */
+ case L'\x1B':
+
+ /* Send it to the parser, see how long the sequence was */
+ EscapeSize = VTUTF8ChannelConsumeEscapeSequence(Channel, pwch);
+ if (EscapeSize)
+ {
+ /* Consume that many characters for next time*/
+ i += EscapeSize - 1;
+ }
+ else
+ {
+ /* Invalid escape sequence, skip just the ESC character */
+ i++;
+ }
+
+ /* Keep going*/
+ break;
+
+ /* It's a line feed */
+ case L'\n':
+
+ /* Simply reset the column to zero on the current line */
+ Channel->CursorCol = 0;
+ break;
+
+ /* It's a carriage feed */
+ case L'\r':
+
+ /* Move to the next row */
+ Channel->CursorRow++;
+
+ /* Check if we hit the last row on the screen */
+ if (Channel->CursorRow >= SAC_VTUTF8_ROW_HEIGHT)
+ {
+ /* Go over every row before the last one */
+ for (R = 0; R < (SAC_VTUTF8_ROW_HEIGHT - 1); R++)
+ {
+ /* Sanity check, since we always copy one row below */
+ ASSERT((R + 1) < SAC_VTUTF8_ROW_HEIGHT);
+
+ /* Loop every character on the row */
+ for (C = 0; C < SAC_VTUTF8_COL_WIDTH; C++)
+ {
+ /* And replace it with one from the row below */
+ Cursor[(R * SAC_VTUTF8_COL_WIDTH) +
+ (C * SAC_VTUTF8_ROW_HEIGHT)] =
+ Cursor[((R + 1)* SAC_VTUTF8_COL_WIDTH) +
+ (C * SAC_VTUTF8_ROW_HEIGHT)];
+ }
+ }
+
+ /* Now we're left with the before-last row, zero it out */
+ ASSERT(R == (SAC_VTUTF8_ROW_HEIGHT - 1));
+ RtlZeroMemory(&Cursor[SAC_VTUTF8_COL_WIDTH * R],
+ sizeof(SAC_CURSOR_DATA) * SAC_VTUTF8_COL_WIDTH);
+
+ /* Reset the row back by one */
+ Channel->CursorRow--;
+ VTUTF8ChannelAssertCursor(Channel);
+ }
+ break;
+
+ /* It's a TAB character */
+ case L'\t':
+
+ /* Loop the remaining characters until a multiple of 4 */
+ VTUTF8ChannelAssertCursor(Channel);
+ for (C = (4 - Channel->CursorCol % 4); C; C--)
+ {
+ /* Fill each remaining character with a space */
+ VTUTF8ChannelAssertCursor(Channel);
+ Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
+ (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorFlags = Channel->CursorFlags;
+ Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
+ (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorBackColor = Channel->CursorBackColor;
+ Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
+ (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorColor = Channel->CursorColor;
+ Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
+ (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorValue = ' ';
+
+ /* Move to the next character position, but don't overflow */
+ Channel->CursorCol++;
+ if (Channel->CursorCol >= SAC_VTUTF8_COL_WIDTH)
+ {
+ Channel->CursorCol = SAC_VTUTF8_COL_WIDTH - 1;
+ }
+ }
+
+ /* All done, move to the next one */
+ VTUTF8ChannelAssertCursor(Channel);
+ break;
+
+ /* It's a backspace or delete character */
+ case L'\b':
+ case L'\x7F':
+
+ /* Move back one character, unless we had nothing typed */
+ if (Channel->CursorCol) Channel->CursorCol--;
+ VTUTF8ChannelAssertCursor(Channel);
+ break;
+
+ /* It's some other character */
+ default:
+
+ /* Is it non-printable? Ignore it and keep parsing */
+ if (*pwch < L' ') continue;
+
+ /* Otherwise, print it out with the current attributes */
+ VTUTF8ChannelAssertCursor(Channel);
+ Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
+ (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorFlags = Channel->CursorFlags;
+ Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
+ (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorBackColor = Channel->CursorBackColor;
+ Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
+ (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorColor = Channel->CursorColor;
+ Cursor[(SAC_VTUTF8_COL_WIDTH * Channel->CursorRow) +
+ (SAC_VTUTF8_ROW_HEIGHT * Channel->CursorCol)].CursorValue = *pwch;
+
+ /* Move forward one character, but make sure not to overflow */
+ Channel->CursorCol++;
+ if (Channel->CursorCol == SAC_VTUTF8_COL_WIDTH)
+ {
+ Channel->CursorCol = SAC_VTUTF8_COL_WIDTH - 1;
+ }
+
+ /* All done, move to the next one */
+ VTUTF8ChannelAssertCursor(Channel);
+ break;
+ }
+ }
+
+ /* Parsing of the input string completed -- string was written */
+ VTUTF8ChannelAssertCursor(Channel);
+ return STATUS_SUCCESS;
}
NTSTATUS