X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FEditInputBar.c;h=26f70d719ab3f0cb79208401c6cfec65d00ec516;hb=7162fdb037fb9385f6bd7d0dc55d54029b810de2;hp=978ce7f13a1f403c7cde1dcd4368fb26696f5d3c;hpb=5a2beb745f87a113bbb1db775d0450f65ceb2124;p=mirror_edk2.git
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c
index 978ce7f13a..26f70d719a 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c
@@ -1,7 +1,7 @@
/** @file
Implements inputbar interface functions.
- Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.
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
@@ -23,7 +23,6 @@ UINTN StringSize; // Size of mReturnString space size.
Initialize the input bar.
**/
VOID
-EFIAPI
InputBarInit (
VOID
)
@@ -37,7 +36,6 @@ InputBarInit (
Cleanup function for input bar.
**/
VOID
-EFIAPI
InputBarCleanup (
VOID
)
@@ -59,7 +57,6 @@ InputBarCleanup (
@param[in] LastRow The last printable row.
**/
VOID
-EFIAPI
InputBarPrintInput (
IN UINTN LastColumn,
IN UINTN LastRow
@@ -103,7 +100,7 @@ InputBarPrintInput (
typedef struct {
UINT32 Foreground : 4;
- UINT32 Background : 4;
+ UINT32 Background : 3;
} INPUT_BAR_COLOR_ATTRIBUTES;
typedef union {
@@ -121,7 +118,6 @@ typedef union {
@retval EFI_SUCCESS The operation was successful.
**/
EFI_STATUS
-EFIAPI
InputBarRefresh (
UINTN LastRow,
UINTN LastColumn
@@ -133,8 +129,6 @@ InputBarRefresh (
UINTN Size;
EFI_STATUS Status;
BOOLEAN NoDisplay;
- UINTN Limit;
- UINTN mPromptLen;
UINTN EventIndex;
UINTN CursorRow;
UINTN CursorCol;
@@ -151,10 +145,11 @@ InputBarRefresh (
CursorCol = gST->ConOut->Mode->CursorColumn;
CursorRow = gST->ConOut->Mode->CursorRow;
Orig.Data = gST->ConOut->Mode->Attribute;
- New.Colors.Foreground = Orig.Colors.Background;
- New.Colors.Background = Orig.Colors.Foreground;
+ New.Data = 0;
+ New.Colors.Foreground = Orig.Colors.Background & 0xF;
+ New.Colors.Background = Orig.Colors.Foreground & 0x7;
- gST->ConOut->SetAttribute (gST->ConOut, New.Data);
+ gST->ConOut->SetAttribute (gST->ConOut, New.Data & 0x7F);
//
// clear input bar
@@ -164,12 +159,6 @@ InputBarRefresh (
gST->ConOut->SetCursorPosition (gST->ConOut, 0, LastRow - 1);
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_EDIT_LIBINPUTBAR_MAININPUTBAR), gShellDebug1HiiHandle, mPrompt);
- //
- // that's the maximum input length that can be displayed on screen
- //
- mPromptLen = StrLen (mPrompt);
- Limit = LastColumn - mPromptLen;
-
//
// this is a selection mPrompt, cursor will stay in edit area
// actually this is for search , search/replace
@@ -268,7 +257,6 @@ InputBarRefresh (
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
**/
EFI_STATUS
-EFIAPI
InputBarSetPrompt (
IN CONST CHAR16 *Str
)
@@ -295,7 +283,6 @@ InputBarSetPrompt (
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
**/
EFI_STATUS
-EFIAPI
InputBarSetStringSize (
UINTN Size
)
@@ -321,7 +308,6 @@ InputBarSetStringSize (
@return The string that was input.
**/
CONST CHAR16*
-EFIAPI
InputBarGetString (
VOID
)