]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c
ShellPkg-UefiShellLib: Add a function to fully-qualify paths
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / EditStatusBar.c
index cf885c25491568bfafc802b63ca2ead3776c8023..f0110333b79a36fd6a207cea88519b0372205367 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implements statusbar interface functions.\r
 \r
-  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -27,7 +27,6 @@ BOOLEAN StatusStringChanged;
   @sa StatusBarSetStatusString\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 StatusBarInit (\r
   VOID\r
   )\r
@@ -49,7 +48,6 @@ StatusBarInit (
   Cleanup function for the status bar.\r
 **/\r
 VOID\r
-EFIAPI\r
 StatusBarCleanup (\r
   VOID\r
   )\r
@@ -62,7 +60,7 @@ StatusBarCleanup (
 \r
 typedef struct {\r
   UINT32  Foreground : 4;\r
-  UINT32  Background : 4;\r
+  UINT32  Background : 3;\r
 } STATUS_BAR_COLOR_ATTRIBUTES;\r
 \r
 typedef union {\r
@@ -73,7 +71,7 @@ typedef union {
 /**\r
   Cause the status bar to refresh it's printing on the screen.\r
 \r
-  @param[in] EditorFirst      TRUE to indicate the first launch of the editor.  \r
+  @param[in] EditorFirst      TRUE to indicate the first launch of the editor.\r
                               FALSE otherwise.\r
   @param[in] LastRow          LastPrintable row.\r
   @param[in] LastCol          Last printable column.\r
@@ -84,7 +82,6 @@ typedef union {
   @retval EFI_SUCCESS         The operation was successful.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 StatusBarRefresh (\r
   IN BOOLEAN  EditorFirst,\r
   IN UINTN    LastRow,\r
@@ -112,11 +109,11 @@ StatusBarRefresh (
   //\r
   Orig.Data             = gST->ConOut->Mode->Attribute;\r
   New.Data              = 0;\r
-  New.Colors.Foreground = Orig.Colors.Background;\r
-  New.Colors.Background = Orig.Colors.Foreground;\r
+  New.Colors.Foreground = Orig.Colors.Background & 0xF;\r
+  New.Colors.Background = Orig.Colors.Foreground & 0x7;\r
 \r
   gST->ConOut->EnableCursor (gST->ConOut, FALSE);\r
-  gST->ConOut->SetAttribute (gST->ConOut, New.Data);\r
+  gST->ConOut->SetAttribute (gST->ConOut, New.Data & 0x7F);\r
 \r
   //\r
   // clear status bar\r
@@ -177,7 +174,6 @@ StatusBarRefresh (
   @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 StatusBarSetStatusString (\r
   IN CHAR16 *Str\r
   )\r
@@ -202,7 +198,6 @@ StatusBarSetStatusString (
   @return The string that is used.\r
 **/\r
 CONST CHAR16*\r
-EFIAPI\r
 StatusBarGetString (\r
   VOID\r
   )\r
@@ -214,7 +209,6 @@ StatusBarGetString (
   Function to set the need refresh boolean to TRUE.\r
 **/\r
 VOID\r
-EFIAPI\r
 StatusBarSetRefresh(\r
   VOID\r
   )\r
@@ -228,7 +222,6 @@ StatusBarSetRefresh(
   @retval TRUE    The status bar needs to be refreshed.\r
 **/\r
 BOOLEAN\r
-EFIAPI\r
 StatusBarGetRefresh(\r
   VOID\r
   )\r