mirror of https://github.com/acidanthera/audk.git
ShellPkg: fix ShellPrint-functions to allow for escape character to prevent attribute changes.
This allows for the editors to function easily. signed-off-by: jcarsey reviewed-by: kidzyoung git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12187 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d159ab9538
commit
5d46f17ba7
|
@ -2674,32 +2674,40 @@ InternalShellPrintWorker(
|
||||||
// update the attribute
|
// update the attribute
|
||||||
//
|
//
|
||||||
if (ResumeLocation != NULL) {
|
if (ResumeLocation != NULL) {
|
||||||
switch (*(ResumeLocation+1)) {
|
if (*(ResumeLocation-1) == L'^') {
|
||||||
case (L'N'):
|
//
|
||||||
gST->ConOut->SetAttribute(gST->ConOut, OriginalAttribute);
|
// Print a simple '%' symbol
|
||||||
break;
|
//
|
||||||
case (L'E'):
|
Status = InternalPrintTo(L"%");
|
||||||
gST->ConOut->SetAttribute(gST->ConOut, EFI_TEXT_ATTR(EFI_YELLOW, ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)));
|
ResumeLocation = ResumeLocation - 1;
|
||||||
break;
|
} else {
|
||||||
case (L'H'):
|
switch (*(ResumeLocation+1)) {
|
||||||
gST->ConOut->SetAttribute(gST->ConOut, EFI_TEXT_ATTR(EFI_WHITE, ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)));
|
case (L'N'):
|
||||||
break;
|
gST->ConOut->SetAttribute(gST->ConOut, OriginalAttribute);
|
||||||
case (L'B'):
|
|
||||||
gST->ConOut->SetAttribute(gST->ConOut, EFI_TEXT_ATTR(EFI_BLUE, ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)));
|
|
||||||
break;
|
|
||||||
case (L'V'):
|
|
||||||
gST->ConOut->SetAttribute(gST->ConOut, EFI_TEXT_ATTR(EFI_GREEN, ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
//
|
|
||||||
// Print a simple '%' symbol
|
|
||||||
//
|
|
||||||
Status = InternalPrintTo(L"%");
|
|
||||||
if (EFI_ERROR(Status)) {
|
|
||||||
break;
|
break;
|
||||||
}
|
case (L'E'):
|
||||||
ResumeLocation = ResumeLocation - 1;
|
gST->ConOut->SetAttribute(gST->ConOut, EFI_TEXT_ATTR(EFI_YELLOW, ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)));
|
||||||
break;
|
break;
|
||||||
|
case (L'H'):
|
||||||
|
gST->ConOut->SetAttribute(gST->ConOut, EFI_TEXT_ATTR(EFI_WHITE, ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)));
|
||||||
|
break;
|
||||||
|
case (L'B'):
|
||||||
|
gST->ConOut->SetAttribute(gST->ConOut, EFI_TEXT_ATTR(EFI_BLUE, ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)));
|
||||||
|
break;
|
||||||
|
case (L'V'):
|
||||||
|
gST->ConOut->SetAttribute(gST->ConOut, EFI_TEXT_ATTR(EFI_GREEN, ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//
|
||||||
|
// Print a simple '%' symbol
|
||||||
|
//
|
||||||
|
Status = InternalPrintTo(L"%");
|
||||||
|
if (EFI_ERROR(Status)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ResumeLocation = ResumeLocation - 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue