]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c
1. Use MemoryAllocationLib to replace boot services memory services functions in...
[mirror_edk2.git] / EdkModulePkg / Universal / UserInterface / SetupBrowser / Dxe / Presentation.c
index cf3d0004d9be707b07d9cc05374e5acb60cc2e29..6bbe810ee2c184fab2138c70b8e53c72eaa9c5ff 100644 (file)
@@ -1,15 +1,15 @@
 /*++\r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. 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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2007, Intel Corporation\r
+All rights reserved. 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
-        Presentation.c\r
+  Presentation.c\r
 \r
 Abstract:\r
 \r
@@ -60,7 +60,7 @@ ClearLines (
 \r
   gST->ConOut->SetCursorPosition (gST->ConOut, LeftColumn, TopRow);\r
 \r
-  gBS->FreePool (Buffer);\r
+  FreePool (Buffer);\r
   return ;\r
 }\r
 \r
@@ -237,7 +237,7 @@ DisplayPageFrame (
           break;\r
         }\r
 \r
-        gBS->FreePool (StrFrontPageBanner);\r
+        FreePool (StrFrontPageBanner);\r
       }\r
     }\r
   }\r
@@ -318,7 +318,7 @@ DisplayPageFrame (
     }\r
   }\r
 \r
-  gBS->FreePool (Buffer);\r
+  FreePool (Buffer);\r
 \r
 }\r
 \r
@@ -327,7 +327,7 @@ DisplayPageFrame (
 ?F2=Previous Page                 Setup Page                                  ?\r
 +------------------------------------------------------------------------------+\r
 \r
-    \r
+\r
 \r
 \r
 \r
@@ -348,6 +348,7 @@ DisplayPageFrame (
 | ^"=Move Highlight          <Spacebar> Toggles Checkbox   Esc=Discard Changes |\r
 +------------------------------------------------------------------------------+\r
 */\r
+STATIC\r
 UI_MENU_OPTION *\r
 DisplayForm (\r
   OUT UI_MENU_OPTION              *Selection,\r
@@ -436,7 +437,7 @@ DisplayForm (
   //\r
   // Remove Buffer allocated for StringPtr after it has been used.\r
   //\r
-  gBS->FreePool (StringPtr);\r
+  FreePool (StringPtr);\r
 \r
   for (Index = 0; FormTags.Tags[Index].Operand != EFI_IFR_END_FORM_OP; Index++) {\r
     GrayOut       = FALSE;\r
@@ -594,7 +595,7 @@ GetOut:
             FormTags.Tags[Index].NumberOfLines++;\r
           }\r
 \r
-          gBS->FreePool (OutputString);\r
+          FreePool (OutputString);\r
         }\r
 \r
         ArrayEntry = 0;\r
@@ -732,7 +733,7 @@ Returns:
         PrintStringAt (SecCol, BottomRowOfHelp, gEnterString);\r
       }\r
     } else {\r
-      PrintStringAt (StartColumnOfHelp, BottomRowOfHelp, gEnterCommitString);\r
+      PrintStringAt (SecCol, BottomRowOfHelp, gEnterCommitString);\r
 \r
       //\r
       // If it is a selected numeric with manual input, display different message\r
@@ -740,7 +741,7 @@ Returns:
       if ((Selection->ThisTag->Operand == EFI_IFR_NUMERIC_OP) && (Selection->ThisTag->Step == 0)) {\r
         PrintStringAt (SecCol, TopRowOfHelp, gNumericInput);\r
       } else if (Selection->ThisTag->Operand != EFI_IFR_ORDERED_LIST_OP) {\r
-        PrintAt (SecCol, BottomRowOfHelp, (CHAR16 *) L"%c%c%s", ARROW_UP, ARROW_DOWN, gMoveHighlight);\r
+        PrintAt (StartColumnOfHelp, BottomRowOfHelp, L"%c%c%s", ARROW_UP, ARROW_DOWN, gMoveHighlight);\r
       }\r
 \r
       if (Selection->ThisTag->Operand == EFI_IFR_ORDERED_LIST_OP) {\r
@@ -796,6 +797,7 @@ Returns:
 \r
 }\r
 \r
+STATIC\r
 VOID\r
 ExtractFormHandle (\r
   IN  UI_MENU_OPTION              *Selection,\r
@@ -851,6 +853,7 @@ ExtractFormHandle (
   return ;\r
 }\r
 \r
+STATIC\r
 EFI_STATUS\r
 UpdateNewTagData (\r
   IN  UINT8                                     *FormData,\r
@@ -1092,6 +1095,7 @@ UpdateNewTagData (
   return Status;\r
 }\r
 \r
+STATIC\r
 VOID\r
 ExtractDynamicFormHandle (\r
   IN  UI_MENU_OPTION              *Selection,\r
@@ -1109,9 +1113,9 @@ Routine Description:
   The function does the most of the works when the EFI_TAG that\r
   user selects on is EFI_IFR_FLAG_INTERACTIVE or EFI_IFR_PASSWORD_OP:\r
   invoke CallBack, update the new form data.\r
-  \r
+\r
 Arguments:\r
-  \r
+\r
   Selection         - The current selection of the form.\r
   CallbackData      - The pointer to host the data passed back by the callback function.\r
   FileFormTagsHead  - Prompt string token of the one-of box\r
@@ -1119,10 +1123,10 @@ Arguments:
   FormHandle        - Output the  the handle of the form.\r
   TitleToken        - Output the  TitleToken of the new page.\r
   FormTags          - Output the  FormFags of the new page.\r
-  \r
-Returns: \r
+\r
+Returns:\r
   VOID\r
-  \r
+\r
 --*/\r
 {\r
   UINTN                       Index;\r
@@ -1208,7 +1212,7 @@ Returns:
                   );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    gBS->FreePool (LocalTags->Tags);\r
+    FreePool (LocalTags->Tags);\r
     return ;\r
   }\r
 \r
@@ -1313,7 +1317,7 @@ Returns:
   }\r
 \r
   if (Packet != NULL) {\r
-    gBS->FreePool (Packet);\r
+    FreePool (Packet);\r
   }\r
 \r
   for (BackupIndex = 0; LocalTags->Tags[BackupIndex].Operand != EFI_IFR_END_FORM_OP; BackupIndex++) {\r
@@ -1343,7 +1347,7 @@ Returns:
   // Delete the buffer associated with previous dynamic page\r
   // We will re-allocate a buffer....\r
   //\r
-  gBS->FreePool (LocalTags->Tags);\r
+  FreePool (LocalTags->Tags);\r
 \r
   Length  = 0xF000;\r
   Buffer  = AllocateZeroPool (Length);\r