diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-01-10 11:23:17 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-01-11 17:25:24 +0800 |
commit | 8ce87fffbf822ac85e05aa4f097c53a10ccc61d4 (patch) | |
tree | f7f1bd1dadbf65064b396bc1695229c50d9af1c7 | |
parent | 0772737347816ced8df6299b1c88cccb9de9164c (diff) | |
download | edk2-8ce87fffbf822ac85e05aa4f097c53a10ccc61d4.zip edk2-8ce87fffbf822ac85e05aa4f097c53a10ccc61d4.tar.gz edk2-8ce87fffbf822ac85e05aa4f097c53a10ccc61d4.tar.bz2 |
MdeModulePkg/TerminalDxe: Replace macro with enum for terminal types
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
4 files changed, 100 insertions, 97 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c index a209bf3..cf7f4e6 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c @@ -2,7 +2,7 @@ Produces Simple Text Input Protocol, Simple Text Input Extended Protocol and
Simple Text Output Protocol upon Serial IO Protocol.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -255,7 +255,7 @@ BuildTerminalDevpath ( )
{
EFI_DEVICE_PATH_PROTOCOL *TerminalDevicePath;
- UINT8 TerminalType;
+ TERMINAL_TYPE TerminalType;
VENDOR_DEVICE_PATH *Node;
EFI_STATUS Status;
@@ -270,23 +270,23 @@ BuildTerminalDevpath ( } else if (CompareGuid (&Node->Guid, &gEfiPcAnsiGuid)) {
- TerminalType = PCANSITYPE;
+ TerminalType = TerminalTypePcAnsi;
} else if (CompareGuid (&Node->Guid, &gEfiVT100Guid)) {
- TerminalType = VT100TYPE;
+ TerminalType = TerminalTypeVt100;
} else if (CompareGuid (&Node->Guid, &gEfiVT100PlusGuid)) {
- TerminalType = VT100PLUSTYPE;
+ TerminalType = TerminalTypeVt100Plus;
} else if (CompareGuid (&Node->Guid, &gEfiVTUTF8Guid)) {
- TerminalType = VTUTF8TYPE;
+ TerminalType = TerminalTypeVtUtf8;
} else if (CompareGuid (&Node->Guid, &gEfiTtyTermGuid)) {
- TerminalType = TTYTERMTYPE;
+ TerminalType = TerminalTypeTtyTerm;
} else {
return NULL;
@@ -549,7 +549,7 @@ TerminalDriverBindingStart ( EFI_SERIAL_IO_MODE *Mode;
UINTN SerialInTimeOut;
TERMINAL_DEV *TerminalDevice;
- UINT8 TerminalType;
+ TERMINAL_TYPE TerminalType;
EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *OpenInfoBuffer;
UINTN EntryCount;
UINTN Index;
@@ -713,9 +713,9 @@ TerminalDriverBindingStart ( if (RemainingDevicePath == NULL) {
TerminalType = PcdGet8 (PcdDefaultTerminalType);
//
- // Must be between PCANSITYPE (0) and TTYTERMTYPE (4)
+ // Must be between TerminalTypePcAnsi (0) and TerminalTypeTtyTerm (4)
//
- ASSERT (TerminalType <= TTYTERMTYPE);
+ ASSERT (TerminalType <= TerminalTypeTtyTerm);
} else if (!IsDevicePathEnd (RemainingDevicePath)) {
//
// If RemainingDevicePath isn't the End of Device Path Node,
@@ -723,15 +723,15 @@ TerminalDriverBindingStart ( //
Node = (VENDOR_DEVICE_PATH *)RemainingDevicePath;
if (CompareGuid (&Node->Guid, &gEfiPcAnsiGuid)) {
- TerminalType = PCANSITYPE;
+ TerminalType = TerminalTypePcAnsi;
} else if (CompareGuid (&Node->Guid, &gEfiVT100Guid)) {
- TerminalType = VT100TYPE;
+ TerminalType = TerminalTypeVt100;
} else if (CompareGuid (&Node->Guid, &gEfiVT100PlusGuid)) {
- TerminalType = VT100PLUSTYPE;
+ TerminalType = TerminalTypeVt100Plus;
} else if (CompareGuid (&Node->Guid, &gEfiVTUTF8Guid)) {
- TerminalType = VTUTF8TYPE;
+ TerminalType = TerminalTypeVtUtf8;
} else if (CompareGuid (&Node->Guid, &gEfiTtyTermGuid)) {
- TerminalType = TTYTERMTYPE;
+ TerminalType = TerminalTypeTtyTerm;
} else {
goto Error;
}
@@ -863,7 +863,7 @@ TerminalDriverBindingStart ( //
TerminalDevice->ControllerNameTable = NULL;
switch (TerminalDevice->TerminalType) {
- case PCANSITYPE:
+ case TerminalTypePcAnsi:
AddUnicodeString2 (
"eng",
gTerminalComponentName.SupportedLanguages,
@@ -881,7 +881,7 @@ TerminalDriverBindingStart ( break;
- case VT100TYPE:
+ case TerminalTypeVt100:
AddUnicodeString2 (
"eng",
gTerminalComponentName.SupportedLanguages,
@@ -899,7 +899,7 @@ TerminalDriverBindingStart ( break;
- case VT100PLUSTYPE:
+ case TerminalTypeVt100Plus:
AddUnicodeString2 (
"eng",
gTerminalComponentName.SupportedLanguages,
@@ -917,7 +917,7 @@ TerminalDriverBindingStart ( break;
- case VTUTF8TYPE:
+ case TerminalTypeVtUtf8:
AddUnicodeString2 (
"eng",
gTerminalComponentName.SupportedLanguages,
@@ -935,7 +935,7 @@ TerminalDriverBindingStart ( break;
- case TTYTERMTYPE:
+ case TerminalTypeTtyTerm:
AddUnicodeString2 (
"eng",
gTerminalComponentName.SupportedLanguages,
@@ -1456,7 +1456,7 @@ TerminalUpdateConsoleDevVariable ( EFI_STATUS Status;
UINTN NameSize;
UINTN VariableSize;
- UINT8 TerminalType;
+ TERMINAL_TYPE TerminalType;
EFI_DEVICE_PATH_PROTOCOL *Variable;
EFI_DEVICE_PATH_PROTOCOL *NewVariable;
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;
@@ -1473,7 +1473,7 @@ TerminalUpdateConsoleDevVariable ( //
// Append terminal device path onto the variable.
//
- for (TerminalType = PCANSITYPE; TerminalType <= TTYTERMTYPE; TerminalType++) {
+ for (TerminalType = TerminalTypePcAnsi; TerminalType <= TerminalTypeTtyTerm; TerminalType++) {
SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath);
NewVariable = AppendDevicePathInstance (Variable, TempDevicePath);
ASSERT (NewVariable != NULL);
@@ -1548,7 +1548,7 @@ TerminalRemoveConsoleDevVariable ( BOOLEAN Match;
UINTN VariableSize;
UINTN InstanceSize;
- UINT8 TerminalType;
+ TERMINAL_TYPE TerminalType;
EFI_DEVICE_PATH_PROTOCOL *Instance;
EFI_DEVICE_PATH_PROTOCOL *Variable;
EFI_DEVICE_PATH_PROTOCOL *OriginalVariable;
@@ -1586,7 +1586,7 @@ TerminalRemoveConsoleDevVariable ( // Loop through all the terminal types that this driver supports
//
Match = FALSE;
- for (TerminalType = PCANSITYPE; TerminalType <= TTYTERMTYPE; TerminalType++) {
+ for (TerminalType = TerminalTypePcAnsi; TerminalType <= TerminalTypeTtyTerm; TerminalType++) {
SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath);
@@ -1658,7 +1658,7 @@ TerminalRemoveConsoleDevVariable ( **/
EFI_STATUS
SetTerminalDevicePath (
- IN UINT8 TerminalType,
+ IN TERMINAL_TYPE TerminalType,
IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
OUT EFI_DEVICE_PATH_PROTOCOL **TerminalDevicePath
)
@@ -1674,23 +1674,23 @@ SetTerminalDevicePath ( //
switch (TerminalType) {
- case PCANSITYPE:
+ case TerminalTypePcAnsi:
CopyGuid (&Node.Guid, &gEfiPcAnsiGuid);
break;
- case VT100TYPE:
+ case TerminalTypeVt100:
CopyGuid (&Node.Guid, &gEfiVT100Guid);
break;
- case VT100PLUSTYPE:
+ case TerminalTypeVt100Plus:
CopyGuid (&Node.Guid, &gEfiVT100PlusGuid);
break;
- case VTUTF8TYPE:
+ case TerminalTypeVtUtf8:
CopyGuid (&Node.Guid, &gEfiVTUTF8Guid);
break;
- case TTYTERMTYPE:
+ case TerminalTypeTtyTerm:
CopyGuid (&Node.Guid, &gEfiTtyTermGuid);
break;
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h index e16b89c..c15d17c 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h @@ -1,7 +1,7 @@ /** @file
Header file for Terminal driver.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -81,10 +81,19 @@ typedef struct _TERMINAL_CONSOLE_IN_EX_NOTIFY { EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
LIST_ENTRY NotifyEntry;
} TERMINAL_CONSOLE_IN_EX_NOTIFY;
+
+typedef enum {
+ TerminalTypePcAnsi,
+ TerminalTypeVt100,
+ TerminalTypeVt100Plus,
+ TerminalTypeVtUtf8,
+ TerminalTypeTtyTerm
+} TERMINAL_TYPE;
+
typedef struct {
UINTN Signature;
EFI_HANDLE Handle;
- UINT8 TerminalType;
+ TERMINAL_TYPE TerminalType;
EFI_SERIAL_IO_PROTOCOL *SerialIo;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleInput;
@@ -139,12 +148,6 @@ typedef union { UINT8 Utf8_3[3];
} UTF8_CHAR;
-#define PCANSITYPE 0
-#define VT100TYPE 1
-#define VT100PLUSTYPE 2
-#define VTUTF8TYPE 3
-#define TTYTERMTYPE 4
-
#define LEFTOPENBRACKET 0x5b // '['
#define ACAP 0x41
#define BCAP 0x42
@@ -859,7 +862,7 @@ TerminalRemoveConsoleDevVariable ( **/
EFI_STATUS
SetTerminalDevicePath (
- IN UINT8 TerminalType,
+ IN TERMINAL_TYPE TerminalType,
IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
OUT EFI_DEVICE_PATH_PROTOCOL **TerminalDevicePath
);
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 0162410..1392f16 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -2,7 +2,7 @@ Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -453,15 +453,15 @@ TranslateRawDataToEfiKey ( {
switch (TerminalDevice->TerminalType) {
- case PCANSITYPE:
- case VT100TYPE:
- case VT100PLUSTYPE:
- case TTYTERMTYPE:
+ case TerminalTypePcAnsi:
+ case TerminalTypeVt100:
+ case TerminalTypeVt100Plus:
+ case TerminalTypeTtyTerm:
AnsiRawDataToUnicode (TerminalDevice);
UnicodeToEfiKey (TerminalDevice);
break;
- case VTUTF8TYPE:
+ case TerminalTypeVtUtf8:
//
// Process all the raw data in the RawFIFO,
// put the processed key into UnicodeFIFO.
@@ -1405,8 +1405,8 @@ UnicodeToEfiKey ( continue;
}
- if (UnicodeChar == 'O' && (TerminalDevice->TerminalType == VT100TYPE ||
- TerminalDevice->TerminalType == TTYTERMTYPE)) {
+ if (UnicodeChar == 'O' && (TerminalDevice->TerminalType == TerminalTypeVt100 ||
+ TerminalDevice->TerminalType == TerminalTypeTtyTerm)) {
TerminalDevice->InputState |= INPUT_STATE_O;
TerminalDevice->ResetState = RESET_STATE_DEFAULT;
continue;
@@ -1414,8 +1414,8 @@ UnicodeToEfiKey ( Key.ScanCode = SCAN_NULL;
- if (TerminalDevice->TerminalType == VT100PLUSTYPE ||
- TerminalDevice->TerminalType == VTUTF8TYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypeVt100Plus ||
+ TerminalDevice->TerminalType == TerminalTypeVtUtf8) {
switch (UnicodeChar) {
case '1':
Key.ScanCode = SCAN_F1;
@@ -1519,7 +1519,7 @@ UnicodeToEfiKey ( Key.ScanCode = SCAN_NULL;
- if (TerminalDevice->TerminalType == VT100TYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypeVt100) {
switch (UnicodeChar) {
case 'P':
Key.ScanCode = SCAN_F1;
@@ -1554,7 +1554,7 @@ UnicodeToEfiKey ( default :
break;
}
- } else if (TerminalDevice->TerminalType == TTYTERMTYPE) {
+ } else if (TerminalDevice->TerminalType == TerminalTypeTtyTerm) {
/* Also accept VT100 escape codes for F1-F4, HOME and END for TTY term */
switch (UnicodeChar) {
case 'P':
@@ -1596,11 +1596,11 @@ UnicodeToEfiKey ( Key.ScanCode = SCAN_NULL;
- if (TerminalDevice->TerminalType == PCANSITYPE ||
- TerminalDevice->TerminalType == VT100TYPE ||
- TerminalDevice->TerminalType == VT100PLUSTYPE ||
- TerminalDevice->TerminalType == VTUTF8TYPE ||
- TerminalDevice->TerminalType == TTYTERMTYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi ||
+ TerminalDevice->TerminalType == TerminalTypeVt100 ||
+ TerminalDevice->TerminalType == TerminalTypeVt100Plus ||
+ TerminalDevice->TerminalType == TerminalTypeVtUtf8 ||
+ TerminalDevice->TerminalType == TerminalTypeTtyTerm) {
switch (UnicodeChar) {
case 'A':
Key.ScanCode = SCAN_UP;
@@ -1615,104 +1615,104 @@ UnicodeToEfiKey ( Key.ScanCode = SCAN_LEFT;
break;
case 'H':
- if (TerminalDevice->TerminalType == PCANSITYPE ||
- TerminalDevice->TerminalType == VT100TYPE ||
- TerminalDevice->TerminalType == TTYTERMTYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi ||
+ TerminalDevice->TerminalType == TerminalTypeVt100 ||
+ TerminalDevice->TerminalType == TerminalTypeTtyTerm) {
Key.ScanCode = SCAN_HOME;
}
break;
case 'F':
- if (TerminalDevice->TerminalType == PCANSITYPE ||
- TerminalDevice->TerminalType == TTYTERMTYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi ||
+ TerminalDevice->TerminalType == TerminalTypeTtyTerm) {
Key.ScanCode = SCAN_END;
}
break;
case 'K':
- if (TerminalDevice->TerminalType == VT100TYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypeVt100) {
Key.ScanCode = SCAN_END;
}
break;
case 'L':
case '@':
- if (TerminalDevice->TerminalType == PCANSITYPE ||
- TerminalDevice->TerminalType == VT100TYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi ||
+ TerminalDevice->TerminalType == TerminalTypeVt100) {
Key.ScanCode = SCAN_INSERT;
}
break;
case 'X':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_DELETE;
}
break;
case 'P':
- if (TerminalDevice->TerminalType == VT100TYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypeVt100) {
Key.ScanCode = SCAN_DELETE;
- } else if (TerminalDevice->TerminalType == PCANSITYPE) {
+ } else if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_F4;
}
break;
case 'I':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_PAGE_UP;
}
break;
case 'V':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_F10;
}
break;
case '?':
- if (TerminalDevice->TerminalType == VT100TYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypeVt100) {
Key.ScanCode = SCAN_PAGE_UP;
}
break;
case 'G':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_PAGE_DOWN;
}
break;
case 'U':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_F9;
}
break;
case '/':
- if (TerminalDevice->TerminalType == VT100TYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypeVt100) {
Key.ScanCode = SCAN_PAGE_DOWN;
}
break;
case 'M':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_F1;
}
break;
case 'N':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_F2;
}
break;
case 'O':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_F3;
}
break;
case 'Q':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_F5;
}
break;
case 'R':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_F6;
}
break;
case 'S':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_F7;
}
break;
case 'T':
- if (TerminalDevice->TerminalType == PCANSITYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypePcAnsi) {
Key.ScanCode = SCAN_F8;
}
break;
@@ -1726,7 +1726,7 @@ UnicodeToEfiKey ( * numeric codes, and there are no ambiguous prefixes shared with
* other terminal types.
*/
- if (TerminalDevice->TerminalType == TTYTERMTYPE &&
+ if (TerminalDevice->TerminalType == TerminalTypeTtyTerm &&
Key.ScanCode == SCAN_NULL &&
UnicodeChar >= '0' &&
UnicodeChar <= '9') {
@@ -1755,7 +1755,7 @@ UnicodeToEfiKey ( * state is only used by the TTY terminal type.
*/
Key.ScanCode = SCAN_NULL;
- if (TerminalDevice->TerminalType == TTYTERMTYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypeTtyTerm) {
if (UnicodeChar == '~' && TerminalDevice->TtyEscapeIndex <= 2) {
UINT16 EscCode;
@@ -1851,7 +1851,7 @@ UnicodeToEfiKey ( }
if (UnicodeChar == DEL) {
- if (TerminalDevice->TerminalType == TTYTERMTYPE) {
+ if (TerminalDevice->TerminalType == TerminalTypeTtyTerm) {
Key.ScanCode = SCAN_NULL;
Key.UnicodeChar = CHAR_BACKSPACE;
}
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c index c9b4ffc..e677a76 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c @@ -1,7 +1,7 @@ /** @file
Implementation for EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL protocol.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -224,10 +224,10 @@ TerminalConOutOutputString ( switch (TerminalDevice->TerminalType) {
- case PCANSITYPE:
- case VT100TYPE:
- case VT100PLUSTYPE:
- case TTYTERMTYPE:
+ case TerminalTypePcAnsi:
+ case TerminalTypeVt100:
+ case TerminalTypeVt100Plus:
+ case TerminalTypeTtyTerm:
if (!TerminalIsValidTextGraphics (*WString, &GraphicChar, &AsciiChar)) {
//
@@ -253,7 +253,7 @@ TerminalConOutOutputString ( }
- if (TerminalDevice->TerminalType != PCANSITYPE) {
+ if (TerminalDevice->TerminalType != TerminalTypePcAnsi) {
GraphicChar = AsciiChar;
}
@@ -271,7 +271,7 @@ TerminalConOutOutputString ( break;
- case VTUTF8TYPE:
+ case TerminalTypeVtUtf8:
UnicodeToUtf8 (*WString, &Utf8Char, &ValidBytes);
Length = ValidBytes;
Status = TerminalDevice->SerialIo->Write (
@@ -317,7 +317,7 @@ TerminalConOutOutputString ( Mode->CursorRow++;
}
- if (TerminalDevice->TerminalType == TTYTERMTYPE &&
+ if (TerminalDevice->TerminalType == TerminalTypeTtyTerm &&
!TerminalDevice->OutputEscChar) {
//
// We've written the last character on the line. The
@@ -398,14 +398,14 @@ TerminalConOutTestString ( switch (TerminalDevice->TerminalType) {
- case PCANSITYPE:
- case VT100TYPE:
- case VT100PLUSTYPE:
- case TTYTERMTYPE:
+ case TerminalTypePcAnsi:
+ case TerminalTypeVt100:
+ case TerminalTypeVt100Plus:
+ case TerminalTypeTtyTerm:
Status = AnsiTestString (TerminalDevice, WString);
break;
- case VTUTF8TYPE:
+ case TerminalTypeVtUtf8:
Status = VTUTF8TestString (TerminalDevice, WString);
break;
@@ -791,7 +791,7 @@ TerminalConOutSetCursorPosition ( // within the current line if possible, and don't output anyting if
// it isn't necessary.
//
- if (TerminalDevice->TerminalType == TTYTERMTYPE &&
+ if (TerminalDevice->TerminalType == TerminalTypeTtyTerm &&
(UINTN)Mode->CursorRow == Row) {
if ((UINTN)Mode->CursorColumn > Column) {
mCursorBackwardString[FW_BACK_OFFSET + 0] = (CHAR16) ('0' + ((Mode->CursorColumn - Column) / 10));
|