From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5D43581B56 for ; Tue, 10 Jan 2017 23:32:35 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP; 10 Jan 2017 23:32:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,345,1477983600"; d="scan'208";a="47720073" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 10 Jan 2017 23:32:34 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 10 Jan 2017 23:32:17 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 10 Jan 2017 23:32:17 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Wed, 11 Jan 2017 15:32:15 +0800 From: "Tian, Feng" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" CC: "Zeng, Star" , "Tian, Feng" Thread-Topic: [PATCH 1/8] MdeModulePkg/TerminalDxe: Replace macro with enum for terminal types Thread-Index: AQHSax0I8DVWEP9iH0Opdt6w9jlEMaEy410Q Date: Wed, 11 Jan 2017 07:32:14 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE5699A8832@SHSMSX101.ccr.corp.intel.com> References: <20170110083904.34104-1-ruiyu.ni@intel.com> <20170110083904.34104-2-ruiyu.ni@intel.com> In-Reply-To: <20170110083904.34104-2-ruiyu.ni@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 1/8] MdeModulePkg/TerminalDxe: Replace macro with enum for terminal types X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 07:32:35 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Series reviewed-by: Feng Tian Thanks Feng -----Original Message----- From: Ni, Ruiyu=20 Sent: Tuesday, January 10, 2017 4:39 PM To: edk2-devel@lists.01.org Cc: Zeng, Star ; Tian, Feng Subject: [PATCH 1/8] MdeModulePkg/TerminalDxe: Replace macro with enum for = terminal types Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Star Zeng Cc: Feng Tian --- .../Universal/Console/TerminalDxe/Terminal.c | 50 ++++++------ .../Universal/Console/TerminalDxe/Terminal.h | 14 ++-- .../Universal/Console/TerminalDxe/TerminalConIn.c | 88 +++++++++++-------= ---- .../Universal/Console/TerminalDxe/TerminalConOut.c | 28 +++---- 4 files changed, 91 insertions(+), 89 deletions(-) diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeMod= ulePkg/Universal/Console/TerminalDxe/Terminal.c index a209bf3..1c1f5e1 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. =20 -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made availab= le under the terms and conditions of the BSD License which accompanies thi= s distribution. The full text of the license may be found at @@ -270,23 +2= 70,23 @@ BuildTerminalDevpath ( =20 } else if (CompareGuid (&Node->Guid, &gEfiPcAnsiGuid)) { =20 - TerminalType =3D PCANSITYPE; + TerminalType =3D TerminalTypePcAnsi; =20 } else if (CompareGuid (&Node->Guid, &gEfiVT100Guid)) { =20 - TerminalType =3D VT100TYPE; + TerminalType =3D TerminalTypeVt100; =20 } else if (CompareGuid (&Node->Guid, &gEfiVT100PlusGuid)) { =20 - TerminalType =3D VT100PLUSTYPE; + TerminalType =3D TerminalTypeVt100Plus; =20 } else if (CompareGuid (&Node->Guid, &gEfiVTUTF8Guid)) { =20 - TerminalType =3D VTUTF8TYPE; + TerminalType =3D TerminalTypeVtUtf8; =20 } else if (CompareGuid (&Node->Guid, &gEfiTtyTermGuid)) { =20 - TerminalType =3D TTYTERMTYPE; + TerminalType =3D TerminalTypeTtyTerm; =20 } else { return NULL; @@ -713,9 +713,9 @@ TerminalDriverBindingStart ( if (RemainingDevicePath =3D=3D NULL) { TerminalType =3D PcdGet8 (PcdDefaultTerminalType); // - // Must be between PCANSITYPE (0) and TTYTERMTYPE (4) + // Must be between TerminalTypePcAnsi (0) and TerminalTypeTtyTerm=20 + (4) // - ASSERT (TerminalType <=3D TTYTERMTYPE); + ASSERT (TerminalType <=3D TerminalTypeTtyTerm); } else if (!IsDevicePathEnd (RemainingDevicePath)) { // // If RemainingDevicePath isn't the End of Device Path Node, @@ -723= ,15 +723,15 @@ TerminalDriverBindingStart ( // Node =3D (VENDOR_DEVICE_PATH *)RemainingDevicePath; if (CompareGuid (&Node->Guid, &gEfiPcAnsiGuid)) { - TerminalType =3D PCANSITYPE; + TerminalType =3D TerminalTypePcAnsi; } else if (CompareGuid (&Node->Guid, &gEfiVT100Guid)) { - TerminalType =3D VT100TYPE; + TerminalType =3D TerminalTypeVt100; } else if (CompareGuid (&Node->Guid, &gEfiVT100PlusGuid)) { - TerminalType =3D VT100PLUSTYPE; + TerminalType =3D TerminalTypeVt100Plus; } else if (CompareGuid (&Node->Guid, &gEfiVTUTF8Guid)) { - TerminalType =3D VTUTF8TYPE; + TerminalType =3D TerminalTypeVtUtf8; } else if (CompareGuid (&Node->Guid, &gEfiTtyTermGuid)) { - TerminalType =3D TTYTERMTYPE; + TerminalType =3D TerminalTypeTtyTerm; } else { goto Error; } @@ -863,7 +863,7 @@ TerminalDriverBindingStart ( // TerminalDevice->ControllerNameTable =3D NULL; switch (TerminalDevice->TerminalType) { - case PCANSITYPE: + case TerminalTypePcAnsi: AddUnicodeString2 ( "eng", gTerminalComponentName.SupportedLanguages, @@ -881,7 +881,7 @@ TerminalDriverBindingStart ( =20 break; =20 - case VT100TYPE: + case TerminalTypeVt100: AddUnicodeString2 ( "eng", gTerminalComponentName.SupportedLanguages, @@ -899,7 +899,7 @@ TerminalDriverBindingStart ( =20 break; =20 - case VT100PLUSTYPE: + case TerminalTypeVt100Plus: AddUnicodeString2 ( "eng", gTerminalComponentName.SupportedLanguages, @@ -917,7 +917,7 @@ TerminalDriverBindingStart ( =20 break; =20 - case VTUTF8TYPE: + case TerminalTypeVtUtf8: AddUnicodeString2 ( "eng", gTerminalComponentName.SupportedLanguages, @@ -935,7 +935,7 @@ TerminalDriverBindingStart ( =20 break; =20 - case TTYTERMTYPE: + case TerminalTypeTtyTerm: AddUnicodeString2 ( "eng", gTerminalComponentName.SupportedLanguages, @@ -1473,7 +1473,7 @@ TerminalUpdateConsoleDevVariable ( // // Append terminal device path onto the variable. // - for (TerminalType =3D PCANSITYPE; TerminalType <=3D TTYTERMTYPE; Termina= lType++) { + for (TerminalType =3D TerminalTypePcAnsi; TerminalType <=3D=20 + TerminalTypeTtyTerm; TerminalType++) { SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath= ); NewVariable =3D AppendDevicePathInstance (Variable, TempDevicePath); ASSERT (NewVariable !=3D NULL); @@ -1586,7 +1586,7 @@ TerminalRemoveConsoleDevVariable ( // Loop through all the terminal types that this driver supports // Match =3D FALSE; - for (TerminalType =3D PCANSITYPE; TerminalType <=3D TTYTERMTYPE; Termi= nalType++) { + for (TerminalType =3D TerminalTypePcAnsi; TerminalType <=3D=20 + TerminalTypeTtyTerm; TerminalType++) { =20 SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePa= th); =20 @@ -1674,23 +1674,23 @@ SetTerminalDevicePath ( // switch (TerminalType) { =20 - case PCANSITYPE: + case TerminalTypePcAnsi: CopyGuid (&Node.Guid, &gEfiPcAnsiGuid); break; =20 - case VT100TYPE: + case TerminalTypeVt100: CopyGuid (&Node.Guid, &gEfiVT100Guid); break; =20 - case VT100PLUSTYPE: + case TerminalTypeVt100Plus: CopyGuid (&Node.Guid, &gEfiVT100PlusGuid); break; =20 - case VTUTF8TYPE: + case TerminalTypeVtUtf8: CopyGuid (&Node.Guid, &gEfiVTUTF8Guid); break; =20 - case TTYTERMTYPE: + case TerminalTypeTtyTerm: CopyGuid (&Node.Guid, &gEfiTtyTermGuid); break; =20 diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h b/MdeMod= ulePkg/Universal/Console/TerminalDxe/Terminal.h index e16b89c..fff3281 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. =20 -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.
This p= rogram and the accompanying materials are licensed and made available unde= r the terms and conditions of the BSD License @@ -139,11 +139,13 @@ typedef= union { UINT8 Utf8_3[3]; } UTF8_CHAR; =20 -#define PCANSITYPE 0 -#define VT100TYPE 1 -#define VT100PLUSTYPE 2 -#define VTUTF8TYPE 3 -#define TTYTERMTYPE 4 +typedef enum { + TerminalTypePcAnsi, + TerminalTypeVt100, + TerminalTypeVt100Plus, + TerminalTypeVtUtf8, + TerminalTypeTtyTerm +} TERMINAL_TYPE; =20 #define LEFTOPENBRACKET 0x5b // '[' #define ACAP 0x41 diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/M= deModulePkg/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. =20 (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
-Copyrigh= t (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.
This p= rogram and the accompanying materials are licensed and made available unde= r the terms and conditions of the BSD License @@ -453,15 +453,15 @@ Transla= teRawDataToEfiKey ( { switch (TerminalDevice->TerminalType) { =20 - case PCANSITYPE: - case VT100TYPE: - case VT100PLUSTYPE: - case TTYTERMTYPE: + case TerminalTypePcAnsi: + case TerminalTypeVt100: + case TerminalTypeVt100Plus: + case TerminalTypeTtyTerm: AnsiRawDataToUnicode (TerminalDevice); UnicodeToEfiKey (TerminalDevice); break; =20 - case VTUTF8TYPE: + case TerminalTypeVtUtf8: // // Process all the raw data in the RawFIFO, // put the processed key into UnicodeFIFO. @@ -1405,8 +1405,8 @@ UnicodeToEfiKey ( continue; } =20 - if (UnicodeChar =3D=3D 'O' && (TerminalDevice->TerminalType =3D=3D V= T100TYPE || - TerminalDevice->TerminalType =3D=3D TTYTE= RMTYPE)) { + if (UnicodeChar =3D=3D 'O' && (TerminalDevice->TerminalType =3D=3D T= erminalTypeVt100 || + TerminalDevice->TerminalType =3D=3D=20 + TerminalTypeTtyTerm)) { TerminalDevice->InputState |=3D INPUT_STATE_O; TerminalDevice->ResetState =3D RESET_STATE_DEFAULT; continue; @@ -1414,8 +1414,8 @@ UnicodeToEfiKey ( =20 Key.ScanCode =3D SCAN_NULL; =20 - if (TerminalDevice->TerminalType =3D=3D VT100PLUSTYPE || - TerminalDevice->TerminalType =3D=3D VTUTF8TYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypeVt100Plus || + TerminalDevice->TerminalType =3D=3D TerminalTypeVtUtf8) { switch (UnicodeChar) { case '1': Key.ScanCode =3D SCAN_F1; @@ -1519,7 +1519,7 @@ UnicodeToEfiKey ( =20 Key.ScanCode =3D SCAN_NULL; =20 - if (TerminalDevice->TerminalType =3D=3D VT100TYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypeVt100) { switch (UnicodeChar) { case 'P': Key.ScanCode =3D SCAN_F1; @@ -1554,7 +1554,7 @@ UnicodeToEfiKey ( default : break; } - } else if (TerminalDevice->TerminalType =3D=3D TTYTERMTYPE) { + } else if (TerminalDevice->TerminalType =3D=3D TerminalTypeTtyTerm) = { /* Also accept VT100 escape codes for F1-F4, HOME and END for TTY = term */ switch (UnicodeChar) { case 'P': @@ -1596,11 +1596,11 @@ UnicodeToEfiKey ( =20 Key.ScanCode =3D SCAN_NULL; =20 - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE || - TerminalDevice->TerminalType =3D=3D VT100TYPE || - TerminalDevice->TerminalType =3D=3D VT100PLUSTYPE || - TerminalDevice->TerminalType =3D=3D VTUTF8TYPE || - TerminalDevice->TerminalType =3D=3D TTYTERMTYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi || + TerminalDevice->TerminalType =3D=3D TerminalTypeVt100 || + TerminalDevice->TerminalType =3D=3D TerminalTypeVt100Plus || + TerminalDevice->TerminalType =3D=3D TerminalTypeVtUtf8 || + TerminalDevice->TerminalType =3D=3D TerminalTypeTtyTerm) { switch (UnicodeChar) { case 'A': Key.ScanCode =3D SCAN_UP; @@ -1615,104 +1615,104 @@ UnicodeToEfiKey ( Key.ScanCode =3D SCAN_LEFT; break; case 'H': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE || - TerminalDevice->TerminalType =3D=3D VT100TYPE || - TerminalDevice->TerminalType =3D=3D TTYTERMTYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi || + TerminalDevice->TerminalType =3D=3D TerminalTypeVt100 || + TerminalDevice->TerminalType =3D=3D TerminalTypeTtyTerm) { Key.ScanCode =3D SCAN_HOME; } break; case 'F': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE || - TerminalDevice->TerminalType =3D=3D TTYTERMTYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi || + TerminalDevice->TerminalType =3D=3D TerminalTypeTtyTerm) { Key.ScanCode =3D SCAN_END; } break; case 'K': - if (TerminalDevice->TerminalType =3D=3D VT100TYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypeVt100) { Key.ScanCode =3D SCAN_END; } break; case 'L': case '@': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE || - TerminalDevice->TerminalType =3D=3D VT100TYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi || + TerminalDevice->TerminalType =3D=3D TerminalTypeVt100) { Key.ScanCode =3D SCAN_INSERT; } break; case 'X': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_DELETE; } break; case 'P': - if (TerminalDevice->TerminalType =3D=3D VT100TYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypeVt100) { Key.ScanCode =3D SCAN_DELETE; - } else if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + } else if (TerminalDevice->TerminalType =3D=3D=20 + TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_F4; } break; case 'I': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_PAGE_UP; } break; case 'V': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_F10; } break; case '?': - if (TerminalDevice->TerminalType =3D=3D VT100TYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypeVt100) { Key.ScanCode =3D SCAN_PAGE_UP; } break; case 'G': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_PAGE_DOWN; } break; case 'U': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_F9; } break; case '/': - if (TerminalDevice->TerminalType =3D=3D VT100TYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypeVt100) { Key.ScanCode =3D SCAN_PAGE_DOWN; } break; case 'M': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_F1; } break; case 'N': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_F2; } break; case 'O': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_F3; } break; case 'Q': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_F5; } break; case 'R': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_F6; } break; case 'S': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_F7; } break; case 'T': - if (TerminalDevice->TerminalType =3D=3D PCANSITYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypePcAnsi) { Key.ScanCode =3D SCAN_F8; } break; @@ -1726,7 +1726,7 @@ UnicodeToEfiKey ( * numeric codes, and there are no ambiguous prefixes shared with * other terminal types. */ - if (TerminalDevice->TerminalType =3D=3D TTYTERMTYPE && + if (TerminalDevice->TerminalType =3D=3D TerminalTypeTtyTerm && Key.ScanCode =3D=3D SCAN_NULL && UnicodeChar >=3D '0' && UnicodeChar <=3D '9') { @@ -1755,7 +1755,7 @@ UnicodeToEfiKey ( * state is only used by the TTY terminal type. */ Key.ScanCode =3D SCAN_NULL; - if (TerminalDevice->TerminalType =3D=3D TTYTERMTYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypeTtyTerm) { =20 if (UnicodeChar =3D=3D '~' && TerminalDevice->TtyEscapeIndex <=3D = 2) { UINT16 EscCode; @@ -1851,7 +1851,7 @@ UnicodeToEfiKey ( } =20 if (UnicodeChar =3D=3D DEL) { - if (TerminalDevice->TerminalType =3D=3D TTYTERMTYPE) { + if (TerminalDevice->TerminalType =3D=3D TerminalTypeTtyTerm) { Key.ScanCode =3D SCAN_NULL; Key.UnicodeChar =3D 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. =20 -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.
This p= rogram and the accompanying materials are licensed and made available unde= r the terms and conditions of the BSD License @@ -224,10 +224,10 @@ Termina= lConOutOutputString ( =20 switch (TerminalDevice->TerminalType) { =20 - case PCANSITYPE: - case VT100TYPE: - case VT100PLUSTYPE: - case TTYTERMTYPE: + case TerminalTypePcAnsi: + case TerminalTypeVt100: + case TerminalTypeVt100Plus: + case TerminalTypeTtyTerm: =20 if (!TerminalIsValidTextGraphics (*WString, &GraphicChar, &AsciiChar= )) { // @@ -253,7 +253,7 @@ TerminalConOutOutputString ( =20 } =20 - if (TerminalDevice->TerminalType !=3D PCANSITYPE) { + if (TerminalDevice->TerminalType !=3D TerminalTypePcAnsi) { GraphicChar =3D AsciiChar; } =20 @@ -271,7 +271,7 @@ TerminalConOutOutputString ( =20 break; =20 - case VTUTF8TYPE: + case TerminalTypeVtUtf8: UnicodeToUtf8 (*WString, &Utf8Char, &ValidBytes); Length =3D ValidBytes; Status =3D TerminalDevice->SerialIo->Write ( @@ -317,7 +317,7 @@ Ter= minalConOutOutputString ( Mode->CursorRow++; } =20 - if (TerminalDevice->TerminalType =3D=3D TTYTERMTYPE && + if (TerminalDevice->TerminalType =3D=3D TerminalTypeTtyTerm && !TerminalDevice->OutputEscChar) { // // We've written the last character on the line. The @@ -398,14= +398,14 @@ TerminalConOutTestString ( =20 switch (TerminalDevice->TerminalType) { =20 - case PCANSITYPE: - case VT100TYPE: - case VT100PLUSTYPE: - case TTYTERMTYPE: + case TerminalTypePcAnsi: + case TerminalTypeVt100: + case TerminalTypeVt100Plus: + case TerminalTypeTtyTerm: Status =3D AnsiTestString (TerminalDevice, WString); break; =20 - case VTUTF8TYPE: + case TerminalTypeVtUtf8: Status =3D VTUTF8TestString (TerminalDevice, WString); break; =20 @@ -791,7 +791,7 @@ TerminalConOutSetCursorPosition ( // within the current line if possible, and don't output anyting if // it isn't necessary. // - if (TerminalDevice->TerminalType =3D=3D TTYTERMTYPE && + if (TerminalDevice->TerminalType =3D=3D TerminalTypeTtyTerm && (UINTN)Mode->CursorRow =3D=3D Row) { if ((UINTN)Mode->CursorColumn > Column) { mCursorBackwardString[FW_BACK_OFFSET + 0] =3D (CHAR16) ('0' + ((Mode= ->CursorColumn - Column) / 10)); -- 2.9.0.windows.1