]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c
ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / HexEdit / BufferImage.c
index ba15a49ce101d338f1d3f66ae27619531b5145e2..68d2443d2e5ed7f57dfb2fc7782fd2d74d81221d 100644 (file)
@@ -2,7 +2,7 @@
   Defines HBufferImage - the view of the file that is visible at any point,\r
   as well as the event handlers for editing the file\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
@@ -184,7 +184,7 @@ HBufferImageBackup (
   return EFI_SUCCESS;\r
 }\r
 \r
-/**
+/**\r
   Free all the lines in HBufferImage.\r
     Fields affected:\r
     Lines\r
@@ -318,9 +318,9 @@ HBufferImagePrintLine (
     }\r
 \r
     if (BeNewColor) {\r
-      gST->ConOut->SetAttribute (gST->ConOut, New.Data);\r
+      gST->ConOut->SetAttribute (gST->ConOut, New.Data & 0x7F);\r
     } else {\r
-      gST->ConOut->SetAttribute (gST->ConOut, Orig.Data);\r
+      gST->ConOut->SetAttribute (gST->ConOut, Orig.Data & 0x7F);\r
     }\r
 \r
     Pos = 10 + (Index * 3);\r
@@ -337,7 +337,7 @@ HBufferImagePrintLine (
 \r
   }\r
 \r
-  gST->ConOut->SetAttribute (gST->ConOut, Orig.Data);\r
+  gST->ConOut->SetAttribute (gST->ConOut, Orig.Data & 0x7F);\r
   while (Index < 0x08) {\r
     Pos = 10 + (Index * 3);\r
     ShellPrintEx ((INT32)Pos - 1, (INT32)Row - 1, L"    ");\r
@@ -355,9 +355,9 @@ HBufferImagePrintLine (
     }\r
 \r
     if (BeNewColor) {\r
-      gST->ConOut->SetAttribute (gST->ConOut, New.Data);\r
+      gST->ConOut->SetAttribute (gST->ConOut, New.Data & 0x7F);\r
     } else {\r
-      gST->ConOut->SetAttribute (gST->ConOut, Orig.Data);\r
+      gST->ConOut->SetAttribute (gST->ConOut, Orig.Data & 0x7F);\r
     }\r
 \r
     Pos = 10 + (Index * 3) + 1;\r
@@ -370,7 +370,7 @@ HBufferImagePrintLine (
     Index++;\r
   }\r
 \r
-  gST->ConOut->SetAttribute (gST->ConOut, Orig.Data);\r
+  gST->ConOut->SetAttribute (gST->ConOut, Orig.Data & 0x7F);\r
   while (Index < 0x10) {\r
     Pos = 10 + (Index * 3) + 1;\r
     ShellPrintEx ((INT32)Pos - 1, (INT32)Row - 1, L"   ");\r
@@ -379,7 +379,7 @@ HBufferImagePrintLine (
   //\r
   // restore the original color\r
   //\r
-  gST->ConOut->SetAttribute (gST->ConOut, Orig.Data);\r
+  gST->ConOut->SetAttribute (gST->ConOut, Orig.Data & 0x7F);\r
 \r
   //\r
   // PRINT the buffer content\r
@@ -581,8 +581,8 @@ HBufferImageRestoreMousePosition (
       //\r
       Orig                  = HMainEditor.ColorAttributes;\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
       //\r
       // if in selected area,\r
@@ -594,7 +594,7 @@ HBufferImageRestoreMousePosition (
             )) {\r
         gST->ConOut->SetAttribute (gST->ConOut, Orig.Data);\r
       } else {\r
-        gST->ConOut->SetAttribute (gST->ConOut, New.Data);\r
+        gST->ConOut->SetAttribute (gST->ConOut, New.Data & 0x7F);\r
       }\r
       //\r
       // clear the old mouse position\r
@@ -646,7 +646,7 @@ HBufferImageRestoreMousePosition (
             HBufferImage.MousePosition.Row,\r
             HBufferImage.MousePosition.Column\r
             )) {\r
-        gST->ConOut->SetAttribute (gST->ConOut, New.Data);\r
+        gST->ConOut->SetAttribute (gST->ConOut, New.Data & 0x7F);\r
       } else {\r
         gST->ConOut->SetAttribute (gST->ConOut, Orig.Data);\r
       }\r
@@ -732,7 +732,7 @@ HBufferImageRestorePosition (
   return EFI_SUCCESS;\r
 }\r
 \r
-/**
+/**\r
   Refresh function for HBufferImage.\r
 \r
   @retval EFI_SUCCESS     The operation was successful.\r
@@ -906,7 +906,6 @@ HBufferImageRefresh (
   @return EFI_SUCCESS     The operation was successful.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 HBufferImageRead (\r
   IN CONST CHAR16                   *FileName,\r
   IN CONST CHAR16                   *DiskName,\r
@@ -1027,7 +1026,7 @@ HBufferImageSave (
   return Status;\r
 }\r
 \r
-/**
+/**\r
   Create a new line and append it to the line list.\r
     Fields affected:\r
     NumLines\r
@@ -1074,7 +1073,7 @@ HBufferImageCreateLine (
   return Line;\r
 }\r
 \r
-/**
+/**\r
   Free the current image.\r
 \r
   @retval EFI_SUCCESS   The operation was successful.\r
@@ -1092,7 +1091,7 @@ HBufferImageFree (
   return EFI_SUCCESS;\r
 }\r
 \r
-/**
+/**\r
   change char to int value based on Hex.\r
 \r
   @param[in] Char     The input char.\r
@@ -1101,7 +1100,6 @@ HBufferImageFree (
   @retval -1  The operation failed.\r
 **/\r
 INTN\r
-EFIAPI\r
 HBufferImageCharToHex (\r
   IN CHAR16 Char\r
   )\r
@@ -1133,7 +1131,6 @@ HBufferImageCharToHex (
   @retval EFI_OUT_OF_RESOURCES    A memory allocation failed.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 HBufferImageAddChar (\r
   IN  CHAR16  Char\r
   )\r
@@ -1264,7 +1261,6 @@ HBufferImageAddChar (
   @retval EFI_SUCCESS   The operationw as successful.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 HBufferImageDoBackspace (\r
   VOID\r
   )\r
@@ -1328,7 +1324,6 @@ HBufferImageDoBackspace (
   @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 HBufferImageDoCharInput (\r
   IN  CHAR16  Char\r
   )\r
@@ -2119,7 +2114,6 @@ HBufferImageAddCharacterToBuffer (
   @retval EFI_SUCCESS   The operationw as successful.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 HBufferImageDoDelete (\r
   VOID\r
   )\r
@@ -2180,7 +2174,6 @@ HBufferImageDoDelete (
   @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 HBufferImageBufferToList (\r
   IN VOID   *Buffer,\r
   IN UINTN  Bytes\r
@@ -2245,7 +2238,6 @@ HBufferImageBufferToList (
   @retval EFI_SUCCESS   The operation was successful.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 HBufferImageListToBuffer (\r
   IN VOID   *Buffer,\r
   IN UINTN  Bytes\r
@@ -2300,7 +2292,6 @@ HBufferImageListToBuffer (
   @param[in] TextY    The y-coordinate.\r
 **/\r
 VOID\r
-EFIAPI\r
 HBufferImageAdjustMousePosition (\r
   IN INT32 TextX,\r
   IN INT32 TextY\r