]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Library/EdkIfrSupportLib/IfrCommon.c
added EFIAPI for those constructor functions
[mirror_edk2.git] / EdkModulePkg / Library / EdkIfrSupportLib / IfrCommon.c
index 6d0a84de5e2ae63d270865e1c229f8c61c31b471..f4d9d4f39e8724c27b159e6b7bb400e740b84015 100644 (file)
@@ -1,12 +1,12 @@
 /*++\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
+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
+        \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
   IfrCommon.c\r
@@ -20,6 +20,7 @@ Revision History:
 --*/\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 IfrLibConstruct (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
@@ -37,12 +38,12 @@ GetCurrentLanguage (
 Routine Description:\r
 \r
   Determine what is the current language setting\r
-  \r
+\r
 Arguments:\r
-  \r
+\r
   Lang      - Pointer of system language\r
-  \r
-Returns: \r
+\r
+Returns:\r
 \r
   Status code\r
 \r
@@ -99,21 +100,21 @@ AddString (
 Routine Description:\r
 \r
   Add a string to the incoming buffer and return the token and offset data\r
-  \r
+\r
 Arguments:\r
-  \r
+\r
   StringBuffer      - The incoming buffer\r
-  \r
+\r
   Language          - Currrent language\r
-  \r
+\r
   String            - The string to be added\r
-  \r
+\r
   StringToken       - The index where the string placed\r
-  \r
-Returns: \r
+\r
+Returns:\r
 \r
   EFI_OUT_OF_RESOURCES    - No enough buffer to allocate\r
-  \r
+\r
   EFI_SUCCESS             - String successfully added to the incoming buffer\r
 \r
 --*/\r
@@ -171,11 +172,11 @@ Returns:
         //\r
         PackDestination[Index] = (UINT16) (PackDestination[Index] + sizeof (RELOFST));\r
       }\r
-      \r
+\r
       //\r
       // Add a new stringpointer in the new buffer since we are adding a string.  Null terminate it\r
       //\r
-      PackDestination[Index] = (UINT16)(PackDestination[Index-1] + \r
+      PackDestination[Index] = (UINT16)(PackDestination[Index-1] +\r
                                         StrSize((CHAR16 *)((CHAR8 *)(StringPack) + PackSource[Index-1])));\r
       PackDestination[Index + 1] = (UINT16) 0;\r
 \r
@@ -206,7 +207,7 @@ Returns:
         Destination = Destination + StrSize ((CHAR16 *) Source);\r
         Source      = Source + StrSize ((CHAR16 *) Source);\r
       }\r
-      \r
+\r
       //\r
       // This copies the new string to the destination buffer\r
       //\r
@@ -238,7 +239,7 @@ Returns:
     StringPackBuffer  = (EFI_HII_STRING_PACK *) ((CHAR8 *) (StringPackBuffer) + StringPack->Header.Length);\r
     StringPack        = (EFI_HII_STRING_PACK *) ((CHAR8 *) (StringPack) + StringPack->Header.Length);\r
   }\r
-  \r
+\r
   //\r
   // If we didn't copy the new data to a stringpack yet\r
   //\r
@@ -316,17 +317,17 @@ AddOpCode (
 Routine Description:\r
 \r
   Add op-code data to the FormBuffer\r
-  \r
+\r
 Arguments:\r
-  \r
+\r
   FormBuffer      - Form buffer to be inserted to\r
-  \r
+\r
   OpCodeData      - Op-code data to be inserted\r
-  \r
-Returns: \r
+\r
+Returns:\r
 \r
   EFI_OUT_OF_RESOURCES    - No enough buffer to allocate\r
-  \r
+\r
   EFI_SUCCESS             - Op-code data successfully inserted\r
 \r
 --*/\r
@@ -432,12 +433,12 @@ GetHiiInterface (
 Routine Description:\r
 \r
   Get the HII protocol interface\r
-  \r
+\r
 Arguments:\r
-  \r
+\r
   Hii     - HII protocol interface\r
-  \r
-Returns: \r
+\r
+Returns:\r
 \r
   Status code\r
 \r
@@ -470,27 +471,27 @@ ExtractDataFromHiiHandle (
 Routine Description:\r
 \r
   Extract information pertaining to the HiiHandle\r
-  \r
+\r
 Arguments:\r
-  \r
+\r
   HiiHandle       - Hii handle\r
-  \r
+\r
   ImageLength     - For input, length of DefaultImage;\r
                     For output, length of actually required\r
-                    \r
+\r
   DefaultImage    - Image buffer prepared by caller\r
-  \r
+\r
   Guid            - Guid information about the form\r
-  \r
-Returns: \r
+\r
+Returns:\r
 \r
   EFI_OUT_OF_RESOURCES    - No enough buffer to allocate\r
-  \r
+\r
   EFI_BUFFER_TOO_SMALL    - DefualtImage has no enough ImageLength\r
-  \r
+\r
   EFI_SUCCESS             - Successfully extract data from Hii database.\r
-  \r
-  \r
+\r
+\r
 --*/\r
 {\r
   EFI_STATUS        Status;\r
@@ -581,7 +582,7 @@ Returns:
 \r
     Index = RawData[Index + 1] + Index;\r
   }\r
-    \r
+\r
   //\r
   // Return an error if buffer is too small\r
   //\r
@@ -649,9 +650,9 @@ Routine Description:
   Finds HII handle for given pack GUID previously registered with the HII.\r
 \r
 Arguments:\r
-  HiiProtocol - pointer to pointer to HII protocol interface. \r
+  HiiProtocol - pointer to pointer to HII protocol interface.\r
                 If NULL, the interface will be found but not returned.\r
-                If it points to NULL, the interface will be found and \r
+                If it points to NULL, the interface will be found and\r
                 written back to the pointer that is pointed to.\r
   Guid        - The GUID of the pack that registered with the HII.\r
 \r
@@ -766,7 +767,7 @@ Routine Description:
   Validate that the data associated with the HiiHandle in NVRAM is within\r
   the reasonable parameters for that FormSet.  Values for strings and passwords\r
   are not verified due to their not having the equivalent of valid range settings.\r
-  \r
+\r
 Arguments:\r
 \r
   HiiHandle -   Handle of the HII database entry to query\r
@@ -774,11 +775,11 @@ Arguments:
   Results -     If return Status is EFI_SUCCESS, Results provides valid data\r
                 TRUE  = NVRAM Data is within parameters\r
                 FALSE = NVRAM Data is NOT within parameters\r
-  \r
-Returns: \r
+\r
+Returns:\r
 \r
   EFI_OUT_OF_RESOURCES      - No enough buffer to allocate\r
-  \r
+\r
   EFI_SUCCESS               - Data successfully validated\r
 --*/\r
 {\r
@@ -880,7 +881,7 @@ Returns:
 \r
     Index = RawData[Index + 1] + Index;\r
   }\r
-    \r
+\r
   //\r
   // Allocate memory for our File Form Tags\r
   //\r