]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c
ShellPkg: update smbiosview for SMBIOS 3.0.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / EditStatusBar.c
index ff3f465ad711f84af314d3b4651ee5c3cc8ab896..fbf48b7e2b164cd0f93b40afe3359963fc5c6eae 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 - 2014, 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
@@ -62,7 +62,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
@@ -111,16 +111,17 @@ StatusBarRefresh (
   // back up the screen attributes\r
   //\r
   Orig.Data             = gST->ConOut->Mode->Attribute;\r
-  New.Colors.Foreground = Orig.Colors.Background;\r
-  New.Colors.Background = Orig.Colors.Foreground;\r
+  New.Data              = 0;\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
   //\r
-  EditorClearLine (LastRow - 3, LastCol, LastRow);\r
+  EditorClearLine (LastRow, LastCol, LastRow);\r
 \r
   //\r
   // print row, column fields\r
@@ -128,8 +129,8 @@ StatusBarRefresh (
   if (FileRow != (UINTN)(-1) && FileCol != (UINTN)(-1)) {\r
     ShellPrintEx (\r
       0,\r
-      (INT32)(LastRow) - 4,\r
-      L"  Row: %d  Col: %d       %s",\r
+      (INT32)(LastRow) - 1,\r
+      L" %d,%d       %s",\r
       FileRow,\r
       FileCol,\r
       StatusString\r
@@ -137,7 +138,7 @@ StatusBarRefresh (
   } else {\r
     ShellPrintEx (\r
       0,\r
-      (INT32)(LastRow) - 4,\r
+      (INT32)(LastRow) - 1,\r
       L"  %s",\r
       StatusString\r
       );\r
@@ -147,9 +148,9 @@ StatusBarRefresh (
   // print insert mode field\r
   //\r
   if (InsertMode) {\r
-    ShellPrintEx ((INT32)(LastCol) - 10, (INT32)(LastRow) - 4, L"|%s|", L"INS");\r
+    ShellPrintEx ((INT32)(LastCol) - 21, (INT32)(LastRow) - 1, L"|%s|   Help: Ctrl-E", L"INS");\r
   } else {\r
-    ShellPrintEx ((INT32)(LastCol) - 10, (INT32)(LastRow) - 4, L"|%s|", L"OVR");\r
+    ShellPrintEx ((INT32)(LastCol) - 21, (INT32)(LastRow) - 1, L"|%s|   Help: Ctrl-E", L"OVR");\r
   }\r
   //\r
   // restore the old screen attributes\r