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:
jcarsey 2011-08-23 15:34:23 +00:00
parent d159ab9538
commit 5d46f17ba7
1 changed files with 33 additions and 25 deletions

View File

@ -2674,6 +2674,13 @@ InternalShellPrintWorker(
// update the attribute // update the attribute
// //
if (ResumeLocation != NULL) { if (ResumeLocation != NULL) {
if (*(ResumeLocation-1) == L'^') {
//
// Print a simple '%' symbol
//
Status = InternalPrintTo(L"%");
ResumeLocation = ResumeLocation - 1;
} else {
switch (*(ResumeLocation+1)) { switch (*(ResumeLocation+1)) {
case (L'N'): case (L'N'):
gST->ConOut->SetAttribute(gST->ConOut, OriginalAttribute); gST->ConOut->SetAttribute(gST->ConOut, OriginalAttribute);
@ -2701,6 +2708,7 @@ InternalShellPrintWorker(
ResumeLocation = ResumeLocation - 1; ResumeLocation = ResumeLocation - 1;
break; break;
} }
}
} else { } else {
// //
// reset to normal now... // reset to normal now...