]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Clean up HiiDatabase for Doxygen comments requirement.
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Jul 2008 06:29:27 +0000 (06:29 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Jul 2008 06:29:27 +0000 (06:29 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5467 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c
MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
MdeModulePkg/Universal/HiiDatabaseDxe/R8Lib.c
MdeModulePkg/Universal/HiiDatabaseDxe/R8Lib.h
MdeModulePkg/Universal/HiiDatabaseDxe/String.c

index 8decc76102094fbf3f8f14c719da9543e8afc7fa..d7ae31057370135f9676dce8bcf1cad8dff5fc9b 100644 (file)
@@ -25,19 +25,20 @@ Revision History
 \r
 #include "HiiDatabase.h"\r
 \r
 \r
 #include "HiiDatabase.h"\r
 \r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
 \r
 /**\r
   Calculate the number of Unicode characters of the incoming Configuration string,\r
   not including NULL terminator.\r
 \r
 \r
 /**\r
   Calculate the number of Unicode characters of the incoming Configuration string,\r
   not including NULL terminator.\r
 \r
+  This is a internal function.\r
+\r
   @param  String                 String in <MultiConfigRequest> or\r
                                  <MultiConfigResp> format.\r
 \r
   @return The number of Unicode characters.\r
 \r
 **/\r
   @param  String                 String in <MultiConfigRequest> or\r
                                  <MultiConfigResp> format.\r
 \r
   @return The number of Unicode characters.\r
 \r
 **/\r
-STATIC\r
 UINTN\r
 CalculateConfigStringLen (\r
   IN EFI_STRING                    String\r
 UINTN\r
 CalculateConfigStringLen (\r
   IN EFI_STRING                    String\r
@@ -71,6 +72,8 @@ CalculateConfigStringLen (
   Convert the hex UNICODE %02x encoding of a UEFI device path to binary\r
   from <PathHdr> of <ConfigHdr>.\r
 \r
   Convert the hex UNICODE %02x encoding of a UEFI device path to binary\r
   from <PathHdr> of <ConfigHdr>.\r
 \r
+  This is a internal function.\r
+\r
   @param  String                 UEFI configuration string\r
   @param  DevicePath             binary of a UEFI device path.\r
 \r
   @param  String                 UEFI configuration string\r
   @param  DevicePath             binary of a UEFI device path.\r
 \r
@@ -80,7 +83,6 @@ CalculateConfigStringLen (
                                  binary format.\r
 \r
 **/\r
                                  binary format.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 GetDevicePath (\r
   IN  EFI_STRING                   String,\r
 EFI_STATUS\r
 GetDevicePath (\r
   IN  EFI_STRING                   String,\r
@@ -143,6 +145,8 @@ GetDevicePath (
 /**\r
   Extract Storage from all Form Packages in current hii database.\r
 \r
 /**\r
   Extract Storage from all Form Packages in current hii database.\r
 \r
+  This is a internal function.\r
+\r
   @param  HiiDatabase            EFI_HII_DATABASE_PROTOCOL instance.\r
   @param  StorageListHead        Storage link List head.\r
 \r
   @param  HiiDatabase            EFI_HII_DATABASE_PROTOCOL instance.\r
   @param  StorageListHead        Storage link List head.\r
 \r
@@ -151,7 +155,6 @@ GetDevicePath (
   @retval EFI_SUCCESS            All existing storage is exported.\r
 \r
 **/\r
   @retval EFI_SUCCESS            All existing storage is exported.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ExportAllStorage (\r
   IN EFI_HII_DATABASE_PROTOCOL     *HiiDatabase,\r
 EFI_STATUS\r
 ExportAllStorage (\r
   IN EFI_HII_DATABASE_PROTOCOL     *HiiDatabase,\r
@@ -316,6 +319,8 @@ ExportAllStorage (
 /**\r
   Generate a sub string then output it.\r
 \r
 /**\r
   Generate a sub string then output it.\r
 \r
+  This is a internal function.\r
+\r
   @param  String                 A constant string which is the prefix of the to be\r
                                  generated string, e.g. GUID=\r
   @param  BufferLen              The length of the Buffer in bytes.\r
   @param  String                 A constant string which is the prefix of the to be\r
                                  generated string, e.g. GUID=\r
   @param  BufferLen              The length of the Buffer in bytes.\r
@@ -329,7 +334,6 @@ ExportAllStorage (
 \r
 \r
 **/\r
 \r
 \r
 **/\r
-STATIC\r
 VOID\r
 GenerateSubStr (\r
   IN CONST EFI_STRING              String,\r
 VOID\r
 GenerateSubStr (\r
   IN CONST EFI_STRING              String,\r
@@ -390,6 +394,8 @@ GenerateSubStr (
 /**\r
   Retrieve the <ConfigBody> from String then output it.\r
 \r
 /**\r
   Retrieve the <ConfigBody> from String then output it.\r
 \r
+  This is a internal function.\r
+\r
   @param  String                 A sub string of a configuration string in\r
                                  <MultiConfigAltResp> format.\r
   @param  ConfigBody             Points to the output string. It's caller's\r
   @param  String                 A sub string of a configuration string in\r
                                  <MultiConfigAltResp> format.\r
   @param  ConfigBody             Points to the output string. It's caller's\r
@@ -400,7 +406,6 @@ GenerateSubStr (
   @retval EFI_SUCCESS            All existing storage is exported.\r
 \r
 **/\r
   @retval EFI_SUCCESS            All existing storage is exported.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 OutputConfigBody (\r
   IN  EFI_STRING                   String,\r
 EFI_STATUS\r
 OutputConfigBody (\r
   IN  EFI_STRING                   String,\r
@@ -444,36 +449,33 @@ OutputConfigBody (
 \r
 #endif\r
 \r
 \r
 #endif\r
 \r
+/**\r
+  Adjusts the size of a previously allocated buffer.\r
+\r
+\r
+  @param OldPool         A pointer to the buffer whose size is being adjusted.\r
+  @param OldSize         The size of the current buffer.\r
+  @param NewSize         The size of the new buffer.\r
+\r
+  @return The new buffer allocated.\r
+\r
+**/\r
 VOID *\r
 ReallocatePool (\r
   IN VOID                          *OldPool,\r
   IN UINTN                         OldSize,\r
   IN UINTN                         NewSize\r
   )\r
 VOID *\r
 ReallocatePool (\r
   IN VOID                          *OldPool,\r
   IN UINTN                         OldSize,\r
   IN UINTN                         NewSize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Adjusts the size of a previously allocated buffer.\r
-\r
-Arguments:\r
-  OldPool               - A pointer to the buffer whose size is being adjusted.\r
-  OldSize               - The size of the current buffer.\r
-  NewSize               - The size of the new buffer.\r
-\r
-Returns:\r
-  Points to the new buffer\r
-\r
---*/\r
 {\r
   VOID  *NewPool;\r
 \r
   NewPool = NULL;\r
 {\r
   VOID  *NewPool;\r
 \r
   NewPool = NULL;\r
-  if (NewSize) {\r
+  if (NewSize != 0) {\r
     NewPool = AllocateZeroPool (NewSize);\r
   }\r
 \r
     NewPool = AllocateZeroPool (NewSize);\r
   }\r
 \r
-  if (OldPool) {\r
-    if (NewPool) {\r
+  if (OldPool != NULL) {\r
+    if (NewPool != NULL) {\r
       CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);\r
     }\r
 \r
       CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);\r
     }\r
 \r
@@ -487,6 +489,8 @@ Returns:
 /**\r
   Append a string to a multi-string format.\r
 \r
 /**\r
   Append a string to a multi-string format.\r
 \r
+  This is a internal function.\r
+\r
   @param  MultiString            String in <MultiConfigRequest>,\r
                                  <MultiConfigAltResp>, or <MultiConfigResp>. On\r
                                  input, the buffer length of  this string is\r
   @param  MultiString            String in <MultiConfigRequest>,\r
                                  <MultiConfigAltResp>, or <MultiConfigResp>. On\r
                                  input, the buffer length of  this string is\r
@@ -498,7 +502,6 @@ Returns:
   @retval EFI_SUCCESS            AppendString is append to the end of MultiString\r
 \r
 **/\r
   @retval EFI_SUCCESS            AppendString is append to the end of MultiString\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 AppendToMultiString (\r
   IN OUT EFI_STRING                *MultiString,\r
 EFI_STATUS\r
 AppendToMultiString (\r
   IN OUT EFI_STRING                *MultiString,\r
@@ -541,6 +544,8 @@ AppendToMultiString (
   or WIDTH or VALUE.\r
   <BlockConfig> ::= 'OFFSET='<Number>&'WIDTH='<Number>&'VALUE'=<Number>\r
 \r
   or WIDTH or VALUE.\r
   <BlockConfig> ::= 'OFFSET='<Number>&'WIDTH='<Number>&'VALUE'=<Number>\r
 \r
+  This is a internal function.\r
+\r
   @param  StringPtr              String in <BlockConfig> format and points to the\r
                                  first character of <Number>.\r
   @param  Number                 The output value. Caller takes the responsibility\r
   @param  StringPtr              String in <BlockConfig> format and points to the\r
                                  first character of <Number>.\r
   @param  Number                 The output value. Caller takes the responsibility\r
@@ -553,7 +558,6 @@ AppendToMultiString (
                                  successfully.\r
 \r
 **/\r
                                  successfully.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 GetValueOfNumber (\r
   IN EFI_STRING                    StringPtr,\r
 EFI_STATUS\r
 GetValueOfNumber (\r
   IN EFI_STRING                    StringPtr,\r
@@ -656,7 +660,7 @@ HiiConfigRoutingExtractConfig (
   OUT EFI_STRING                             *Results\r
   )\r
 {\r
   OUT EFI_STRING                             *Results\r
   )\r
 {\r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
 \r
   HII_DATABASE_PRIVATE_DATA           *Private;\r
   EFI_STRING                          StringPtr;\r
 \r
   HII_DATABASE_PRIVATE_DATA           *Private;\r
   EFI_STRING                          StringPtr;\r
@@ -858,7 +862,7 @@ HiiConfigRoutingExportConfig (
   OUT EFI_STRING                             *Results\r
   )\r
 {\r
   OUT EFI_STRING                             *Results\r
   )\r
 {\r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
 \r
   EFI_STATUS                          Status;\r
   HII_DATABASE_PRIVATE_DATA           *Private;\r
 \r
   EFI_STATUS                          Status;\r
   HII_DATABASE_PRIVATE_DATA           *Private;\r
@@ -1085,7 +1089,7 @@ HiiConfigRoutingRouteConfig (
   OUT EFI_STRING                             *Progress\r
   )\r
 {\r
   OUT EFI_STRING                             *Progress\r
   )\r
 {\r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
 \r
   HII_DATABASE_PRIVATE_DATA           *Private;\r
   EFI_STRING                          StringPtr;\r
 \r
   HII_DATABASE_PRIVATE_DATA           *Private;\r
   EFI_STRING                          StringPtr;\r
@@ -1757,22 +1761,33 @@ HiiGetAltCfg (
   OUT EFI_STRING                               *AltCfgResp\r
   )\r
 {\r
   OUT EFI_STRING                               *AltCfgResp\r
   )\r
 {\r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
 \r
   EFI_STATUS                          Status;\r
   EFI_STRING                          StringPtr;\r
 \r
   EFI_STATUS                          Status;\r
   EFI_STRING                          StringPtr;\r
-  EFI_STRING                          HdrStart = NULL;\r
-  EFI_STRING                          HdrEnd   = NULL;\r
+  EFI_STRING                          HdrStart;\r
+  EFI_STRING                          HdrEnd;\r
   EFI_STRING                          TmpPtr;\r
   UINTN                               Length;\r
   EFI_STRING                          TmpPtr;\r
   UINTN                               Length;\r
-  EFI_STRING                          GuidStr  = NULL;\r
-  EFI_STRING                          NameStr  = NULL;\r
-  EFI_STRING                          PathStr  = NULL;\r
-  EFI_STRING                          AltIdStr = NULL;\r
-  EFI_STRING                          Result   = NULL;\r
-  BOOLEAN                             GuidFlag = FALSE;\r
-  BOOLEAN                             NameFlag = FALSE;\r
-  BOOLEAN                             PathFlag = FALSE;\r
+  EFI_STRING                          GuidStr;\r
+  EFI_STRING                          NameStr;\r
+  EFI_STRING                          PathStr;\r
+  EFI_STRING                          AltIdStr;\r
+  EFI_STRING                          Result;\r
+  BOOLEAN                             GuidFlag;\r
+  BOOLEAN                             NameFlag;\r
+  BOOLEAN                             PathFlag;\r
+\r
+  HdrStart = NULL;\r
+  HdrEnd   = NULL;\r
+  GuidStr  = NULL;\r
+  NameStr  = NULL;\r
+  PathStr  = NULL;\r
+  AltIdStr = NULL;\r
+  Result   = NULL;\r
+  GuidFlag = FALSE;\r
+  NameFlag = FALSE;\r
+  PathFlag = FALSE;\r
 \r
   if (This == NULL || Configuration == NULL || AltCfgResp == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
 \r
   if (This == NULL || Configuration == NULL || AltCfgResp == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
index b5a5c43b43c568286eb6152efd6769fba78e2083..dcb56504dc5804d50ebe9e277ce7d1278740e568 100644 (file)
@@ -1,4 +1,6 @@
 /** @file\r
 /** @file\r
+Implementation for EFI_HII_DATABASE_PROTOCOL.\r
+\r
 \r
 Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 \r
 Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -9,17 +11,6 @@ http://opensource.org/licenses/bsd-license.php
 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
-\r
-    Database.c\r
-\r
-Abstract:\r
-\r
-    Implementation for EFI_HII_DATABASE_PROTOCOL.\r
-\r
-Revision History\r
-\r
-\r
 **/\r
 \r
 \r
 **/\r
 \r
 \r
@@ -33,9 +24,10 @@ STATIC EFI_GUID mHiiDatabaseNotifyGuid = HII_DATABASE_NOTIFY_GUID;
 \r
 /**\r
   This function generates a HII_DATABASE_RECORD node and adds into hii database.\r
 \r
 /**\r
   This function generates a HII_DATABASE_RECORD node and adds into hii database.\r
+  This is a internal function.\r
 \r
   @param  Private                hii database private structure\r
 \r
   @param  Private                hii database private structure\r
-  @param  DatabaseRecord         HII_DATABASE_RECORD node which is used to store a\r
+  @param  DatabaseNode           HII_DATABASE_RECORD node which is used to store a\r
                                  package list\r
 \r
   @retval EFI_SUCCESS            A database record is generated successfully.\r
                                  package list\r
 \r
   @retval EFI_SUCCESS            A database record is generated successfully.\r
@@ -44,7 +36,6 @@ STATIC EFI_GUID mHiiDatabaseNotifyGuid = HII_DATABASE_NOTIFY_GUID;
   @retval EFI_INVALID_PARAMETER  Private is NULL or DatabaseRecord is NULL.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Private is NULL or DatabaseRecord is NULL.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 GenerateHiiDatabaseRecord (\r
   IN  HII_DATABASE_PRIVATE_DATA *Private,\r
 EFI_STATUS\r
 GenerateHiiDatabaseRecord (\r
   IN  HII_DATABASE_PRIVATE_DATA *Private,\r
@@ -118,6 +109,7 @@ GenerateHiiDatabaseRecord (
 \r
 /**\r
   This function checks whether a handle is a valid EFI_HII_HANDLE\r
 \r
 /**\r
   This function checks whether a handle is a valid EFI_HII_HANDLE\r
+  This is a internal function.\r
 \r
   @param  Handle                 Pointer to a EFI_HII_HANDLE\r
 \r
 \r
   @param  Handle                 Pointer to a EFI_HII_HANDLE\r
 \r
@@ -148,6 +140,7 @@ IsHiiHandleValid (
 \r
 /**\r
   This function invokes the matching registered function.\r
 \r
 /**\r
   This function invokes the matching registered function.\r
+  This is a internal function.\r
 \r
   @param  Private                HII Database driver private structure.\r
   @param  NotifyType             The type of change concerning the database.\r
 \r
   @param  Private                HII Database driver private structure.\r
   @param  NotifyType             The type of change concerning the database.\r
@@ -162,7 +155,6 @@ IsHiiHandleValid (
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 InvokeRegisteredFunction (\r
   IN HII_DATABASE_PRIVATE_DATA    *Private,\r
 EFI_STATUS\r
 InvokeRegisteredFunction (\r
   IN HII_DATABASE_PRIVATE_DATA    *Private,\r
@@ -357,6 +349,7 @@ InvokeRegisteredFunction (
 \r
 /**\r
   This function insert a GUID package to a package list node.\r
 \r
 /**\r
   This function insert a GUID package to a package list node.\r
+  This is a internal function.\r
 \r
   @param  PackageHdr             Pointer to a buffer stored with GUID package\r
                                  information.\r
 \r
   @param  PackageHdr             Pointer to a buffer stored with GUID package\r
                                  information.\r
@@ -371,7 +364,6 @@ InvokeRegisteredFunction (
   @retval EFI_INVALID_PARAMETER  PackageHdr is NULL or PackageList is NULL.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  PackageHdr is NULL or PackageList is NULL.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 InsertGuidPackage (\r
   IN     VOID                               *PackageHdr,\r
 EFI_STATUS\r
 InsertGuidPackage (\r
   IN     VOID                               *PackageHdr,\r
@@ -417,6 +409,7 @@ InsertGuidPackage (
 \r
 /**\r
   This function exports GUID packages to a buffer.\r
 \r
 /**\r
   This function exports GUID packages to a buffer.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
@@ -431,7 +424,6 @@ InsertGuidPackage (
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ExportGuidPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 ExportGuidPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -485,6 +477,7 @@ ExportGuidPackages (
 \r
 /**\r
   This function deletes all GUID packages from a package list node.\r
 \r
 /**\r
   This function deletes all GUID packages from a package list node.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
@@ -496,7 +489,6 @@ ExportGuidPackages (
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 RemoveGuidPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 RemoveGuidPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -542,6 +534,7 @@ RemoveGuidPackages (
 \r
 /**\r
   This function insert a Form package to a package list node.\r
 \r
 /**\r
   This function insert a Form package to a package list node.\r
+  This is a internal function.\r
 \r
   @param  PackageHdr             Pointer to a buffer stored with Form package\r
                                  information.\r
 \r
   @param  PackageHdr             Pointer to a buffer stored with Form package\r
                                  information.\r
@@ -556,7 +549,6 @@ RemoveGuidPackages (
   @retval EFI_INVALID_PARAMETER  PackageHdr is NULL or PackageList is NULL.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  PackageHdr is NULL or PackageList is NULL.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 InsertFormPackage (\r
   IN     VOID                               *PackageHdr,\r
 EFI_STATUS\r
 InsertFormPackage (\r
   IN     VOID                               *PackageHdr,\r
@@ -618,6 +610,7 @@ InsertFormPackage (
 \r
 /**\r
   This function exports Form packages to a buffer.\r
 \r
 /**\r
   This function exports Form packages to a buffer.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
@@ -632,7 +625,6 @@ InsertFormPackage (
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ExportFormPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 ExportFormPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -701,6 +693,7 @@ ExportFormPackages (
 \r
 /**\r
   This function deletes all Form packages from a package list node.\r
 \r
 /**\r
   This function deletes all Form packages from a package list node.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
@@ -712,7 +705,6 @@ ExportFormPackages (
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 RemoveFormPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 RemoveFormPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -758,6 +750,7 @@ RemoveFormPackages (
 \r
 /**\r
   This function insert a String package to a package list node.\r
 \r
 /**\r
   This function insert a String package to a package list node.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  PackageHdr             Pointer to a buffer stored with String package\r
 \r
   @param  Private                Hii database private structure.\r
   @param  PackageHdr             Pointer to a buffer stored with String package\r
@@ -775,7 +768,6 @@ RemoveFormPackages (
                                  exists in current package list.\r
 \r
 **/\r
                                  exists in current package list.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 InsertStringPackage (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 InsertStringPackage (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -894,6 +886,7 @@ Error:
 \r
 /**\r
   This function exports String packages to a buffer.\r
 \r
 /**\r
   This function exports String packages to a buffer.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
@@ -908,7 +901,6 @@ Error:
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ExportStringPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 ExportStringPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -976,6 +968,7 @@ ExportStringPackages (
 \r
 /**\r
   This function deletes all String packages from a package list node.\r
 \r
 /**\r
   This function deletes all String packages from a package list node.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
@@ -987,7 +980,6 @@ ExportStringPackages (
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 RemoveStringPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 RemoveStringPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -1047,6 +1039,7 @@ RemoveStringPackages (
 \r
 /**\r
   This function insert a Font package to a package list node.\r
 \r
 /**\r
   This function insert a Font package to a package list node.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  PackageHdr             Pointer to a buffer stored with Font package\r
 \r
   @param  Private                Hii database private structure.\r
   @param  PackageHdr             Pointer to a buffer stored with Font package\r
@@ -1064,7 +1057,6 @@ RemoveStringPackages (
                                  exists in current hii database.\r
 \r
 **/\r
                                  exists in current hii database.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 InsertFontPackage (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 InsertFontPackage (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -1190,6 +1182,7 @@ Error:
 \r
 /**\r
   This function exports Font packages to a buffer.\r
 \r
 /**\r
   This function exports Font packages to a buffer.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
@@ -1204,7 +1197,6 @@ Error:
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ExportFontPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 ExportFontPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -1273,6 +1265,7 @@ ExportFontPackages (
 \r
 /**\r
   This function deletes all Font packages from a package list node.\r
 \r
 /**\r
   This function deletes all Font packages from a package list node.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
@@ -1284,7 +1277,6 @@ ExportFontPackages (
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 RemoveFontPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 RemoveFontPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -1359,6 +1351,7 @@ RemoveFontPackages (
 \r
 /**\r
   This function insert a Image package to a package list node.\r
 \r
 /**\r
   This function insert a Image package to a package list node.\r
+  This is a internal function.\r
 \r
   @param  PackageHdr             Pointer to a buffer stored with Image package\r
                                  information.\r
 \r
   @param  PackageHdr             Pointer to a buffer stored with Image package\r
                                  information.\r
@@ -1373,7 +1366,6 @@ RemoveFontPackages (
   @retval EFI_INVALID_PARAMETER  PackageHdr is NULL or PackageList is NULL.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  PackageHdr is NULL or PackageList is NULL.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 InsertImagePackage (\r
   IN     VOID                               *PackageHdr,\r
 EFI_STATUS\r
 InsertImagePackage (\r
   IN     VOID                               *PackageHdr,\r
@@ -1484,6 +1476,7 @@ InsertImagePackage (
 \r
 /**\r
   This function exports Image packages to a buffer.\r
 \r
 /**\r
   This function exports Image packages to a buffer.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
@@ -1498,7 +1491,6 @@ InsertImagePackage (
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ExportImagePackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 ExportImagePackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -1575,6 +1567,7 @@ ExportImagePackages (
 \r
 /**\r
   This function deletes Image package from a package list node.\r
 \r
 /**\r
   This function deletes Image package from a package list node.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
@@ -1586,7 +1579,6 @@ ExportImagePackages (
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 RemoveImagePackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 RemoveImagePackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -1631,6 +1623,7 @@ RemoveImagePackages (
 \r
 /**\r
   This function insert a Simple Font package to a package list node.\r
 \r
 /**\r
   This function insert a Simple Font package to a package list node.\r
+  This is a internal function.\r
 \r
   @param  PackageHdr             Pointer to a buffer stored with Simple Font\r
                                  package information.\r
 \r
   @param  PackageHdr             Pointer to a buffer stored with Simple Font\r
                                  package information.\r
@@ -1645,7 +1638,6 @@ RemoveImagePackages (
   @retval EFI_INVALID_PARAMETER  PackageHdr is NULL or PackageList is NULL.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  PackageHdr is NULL or PackageList is NULL.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 InsertSimpleFontPackage (\r
   IN     VOID                               *PackageHdr,\r
 EFI_STATUS\r
 InsertSimpleFontPackage (\r
   IN     VOID                               *PackageHdr,\r
@@ -1707,6 +1699,7 @@ Error:
 \r
 /**\r
   This function exports SimpleFont packages to a buffer.\r
 \r
 /**\r
   This function exports SimpleFont packages to a buffer.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
@@ -1721,7 +1714,6 @@ Error:
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ExportSimpleFontPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 ExportSimpleFontPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -1780,6 +1772,7 @@ ExportSimpleFontPackages (
 \r
 /**\r
   This function deletes all Simple Font packages from a package list node.\r
 \r
 /**\r
   This function deletes all Simple Font packages from a package list node.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
@@ -1791,7 +1784,6 @@ ExportSimpleFontPackages (
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 RemoveSimpleFontPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 RemoveSimpleFontPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -1835,6 +1827,7 @@ RemoveSimpleFontPackages (
 \r
 /**\r
   This function insert a Device path package to a package list node.\r
 \r
 /**\r
   This function insert a Device path package to a package list node.\r
+  This is a internal function.\r
 \r
   @param  DevicePath             Pointer to a EFI_DEVICE_PATH_PROTOCOL protocol\r
                                  instance\r
 \r
   @param  DevicePath             Pointer to a EFI_DEVICE_PATH_PROTOCOL protocol\r
                                  instance\r
@@ -1848,7 +1841,6 @@ RemoveSimpleFontPackages (
   @retval EFI_INVALID_PARAMETER  DevicePath is NULL or PackageList is NULL.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  DevicePath is NULL or PackageList is NULL.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 InsertDevicePathPackage (\r
   IN     EFI_DEVICE_PATH_PROTOCOL           *DevicePath,\r
 EFI_STATUS\r
 InsertDevicePathPackage (\r
   IN     EFI_DEVICE_PATH_PROTOCOL           *DevicePath,\r
@@ -1895,6 +1887,7 @@ InsertDevicePathPackage (
 \r
 /**\r
   This function exports device path package to a buffer.\r
 \r
 /**\r
   This function exports device path package to a buffer.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
@@ -1909,7 +1902,6 @@ InsertDevicePathPackage (
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ExportDevicePathPackage (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 ExportDevicePathPackage (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -1966,6 +1958,7 @@ ExportDevicePathPackage (
 \r
 /**\r
   This function deletes Device Path package from a package list node.\r
 \r
 /**\r
   This function deletes Device Path package from a package list node.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list.\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list.\r
@@ -1976,7 +1969,6 @@ ExportDevicePathPackage (
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 RemoveDevicePathPackage (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 RemoveDevicePathPackage (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -2022,6 +2014,7 @@ RemoveDevicePathPackage (
 /**\r
   This function will insert a device path package to package list firstly then\r
   invoke notification functions if any.\r
 /**\r
   This function will insert a device path package to package list firstly then\r
   invoke notification functions if any.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  NotifyType             The type of change concerning the database.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  NotifyType             The type of change concerning the database.\r
@@ -2036,7 +2029,6 @@ RemoveDevicePathPackage (
   @retval EFI_INVALID_PARAMETER  DevicePath is NULL or PackageList is NULL.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  DevicePath is NULL or PackageList is NULL.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 AddDevicePathPackage (\r
   IN HII_DATABASE_PRIVATE_DATA        *Private,\r
 EFI_STATUS\r
 AddDevicePathPackage (\r
   IN HII_DATABASE_PRIVATE_DATA        *Private,\r
@@ -2078,6 +2070,7 @@ AddDevicePathPackage (
 \r
 /**\r
   This function insert a Keyboard Layout package to a package list node.\r
 \r
 /**\r
   This function insert a Keyboard Layout package to a package list node.\r
+  This is a internal function.\r
 \r
   @param  PackageHdr             Pointer to a buffer stored with Keyboard Layout\r
                                  package information.\r
 \r
   @param  PackageHdr             Pointer to a buffer stored with Keyboard Layout\r
                                  package information.\r
@@ -2092,7 +2085,6 @@ AddDevicePathPackage (
   @retval EFI_INVALID_PARAMETER  PackageHdr is NULL or PackageList is NULL.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  PackageHdr is NULL or PackageList is NULL.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 InsertKeyboardLayoutPackage (\r
   IN     VOID                               *PackageHdr,\r
 EFI_STATUS\r
 InsertKeyboardLayoutPackage (\r
   IN     VOID                               *PackageHdr,\r
@@ -2149,6 +2141,7 @@ Error:
 \r
 /**\r
   This function exports Keyboard Layout packages to a buffer.\r
 \r
 /**\r
   This function exports Keyboard Layout packages to a buffer.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
 \r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
@@ -2164,7 +2157,6 @@ Error:
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ExportKeyboardLayoutPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 ExportKeyboardLayoutPackages (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -2225,6 +2217,7 @@ ExportKeyboardLayoutPackages (
 \r
 /**\r
   This function deletes all Keyboard Layout packages from a package list node.\r
 \r
 /**\r
   This function deletes all Keyboard Layout packages from a package list node.\r
+  This is a internal function.\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
 \r
   @param  Private                Hii database private data.\r
   @param  Handle                 Handle of the package list which contains the to\r
@@ -2237,7 +2230,6 @@ ExportKeyboardLayoutPackages (
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 RemoveKeyboardLayoutPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 RemoveKeyboardLayoutPackages (\r
   IN     HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -2286,6 +2278,8 @@ RemoveKeyboardLayoutPackages (
   invoke notification functions if any. It is the worker function of\r
   HiiNewPackageList and HiiUpdatePackageList.\r
 \r
   invoke notification functions if any. It is the worker function of\r
   HiiNewPackageList and HiiUpdatePackageList.\r
 \r
+  This is a internal function.\r
+\r
   @param  Private                Hii database private structure.\r
   @param  NotifyType             The type of change concerning the database.\r
   @param  PackageList            Pointer to a package list.\r
   @param  Private                Hii database private structure.\r
   @param  NotifyType             The type of change concerning the database.\r
   @param  PackageList            Pointer to a package list.\r
@@ -2299,7 +2293,6 @@ RemoveKeyboardLayoutPackages (
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 AddPackages (\r
   IN HII_DATABASE_PRIVATE_DATA         *Private,\r
 EFI_STATUS\r
 AddPackages (\r
   IN HII_DATABASE_PRIVATE_DATA         *Private,\r
@@ -2503,6 +2496,8 @@ AddPackages (
   This function exports a package list to a buffer. It is the worker function\r
   of HiiExportPackageList.\r
 \r
   This function exports a package list to a buffer. It is the worker function\r
   of HiiExportPackageList.\r
 \r
+  This is a internal function.\r
+\r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
   @param  PackageList            Pointer to a package list which will be exported.\r
   @param  Private                Hii database private structure.\r
   @param  Handle                 Identification of a package list.\r
   @param  PackageList            Pointer to a package list which will be exported.\r
@@ -2516,7 +2511,6 @@ AddPackages (
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ExportPackageList (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
 EFI_STATUS\r
 ExportPackageList (\r
   IN HII_DATABASE_PRIVATE_DATA          *Private,\r
@@ -3336,7 +3330,7 @@ HiiRegisterPackageNotify (
 \r
   @param  This                   A pointer to the EFI_HII_DATABASE_PROTOCOL\r
                                  instance.\r
 \r
   @param  This                   A pointer to the EFI_HII_DATABASE_PROTOCOL\r
                                  instance.\r
-  @param  NotifyHandle           The handle of the notification function being\r
+  @param  NotificationHandle     The handle of the notification function being\r
                                  unregistered.\r
 \r
   @retval EFI_SUCCESS            Notification is unregistered successfully.\r
                                  unregistered.\r
 \r
   @retval EFI_SUCCESS            Notification is unregistered successfully.\r
index 9e99a120125548e5faeaea6ef6efd29bb9cfc60f..9c68ac89b64d95640e84c6ec8b3beb92de70be46 100644 (file)
@@ -1,4 +1,6 @@
 /** @file\r
 /** @file\r
+Implementation for EFI_HII_FONT_PROTOCOL.\r
+\r
 \r
 Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 \r
 Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -9,23 +11,12 @@ http://opensource.org/licenses/bsd-license.php
 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
-\r
-    Font.c\r
-\r
-Abstract:\r
-\r
-    Implementation for EFI_HII_FONT_PROTOCOL.\r
-\r
-Revision History\r
-\r
-\r
 **/\r
 \r
 \r
 #include "HiiDatabase.h"\r
 \r
 **/\r
 \r
 \r
 #include "HiiDatabase.h"\r
 \r
-static EFI_GRAPHICS_OUTPUT_BLT_PIXEL        mEfiColors[16] = {\r
+STATIC EFI_GRAPHICS_OUTPUT_BLT_PIXEL        mEfiColors[16] = {\r
   //\r
   // B     G     R\r
   //\r
   //\r
   // B     G     R\r
   //\r
@@ -51,6 +42,8 @@ static EFI_GRAPHICS_OUTPUT_BLT_PIXEL        mEfiColors[16] = {
 /**\r
   Insert a character cell information to the list specified by GlyphInfoList.\r
 \r
 /**\r
   Insert a character cell information to the list specified by GlyphInfoList.\r
 \r
+  This is a internal function.\r
+\r
   @param  CharValue               Unicode character value, which identifies a glyph\r
                                   block.\r
   @param  GlyphInfoList           HII_GLYPH_INFO list head.\r
   @param  CharValue               Unicode character value, which identifies a glyph\r
                                   block.\r
   @param  GlyphInfoList           HII_GLYPH_INFO list head.\r
@@ -61,7 +54,6 @@ static EFI_GRAPHICS_OUTPUT_BLT_PIXEL        mEfiColors[16] = {
                                   task.\r
 \r
 **/\r
                                   task.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 NewCell (\r
   IN  CHAR16                         CharValue,\r
 EFI_STATUS\r
 NewCell (\r
   IN  CHAR16                         CharValue,\r
@@ -94,6 +86,8 @@ NewCell (
 /**\r
   Get a character cell information from the list specified by GlyphInfoList.\r
 \r
 /**\r
   Get a character cell information from the list specified by GlyphInfoList.\r
 \r
+  This is a internal function.\r
+\r
   @param  CharValue               Unicode character value, which identifies a glyph\r
                                   block.\r
   @param  GlyphInfoList           HII_GLYPH_INFO list head.\r
   @param  CharValue               Unicode character value, which identifies a glyph\r
                                   block.\r
   @param  GlyphInfoList           HII_GLYPH_INFO list head.\r
@@ -105,7 +99,6 @@ NewCell (
                                   not exist.\r
 \r
 **/\r
                                   not exist.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 GetCell (\r
   IN  CHAR16                         CharValue,\r
 EFI_STATUS\r
 GetCell (\r
   IN  CHAR16                         CharValue,\r
@@ -143,6 +136,8 @@ GetCell (
 /**\r
   Convert the glyph for a single character into a bitmap.\r
 \r
 /**\r
   Convert the glyph for a single character into a bitmap.\r
 \r
+  This is a internal function.\r
+\r
   @param  Private                 HII database driver private data.\r
   @param  Char                    Character to retrieve.\r
   @param  StringInfo              Points to the string font and color information\r
   @param  Private                 HII database driver private data.\r
   @param  Char                    Character to retrieve.\r
   @param  StringInfo              Points to the string font and color information\r
@@ -158,7 +153,6 @@ GetCell (
   @retval EFI_INVALID_PARAMETER   Any input parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER   Any input parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 GetGlyphBuffer (\r
   IN  HII_DATABASE_PRIVATE_DATA      *Private,\r
 EFI_STATUS\r
 GetGlyphBuffer (\r
   IN  HII_DATABASE_PRIVATE_DATA      *Private,\r
@@ -266,7 +260,28 @@ GetGlyphBuffer (
   return EFI_NOT_FOUND;\r
 }\r
 \r
   return EFI_NOT_FOUND;\r
 }\r
 \r
-STATIC\r
+/**\r
+  Convert bitmap data of the glyph to blt structure.\r
+\r
+  This is a internal function.\r
+\r
+  @param GlyphBuffer     Buffer points to bitmap data of glyph.\r
+  @param  Foreground     The color of the "on" pixels in the glyph in the\r
+                         bitmap.\r
+  @param  Background     The color of the "off" pixels in the glyph in the\r
+                         bitmap.\r
+  @param  ImageWidth     Width of the character or character cell, in\r
+                         pixels.\r
+  @param  ImageHeight    Height of the character or character cell, in\r
+                         pixels.\r
+  @param  Transparent             If TRUE, the Background color is ignored and all\r
+                                  "off" pixels in the character's drawn wil use the\r
+                                  pixel value from BltBuffer.\r
+  @param  Origin                  On input, points to the origin of the to be\r
+                                  displayed character, on output, points to the\r
+                                  next glyph's origin.\r
+\r
+**/\r
 VOID\r
 NarrowGlyphToBlt (\r
   IN     UINT8                         *GlyphBuffer,\r
 VOID\r
 NarrowGlyphToBlt (\r
   IN     UINT8                         *GlyphBuffer,\r
@@ -278,8 +293,8 @@ NarrowGlyphToBlt (
   IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **Origin\r
   )\r
 {\r
   IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **Origin\r
   )\r
 {\r
-  UINT8                                X;\r
-  UINT8                                Y;\r
+  UINT8                                Xpos;\r
+  UINT8                                Ypos;\r
   UINT8                                Height;\r
   UINT8                                Width;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL        *Buffer;\r
   UINT8                                Height;\r
   UINT8                                Width;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL        *Buffer;\r
@@ -293,13 +308,13 @@ NarrowGlyphToBlt (
 \r
   Buffer = *Origin;\r
 \r
 \r
   Buffer = *Origin;\r
 \r
-  for (Y = 0; Y < Height; Y++) {\r
-    for (X = 0; X < Width; X++) {\r
-      if ((GlyphBuffer[Y] & (1 << X)) != 0) {\r
-        Buffer[Y * ImageWidth + (Width - X - 1)] = Foreground;\r
+  for (Ypos = 0; Ypos < Height; Ypos++) {\r
+    for (Xpos = 0; Xpos < Width; Xpos++) {\r
+      if ((GlyphBuffer[Ypos] & (1 << Xpos)) != 0) {\r
+        Buffer[Ypos * ImageWidth + (Width - Xpos - 1)] = Foreground;\r
       } else {\r
         if (!Transparent) {\r
       } else {\r
         if (!Transparent) {\r
-          Buffer[Y * ImageWidth + (Width - X - 1)] = Background;\r
+          Buffer[Ypos * ImageWidth + (Width - Xpos - 1)] = Background;\r
         }\r
       }\r
     }\r
         }\r
       }\r
     }\r
@@ -312,23 +327,28 @@ NarrowGlyphToBlt (
 /**\r
   Convert bitmap data of the glyph to blt structure.\r
 \r
 /**\r
   Convert bitmap data of the glyph to blt structure.\r
 \r
+  This is a internal function.\r
+\r
   @param  GlyphBuffer             Buffer points to bitmap data of glyph.\r
   @param  Foreground              The color of the "on" pixels in the glyph in the\r
                                   bitmap.\r
   @param  Background              The color of the "off" pixels in the glyph in the\r
                                   bitmap.\r
   @param  GlyphBuffer             Buffer points to bitmap data of glyph.\r
   @param  Foreground              The color of the "on" pixels in the glyph in the\r
                                   bitmap.\r
   @param  Background              The color of the "off" pixels in the glyph in the\r
                                   bitmap.\r
-  @param  Width                   Width of the character or character cell, in\r
+  @param  ImageWidth              Width of the character or character cell, in\r
                                   pixels.\r
                                   pixels.\r
-  @param  Height                  Height of the character or character cell, in\r
+  @param  ImageHeight             Height of the character or character cell, in\r
                                   pixels.\r
   @param  Transparent             If TRUE, the Background color is ignored and all\r
                                   "off" pixels in the character's drawn wil use the\r
                                   pixel value from BltBuffer.\r
                                   pixels.\r
   @param  Transparent             If TRUE, the Background color is ignored and all\r
                                   "off" pixels in the character's drawn wil use the\r
                                   pixel value from BltBuffer.\r
-  @param  BltBuffer               Points to the blt buffer.\r
+  @param  Cell                    Points to EFI_HII_GLYPH_INFO structure.\r
+  @param  Attributes              The attribute of incoming glyph in GlyphBuffer.\r
+  @param  Origin                  On input, points to the origin of the to be\r
+                                  displayed character, on output, points to the\r
+                                  next glyph's origin.\r
 \r
 \r
 **/\r
 \r
 \r
 **/\r
-STATIC\r
 VOID\r
 GlyphToBlt (\r
   IN     UINT8                         *GlyphBuffer,\r
 VOID\r
 GlyphToBlt (\r
   IN     UINT8                         *GlyphBuffer,\r
@@ -342,8 +362,8 @@ GlyphToBlt (
   IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **Origin\r
   )\r
 {\r
   IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **Origin\r
   )\r
 {\r
-  UINT8                                X;\r
-  UINT8                                Y;\r
+  UINT8                                Xpos;\r
+  UINT8                                Ypos;\r
   UINT8                                Data;\r
   UINT8                                Index;\r
   UINTN                                OffsetY;\r
   UINT8                                Data;\r
   UINT8                                Index;\r
   UINTN                                OffsetY;\r
@@ -366,20 +386,20 @@ GlyphToBlt (
   // The glyph's upper left hand corner pixel is the most significant bit of the\r
   // first bitmap byte.\r
   //\r
   // The glyph's upper left hand corner pixel is the most significant bit of the\r
   // first bitmap byte.\r
   //\r
-  for (Y = 0; Y < Cell->Height; Y++) {\r
-    OffsetY = BITMAP_LEN_1_BIT (Cell->Width, Y);\r
+  for (Ypos = 0; Ypos < Cell->Height; Ypos++) {\r
+    OffsetY = BITMAP_LEN_1_BIT (Cell->Width, Ypos);\r
 \r
     //\r
     // All bits in these bytes are meaningful.\r
     //\r
 \r
     //\r
     // All bits in these bytes are meaningful.\r
     //\r
-    for (X = 0; X < Cell->Width / 8; X++) {\r
-      Data  = *(GlyphBuffer + OffsetY + X);\r
+    for (Xpos = 0; Xpos < Cell->Width / 8; Xpos++) {\r
+      Data  = *(GlyphBuffer + OffsetY + Xpos);\r
       for (Index = 0; Index < 8; Index++) {\r
         if ((Data & (1 << Index)) != 0) {\r
       for (Index = 0; Index < 8; Index++) {\r
         if ((Data & (1 << Index)) != 0) {\r
-          BltBuffer[Y * ImageWidth + X * 8 + (8 - Index - 1)] = Foreground;\r
+          BltBuffer[Ypos * ImageWidth + Xpos * 8 + (8 - Index - 1)] = Foreground;\r
         } else {\r
           if (!Transparent) {\r
         } else {\r
           if (!Transparent) {\r
-            BltBuffer[Y * ImageWidth + X * 8 + (8 - Index - 1)] = Background;\r
+            BltBuffer[Ypos * ImageWidth + Xpos * 8 + (8 - Index - 1)] = Background;\r
           }\r
         }\r
       }\r
           }\r
         }\r
       }\r
@@ -389,19 +409,19 @@ GlyphToBlt (
       //\r
       // There are some padding bits in this byte. Ignore them.\r
       //\r
       //\r
       // There are some padding bits in this byte. Ignore them.\r
       //\r
-      Data  = *(GlyphBuffer + OffsetY + X);\r
+      Data  = *(GlyphBuffer + OffsetY + Xpos);\r
       for (Index = 0; Index < Cell->Width % 8; Index++) {\r
         if ((Data & (1 << (8 - Index - 1))) != 0) {\r
       for (Index = 0; Index < Cell->Width % 8; Index++) {\r
         if ((Data & (1 << (8 - Index - 1))) != 0) {\r
-          BltBuffer[Y * ImageWidth + X * 8 + Index] = Foreground;\r
+          BltBuffer[Ypos * ImageWidth + Xpos * 8 + Index] = Foreground;\r
         } else {\r
           if (!Transparent) {\r
         } else {\r
           if (!Transparent) {\r
-            BltBuffer[Y * ImageWidth + X * 8 + Index] = Background;\r
+            BltBuffer[Ypos * ImageWidth + Xpos * 8 + Index] = Background;\r
           }\r
         }\r
       }\r
     } // end of if (Width % 8...)\r
 \r
           }\r
         }\r
       }\r
     } // end of if (Width % 8...)\r
 \r
-  } // end of for (Y=0...)\r
+  } // end of for (Ypos=0...)\r
 \r
   *Origin = BltBuffer + Cell->Width;\r
 }\r
 \r
   *Origin = BltBuffer + Cell->Width;\r
 }\r
@@ -410,14 +430,16 @@ GlyphToBlt (
 /**\r
   Convert bitmap data of the glyph to blt structure.\r
 \r
 /**\r
   Convert bitmap data of the glyph to blt structure.\r
 \r
+  This is a internal function.\r
+\r
   @param  GlyphBuffer             Buffer points to bitmap data of glyph.\r
   @param  Foreground              The color of the "on" pixels in the glyph in the\r
                                   bitmap.\r
   @param  Background              The color of the "off" pixels in the glyph in the\r
                                   bitmap.\r
   @param  GlyphBuffer             Buffer points to bitmap data of glyph.\r
   @param  Foreground              The color of the "on" pixels in the glyph in the\r
                                   bitmap.\r
   @param  Background              The color of the "off" pixels in the glyph in the\r
                                   bitmap.\r
-  @param  Width                   Width of the character or character cell, in\r
+  @param  ImageWidth              Width of the character or character cell, in\r
                                   pixels.\r
                                   pixels.\r
-  @param  Height                  Height of the character or character cell, in\r
+  @param  ImageHeight             Height of the character or character cell, in\r
                                   pixels.\r
   @param  Transparent             If TRUE, the Background color is ignored and all\r
                                   "off" pixels in the character's drawn wil use the\r
                                   pixels.\r
   @param  Transparent             If TRUE, the Background color is ignored and all\r
                                   "off" pixels in the character's drawn wil use the\r
@@ -431,7 +453,6 @@ GlyphToBlt (
   @return Points to the address of next origin node in BltBuffer.\r
 \r
 **/\r
   @return Points to the address of next origin node in BltBuffer.\r
 \r
 **/\r
-STATIC\r
 VOID\r
 GlyphToImage (\r
   IN     UINT8                         *GlyphBuffer,\r
 VOID\r
 GlyphToImage (\r
   IN     UINT8                         *GlyphBuffer,\r
@@ -531,6 +552,8 @@ GlyphToImage (
 /**\r
   Write the output parameters of FindGlyphBlock().\r
 \r
 /**\r
   Write the output parameters of FindGlyphBlock().\r
 \r
+  This is a internal function.\r
+\r
   @param  BufferIn                Buffer which stores the bitmap data of the found\r
                                   block.\r
   @param  BufferLen               Length of BufferIn.\r
   @param  BufferIn                Buffer which stores the bitmap data of the found\r
                                   block.\r
   @param  BufferLen               Length of BufferIn.\r
@@ -548,7 +571,6 @@ GlyphToImage (
                                   task.\r
 \r
 **/\r
                                   task.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 WriteOutputParam (\r
   IN  UINT8                          *BufferIn,\r
 EFI_STATUS\r
 WriteOutputParam (\r
   IN  UINT8                          *BufferIn,\r
@@ -817,6 +839,8 @@ FindGlyphBlock (
 /**\r
   Copy a Font Name to a new created EFI_FONT_INFO structure.\r
 \r
 /**\r
   Copy a Font Name to a new created EFI_FONT_INFO structure.\r
 \r
+  This is a internal function.\r
+\r
   @param  FontName                NULL-terminated string.\r
   @param  FontInfo                a new EFI_FONT_INFO which stores the FontName.\r
                                   It's caller's responsibility to free this buffer.\r
   @param  FontName                NULL-terminated string.\r
   @param  FontInfo                a new EFI_FONT_INFO which stores the FontName.\r
                                   It's caller's responsibility to free this buffer.\r
@@ -826,7 +850,6 @@ FindGlyphBlock (
                                   task.\r
 \r
 **/\r
                                   task.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 SaveFontName (\r
   IN  EFI_STRING                       FontName,\r
 EFI_STATUS\r
 SaveFontName (\r
   IN  EFI_STRING                       FontName,\r
@@ -908,6 +931,8 @@ GetSystemFont (
   Check whether EFI_FONT_DISPLAY_INFO points to system default font and color or\r
   returns the system default according to the optional inputs.\r
 \r
   Check whether EFI_FONT_DISPLAY_INFO points to system default font and color or\r
   returns the system default according to the optional inputs.\r
 \r
+  This is a internal function.\r
+\r
   @param  Private                 HII database driver private data.\r
   @param  StringInfo              Points to the string output information,\r
                                   including the color and font.\r
   @param  Private                 HII database driver private data.\r
   @param  StringInfo              Points to the string output information,\r
                                   including the color and font.\r
@@ -920,7 +945,6 @@ GetSystemFont (
   @retval FALSE                   No.\r
 \r
 **/\r
   @retval FALSE                   No.\r
 \r
 **/\r
-STATIC\r
 BOOLEAN\r
 IsSystemFontInfo (\r
   IN  HII_DATABASE_PRIVATE_DATA      *Private,\r
 BOOLEAN\r
 IsSystemFontInfo (\r
   IN  HII_DATABASE_PRIVATE_DATA      *Private,\r
@@ -1318,6 +1342,8 @@ IsFontInfoExisted (
 /**\r
   Check whether the unicode represents a line break or not.\r
 \r
 /**\r
   Check whether the unicode represents a line break or not.\r
 \r
+  This is a internal function.\r
+\r
   @param  Char                    Unicode character\r
 \r
   @retval 0                       Yes, it is a line break.\r
   @param  Char                    Unicode character\r
 \r
   @retval 0                       Yes, it is a line break.\r
@@ -1328,7 +1354,6 @@ IsFontInfoExisted (
   @retval -1                      No, it is not a link break.\r
 \r
 **/\r
   @retval -1                      No, it is not a link break.\r
 \r
 **/\r
-STATIC\r
 INT8\r
 IsLineBreak (\r
   IN  CHAR16    Char\r
 INT8\r
 IsLineBreak (\r
   IN  CHAR16    Char\r
@@ -1413,7 +1438,10 @@ IsLineBreak (
                                   will be allocated to hold the generated image and\r
                                   the pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
                                   will be allocated to hold the generated image and\r
                                   the pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
-  @param  BltX,BLTY               Specifies the offset from the left and top edge\r
+  @param  BltX                    Specifies the offset from the left and top edge\r
+                                  of the image of the first character cell in the\r
+                                  image.\r
+  @param  BltY                    Specifies the offset from the left and top edge\r
                                   of the image of the first character cell in the\r
                                   image.\r
   @param  RowInfoArray            If this is non-NULL on entry, then on exit, this\r
                                   of the image of the first character cell in the\r
                                   image.\r
   @param  RowInfoArray            If this is non-NULL on entry, then on exit, this\r
@@ -1983,7 +2011,10 @@ Exit:
                                   will be allocated to hold the generated image and\r
                                   the pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
                                   will be allocated to hold the generated image and\r
                                   the pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
-  @param  BltX,BLTY               Specifies the offset from the left and top edge\r
+  @param  BltX                    Specifies the offset from the left and top edge\r
+                                  of the image of the first character cell in the\r
+                                  image.\r
+  @param  BltY                    Specifies the offset from the left and top edge\r
                                   of the image of the first character cell in the\r
                                   image.\r
   @param  RowInfoArray            If this is non-NULL on entry, then on exit, this\r
                                   of the image of the first character cell in the\r
                                   image.\r
   @param  RowInfoArray            If this is non-NULL on entry, then on exit, this\r
index bbd366edece9c1f84654e514d9d14142b02311ef..ac88b86d077d68b2b1a14a4a8f13fe466ce7d461 100644 (file)
@@ -1,4 +1,5 @@
 /** @file\r
 /** @file\r
+Private structures definitions in HiiDatabase.\r
 \r
 Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 \r
 Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -9,17 +10,6 @@ http://opensource.org/licenses/bsd-license.php
 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
-\r
-    HiiDatabase.h\r
-\r
-Abstract:\r
-\r
-    Private structures definitions in HiiDatabase.\r
-\r
-Revision History\r
-\r
-\r
 **/\r
 \r
 #ifndef __HII_DATABASE_PRIVATE_H__\r
 **/\r
 \r
 #ifndef __HII_DATABASE_PRIVATE_H__\r
@@ -251,7 +241,7 @@ typedef struct _HII_DATABASE_PRIVATE_DATA {
   LIST_ENTRY                            DatabaseList;\r
   LIST_ENTRY                            DatabaseNotifyList;\r
   EFI_HII_FONT_PROTOCOL                 HiiFont;\r
   LIST_ENTRY                            DatabaseList;\r
   LIST_ENTRY                            DatabaseNotifyList;\r
   EFI_HII_FONT_PROTOCOL                 HiiFont;\r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
   EFI_HII_IMAGE_PROTOCOL                HiiImage;\r
 #endif\r
   EFI_HII_STRING_PROTOCOL               HiiString;\r
   EFI_HII_IMAGE_PROTOCOL                HiiImage;\r
 #endif\r
   EFI_HII_STRING_PROTOCOL               HiiString;\r
@@ -305,7 +295,7 @@ typedef struct _HII_DATABASE_PRIVATE_DATA {
 //\r
 \r
 /**\r
 //\r
 \r
 /**\r
-  This function checks whether a handle is a valid EFI_HII_HANDLE\r
+  This function checks whether a handle is a valid EFI_HII_HANDLE.\r
 \r
   @param  Handle                  Pointer to a EFI_HII_HANDLE\r
 \r
 \r
   @param  Handle                  Pointer to a EFI_HII_HANDLE\r
 \r
@@ -470,7 +460,10 @@ FindGlyphBlock (
                                   will be allocated to hold the generated image and\r
                                   the pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
                                   will be allocated to hold the generated image and\r
                                   the pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
-  @param  BltX,BLTY               Specifies the offset from the left and top edge\r
+  @param  BltX                    Together with BltX, Specifies the offset from the left and top edge\r
+                                  of the image of the first character cell in the\r
+                                  image.\r
+  @param  BltY                    Together with BltY, Specifies the offset from the left and top edge\r
                                   of the image of the first character cell in the\r
                                   image.\r
   @param  RowInfoArray            If this is non-NULL on entry, then on exit, this\r
                                   of the image of the first character cell in the\r
                                   image.\r
   @param  RowInfoArray            If this is non-NULL on entry, then on exit, this\r
@@ -543,7 +536,10 @@ HiiStringToImage (
                                   will be allocated to hold the generated image and\r
                                   the pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
                                   will be allocated to hold the generated image and\r
                                   the pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
-  @param  BltX,BLTY               Specifies the offset from the left and top edge\r
+  @param  BltX                    Together with BltX, Specifies the offset from the left and top edge\r
+                                  of the image of the first character cell in the\r
+                                  image.\r
+  @param  BltY                    Together with BltY, Specifies the offset from the left and top edge\r
                                   of the image of the first character cell in the\r
                                   image.\r
   @param  RowInfoArray            If this is non-NULL on entry, then on exit, this\r
                                   of the image of the first character cell in the\r
                                   image.\r
   @param  RowInfoArray            If this is non-NULL on entry, then on exit, this\r
@@ -622,7 +618,7 @@ EFIAPI
 HiiGetGlyph (\r
   IN  CONST EFI_HII_FONT_PROTOCOL    *This,\r
   IN  CHAR16                         Char,\r
 HiiGetGlyph (\r
   IN  CONST EFI_HII_FONT_PROTOCOL    *This,\r
   IN  CHAR16                         Char,\r
-  IN  CONST EFI_FONT_DISPLAY_INFO    *StringInfo, OPTIONAL\r
+  IN  CONST EFI_FONT_DISPLAY_INFO    *StringInfo,\r
   OUT EFI_IMAGE_OUTPUT               **Blt,\r
   OUT UINTN                          *Baseline OPTIONAL\r
   )\r
   OUT EFI_IMAGE_OUTPUT               **Blt,\r
   OUT UINTN                          *Baseline OPTIONAL\r
   )\r
@@ -663,7 +659,7 @@ EFIAPI
 HiiGetFontInfo (\r
   IN  CONST EFI_HII_FONT_PROTOCOL    *This,\r
   IN  OUT   EFI_FONT_HANDLE          *FontHandle,\r
 HiiGetFontInfo (\r
   IN  CONST EFI_HII_FONT_PROTOCOL    *This,\r
   IN  OUT   EFI_FONT_HANDLE          *FontHandle,\r
-  IN  CONST EFI_FONT_DISPLAY_INFO    *StringInfoIn,\r
+  IN  CONST EFI_FONT_DISPLAY_INFO    *StringInfoIn, OPTIONAL\r
   OUT       EFI_FONT_DISPLAY_INFO    **StringInfoOut,\r
   IN  CONST EFI_STRING               String OPTIONAL\r
   )\r
   OUT       EFI_FONT_DISPLAY_INFO    **StringInfoOut,\r
   IN  CONST EFI_STRING               String OPTIONAL\r
   )\r
@@ -778,6 +774,9 @@ HiiSetImage (
                                   a buffer will be allocated to hold  the generated\r
                                   image and the pointer updated on exit. It is the\r
                                   caller's responsibility to free this buffer.\r
                                   a buffer will be allocated to hold  the generated\r
                                   image and the pointer updated on exit. It is the\r
                                   caller's responsibility to free this buffer.\r
+  @param  BltX                    Specifies the offset from the left and top edge\r
+                                  of the  output image of the first pixel in the\r
+                                  image.\r
   @param  BltY                    Specifies the offset from the left and top edge\r
                                   of the  output image of the first pixel in the\r
                                   image.\r
   @param  BltY                    Specifies the offset from the left and top edge\r
                                   of the  output image of the first pixel in the\r
                                   image.\r
@@ -821,6 +820,9 @@ HiiDrawImage (
                                   allocated to hold  the generated image and the\r
                                   pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
                                   allocated to hold  the generated image and the\r
                                   pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
+  @param  BltX                    Specifies the offset from the left and top edge\r
+                                  of the  output image of the first pixel in the\r
+                                  image.\r
   @param  BltY                    Specifies the offset from the left and top edge\r
                                   of the  output image of the first pixel in the\r
                                   image.\r
   @param  BltY                    Specifies the offset from the left and top edge\r
                                   of the  output image of the first pixel in the\r
                                   image.\r
@@ -1025,7 +1027,7 @@ HiiGetLanguages (
                                   FirstLanguage. If there are no secondary\r
                                   languages, the function  returns successfully,\r
                                   but this is set to NULL.\r
                                   FirstLanguage. If there are no secondary\r
                                   languages, the function  returns successfully,\r
                                   but this is set to NULL.\r
-  @param  SecondaryLanguageSize   On entry, points to the size of the buffer\r
+  @param  SecondaryLanguagesSize  On entry, points to the size of the buffer\r
                                   pointed to  by SecondLanguages, in bytes. On\r
                                   return, points to the length of SecondLanguages\r
                                   in bytes.\r
                                   pointed to  by SecondLanguages, in bytes. On\r
                                   return, points to the length of SecondLanguages\r
                                   in bytes.\r
@@ -1048,8 +1050,8 @@ HiiGetSecondaryLanguages (
   IN CONST EFI_HII_STRING_PROTOCOL   *This,\r
   IN EFI_HII_HANDLE                  PackageList,\r
   IN CONST CHAR8                     *FirstLanguage,\r
   IN CONST EFI_HII_STRING_PROTOCOL   *This,\r
   IN EFI_HII_HANDLE                  PackageList,\r
   IN CONST CHAR8                     *FirstLanguage,\r
-  IN OUT CHAR8                       *SecondLanguages,\r
-  IN OUT UINTN                       *SecondLanguagesSize\r
+  IN OUT CHAR8                       *SecondaryLanguages,\r
+  IN OUT UINTN                       *SecondaryLanguagesSize\r
   )\r
 ;\r
 \r
   )\r
 ;\r
 \r
@@ -1278,7 +1280,7 @@ HiiRegisterPackageNotify (
 \r
   @param  This                    A pointer to the EFI_HII_DATABASE_PROTOCOL\r
                                   instance.\r
 \r
   @param  This                    A pointer to the EFI_HII_DATABASE_PROTOCOL\r
                                   instance.\r
-  @param  NotifyHandle            The handle of the notification function being\r
+  @param  NotificationHandle      The handle of the notification function being\r
                                   unregistered.\r
 \r
   @retval EFI_SUCCESS             Notification is unregistered successfully.\r
                                   unregistered.\r
 \r
   @retval EFI_SUCCESS             Notification is unregistered successfully.\r
index 4bba8af1b182a9a50a9eed58b2440f65b8985015..c7ffdfe77c0ab550ef8addb5f4b47c7c9830add5 100644 (file)
@@ -48,7 +48,7 @@ STATIC HII_DATABASE_PRIVATE_DATA mPrivate = {
     HiiGetGlyph,\r
     HiiGetFontInfo\r
   },\r
     HiiGetGlyph,\r
     HiiGetFontInfo\r
   },\r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
   {\r
     HiiNewImage,\r
     HiiGetImage,\r
   {\r
     HiiNewImage,\r
     HiiGetImage,\r
@@ -104,7 +104,16 @@ STATIC HII_DATABASE_PRIVATE_DATA mPrivate = {
   NULL\r
 };\r
 \r
   NULL\r
 };\r
 \r
-STATIC\r
+/**\r
+  The default event handler for gHiiKeyboardLayoutChanged\r
+  event group.\r
+\r
+  This is internal function.\r
+\r
+  @param Event           The event that triggered this notification function.\r
+  @param Context         Pointer to the notification functions context.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 KeyboardLayoutChangeNullEvent (\r
 VOID\r
 EFIAPI\r
 KeyboardLayoutChangeNullEvent (\r
@@ -115,54 +124,41 @@ KeyboardLayoutChangeNullEvent (
   return;\r
 }\r
 \r
   return;\r
 }\r
 \r
+/**\r
+  Initialize HII Database.\r
+\r
+\r
+  @param ImageHandle     The image handle.\r
+  @param SystemTable     The system table.\r
+\r
+  @retval EFI_SUCCESS    The Hii database is setup correctly.\r
+  @return Other value if failed to create the default event for\r
+          gHiiKeyboardLayoutChanged. Check gBS->CreateEventEx for\r
+          details. Or failed to insatll the protocols.\r
+          Check gBS->InstallMultipleProtocolInterfaces for details.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InitializeHiiDatabase (\r
   IN EFI_HANDLE           ImageHandle,\r
   IN EFI_SYSTEM_TABLE     *SystemTable\r
   )\r
 EFI_STATUS\r
 EFIAPI\r
 InitializeHiiDatabase (\r
   IN EFI_HANDLE           ImageHandle,\r
   IN EFI_SYSTEM_TABLE     *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Initialize HII Database\r
-\r
-Arguments:\r
-  (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)\r
-\r
-Returns:\r
-  EFI_SUCCESS -\r
-  other       -\r
-\r
---*/\r
 {\r
   EFI_STATUS                             Status;\r
   EFI_HANDLE                             Handle;\r
 {\r
   EFI_STATUS                             Status;\r
   EFI_HANDLE                             Handle;\r
-  EFI_HANDLE                             *HandleBuffer;\r
-  UINTN                                  HandleCount;\r
 \r
   //\r
   // There will be only one HII Database in the system\r
   // If there is another out there, someone is trying to install us\r
   // again.  Fail that scenario.\r
   //\r
 \r
   //\r
   // There will be only one HII Database in the system\r
   // If there is another out there, someone is trying to install us\r
   // again.  Fail that scenario.\r
   //\r
-  Status = gBS->LocateHandleBuffer (\r
-                  ByProtocol,\r
-                  &gEfiHiiDatabaseProtocolGuid,\r
-                  NULL,\r
-                  &HandleCount,\r
-                  &HandleBuffer\r
-                  );\r
-\r
-  //\r
-  // If there was no error, assume there is an installation and fail to load\r
-  //\r
-  if (!EFI_ERROR (Status)) {\r
-    if (HandleBuffer != NULL) {\r
-      gBS->FreePool (HandleBuffer);\r
-    }\r
-    return EFI_DEVICE_ERROR;\r
-  }\r
-\r
+  ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiDatabaseProtocolGuid);\r
+  ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiFontProtocolGuid);\r
+  ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiImageProtocolGuid);\r
+  ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiStringProtocolGuid);\r
+  ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiConfigRoutingProtocolGuid);\r
+  \r
   InitializeListHead (&mPrivate.DatabaseList);\r
   InitializeListHead (&mPrivate.DatabaseNotifyList);\r
   InitializeListHead (&mPrivate.HiiHandleList);\r
   InitializeListHead (&mPrivate.DatabaseList);\r
   InitializeListHead (&mPrivate.DatabaseNotifyList);\r
   InitializeListHead (&mPrivate.HiiHandleList);\r
@@ -188,7 +184,7 @@ Returns:
                 &Handle,\r
                 &gEfiHiiFontProtocolGuid,\r
                 &mPrivate.HiiFont,\r
                 &Handle,\r
                 &gEfiHiiFontProtocolGuid,\r
                 &mPrivate.HiiFont,\r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
                 &gEfiHiiImageProtocolGuid,\r
                 &mPrivate.HiiImage,\r
 #endif\r
                 &gEfiHiiImageProtocolGuid,\r
                 &mPrivate.HiiImage,\r
 #endif\r
index 6b6a72002dc2e6b22a71bf7eb0ac987d5c4d91fc..8bba0fc21f3750fd67b28956481feffee14b80c5 100644 (file)
@@ -1,4 +1,6 @@
 /** @file\r
 /** @file\r
+Implementation for EFI_HII_IMAGE_PROTOCOL.\r
+\r
 \r
 Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 \r
 Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -9,46 +11,32 @@ http://opensource.org/licenses/bsd-license.php
 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
-\r
-    Image.c\r
-\r
-Abstract:\r
+**/\r
 \r
 \r
-    Implementation for EFI_HII_IMAGE_PROTOCOL.\r
 \r
 \r
-Revision History\r
+#include "HiiDatabase.h"\r
 \r
 \r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
 \r
 \r
-**/\r
+/**\r
+  Get the imageid of last image block: EFI_HII_IIBT_END_BLOCK when input\r
+  ImageId is zero, otherwise return the address of the\r
+  corresponding image block with identifier specified by ImageId.\r
 \r
 \r
+  This is a internal function.\r
 \r
 \r
-#include "HiiDatabase.h"\r
+  @param ImageBlock      Points to the beginning of a series of image blocks stored in order.\r
+  @param ImageId         If input ImageId is 0, output the image id of the EFI_HII_IIBT_END_BLOCK;\r
+                         else use this id to find its corresponding image block address.\r
 \r
 \r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+  @return The image block address when input ImageId is not zero; otherwise return NULL.\r
 \r
 \r
-STATIC\r
+**/\r
 UINT8*\r
 GetImageIdOrAddress (\r
   IN  UINT8           *ImageBlock,\r
   IN OUT EFI_IMAGE_ID *ImageId\r
   )\r
 UINT8*\r
 GetImageIdOrAddress (\r
   IN  UINT8           *ImageBlock,\r
   IN OUT EFI_IMAGE_ID *ImageId\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Get the imageid of last image block: EFI_HII_IIBT_END_BLOCK when input\r
-    ImageId is zero, otherwise return the address of the\r
-    corresponding image block with identifier specified by ImageId.\r
-\r
-  Arguments:\r
-    ImageBlock     - Points to the beginning of a series of image blocks stored in order.\r
-    ImageId        - If input ImageId is 0, output the image id of the EFI_HII_IIBT_END_BLOCK;\r
-                     else use this id to find its corresponding image block address.\r
-\r
-  Returns:\r
-    The image block address when input ImageId is not zero; otherwise return NULL.\r
-\r
---*/\r
 {\r
   EFI_IMAGE_ID                   ImageIdCurrent;\r
   UINT8                          *ImageBlockHdr;\r
 {\r
   EFI_IMAGE_ID                   ImageIdCurrent;\r
   UINT8                          *ImageBlockHdr;\r
@@ -199,13 +187,15 @@ GetImageIdOrAddress (
 /**\r
   Convert pixels from EFI_GRAPHICS_OUTPUT_BLT_PIXEL to EFI_HII_RGB_PIXEL style.\r
 \r
 /**\r
   Convert pixels from EFI_GRAPHICS_OUTPUT_BLT_PIXEL to EFI_HII_RGB_PIXEL style.\r
 \r
+  This is a internal function.\r
+\r
+\r
   @param  BitMapOut              Pixels in EFI_HII_RGB_PIXEL format.\r
   @param  BitMapIn               Pixels in EFI_GRAPHICS_OUTPUT_BLT_PIXEL format.\r
   @param  PixelNum               The number of pixels to be converted.\r
 \r
 \r
 **/\r
   @param  BitMapOut              Pixels in EFI_HII_RGB_PIXEL format.\r
   @param  BitMapIn               Pixels in EFI_GRAPHICS_OUTPUT_BLT_PIXEL format.\r
   @param  PixelNum               The number of pixels to be converted.\r
 \r
 \r
 **/\r
-STATIC\r
 VOID\r
 CopyGopToRgbPixel (\r
   OUT EFI_HII_RGB_PIXEL              *BitMapOut,\r
 VOID\r
 CopyGopToRgbPixel (\r
   OUT EFI_HII_RGB_PIXEL              *BitMapOut,\r
@@ -226,13 +216,15 @@ CopyGopToRgbPixel (
 /**\r
   Convert pixels from EFI_HII_RGB_PIXEL to EFI_GRAPHICS_OUTPUT_BLT_PIXEL style.\r
 \r
 /**\r
   Convert pixels from EFI_HII_RGB_PIXEL to EFI_GRAPHICS_OUTPUT_BLT_PIXEL style.\r
 \r
+  This is a internal function.\r
+\r
+\r
   @param  BitMapOut              Pixels in EFI_GRAPHICS_OUTPUT_BLT_PIXEL format.\r
   @param  BitMapIn               Pixels in EFI_HII_RGB_PIXEL format.\r
   @param  PixelNum               The number of pixels to be converted.\r
 \r
 \r
 **/\r
   @param  BitMapOut              Pixels in EFI_GRAPHICS_OUTPUT_BLT_PIXEL format.\r
   @param  BitMapIn               Pixels in EFI_HII_RGB_PIXEL format.\r
   @param  PixelNum               The number of pixels to be converted.\r
 \r
 \r
 **/\r
-STATIC\r
 VOID\r
 CopyRgbToGopPixel (\r
   OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL  *BitMapOut,\r
 VOID\r
 CopyRgbToGopPixel (\r
   OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL  *BitMapOut,\r
@@ -253,6 +245,9 @@ CopyRgbToGopPixel (
 /**\r
   Output pixels in "1 bit per pixel" format to an image.\r
 \r
 /**\r
   Output pixels in "1 bit per pixel" format to an image.\r
 \r
+  This is a internal function.\r
+\r
+\r
   @param  Image                  Points to the image which will store the pixels.\r
   @param  Data                   Stores the value of output pixels, 0 or 1.\r
   @param  PaletteInfo            PaletteInfo which stores the color of the output\r
   @param  Image                  Points to the image which will store the pixels.\r
   @param  Data                   Stores the value of output pixels, 0 or 1.\r
   @param  PaletteInfo            PaletteInfo which stores the color of the output\r
@@ -261,7 +256,6 @@ CopyRgbToGopPixel (
 \r
 \r
 **/\r
 \r
 \r
 **/\r
-STATIC\r
 VOID\r
 Output1bitPixel (\r
   IN OUT EFI_IMAGE_INPUT             *Image,\r
 VOID\r
 Output1bitPixel (\r
   IN OUT EFI_IMAGE_INPUT             *Image,\r
@@ -269,8 +263,8 @@ Output1bitPixel (
   IN EFI_HII_IMAGE_PALETTE_INFO      *PaletteInfo\r
   )\r
 {\r
   IN EFI_HII_IMAGE_PALETTE_INFO      *PaletteInfo\r
   )\r
 {\r
-  UINT16                             X;\r
-  UINT16                             Y;\r
+  UINT16                             Xpos;\r
+  UINT16                             Ypos;\r
   UINTN                              OffsetY;\r
   UINT8                              Index;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      *BitMapPtr;\r
   UINTN                              OffsetY;\r
   UINT8                              Index;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      *BitMapPtr;\r
@@ -300,18 +294,18 @@ Output1bitPixel (
   //\r
   // Convert the pixel from one bit to corresponding color.\r
   //\r
   //\r
   // Convert the pixel from one bit to corresponding color.\r
   //\r
-  for (Y = 0; Y < Image->Height; Y++) {\r
-    OffsetY = BITMAP_LEN_1_BIT (Image->Width, Y);\r
+  for (Ypos = 0; Ypos < Image->Height; Ypos++) {\r
+    OffsetY = BITMAP_LEN_1_BIT (Image->Width, Ypos);\r
     //\r
     // All bits in these bytes are meaningful\r
     //\r
     //\r
     // All bits in these bytes are meaningful\r
     //\r
-    for (X = 0; X < Image->Width / 8; X++) {\r
-      Byte = *(Data + OffsetY + X);\r
+    for (Xpos = 0; Xpos < Image->Width / 8; Xpos++) {\r
+      Byte = *(Data + OffsetY + Xpos);\r
       for (Index = 0; Index < 8; Index++) {\r
         if ((Byte & (1 << Index)) != 0) {\r
       for (Index = 0; Index < 8; Index++) {\r
         if ((Byte & (1 << Index)) != 0) {\r
-          BitMapPtr[Y * Image->Width + X * 8 + (8 - Index - 1)] = PaletteValue[1];\r
+          BitMapPtr[Ypos * Image->Width + Xpos * 8 + (8 - Index - 1)] = PaletteValue[1];\r
         } else {\r
         } else {\r
-          BitMapPtr[Y * Image->Width + X * 8 + (8 - Index - 1)] = PaletteValue[0];\r
+          BitMapPtr[Ypos * Image->Width + Xpos * 8 + (8 - Index - 1)] = PaletteValue[0];\r
         }\r
       }\r
     }\r
         }\r
       }\r
     }\r
@@ -320,12 +314,12 @@ Output1bitPixel (
       //\r
       // Padding bits in this byte should be ignored.\r
       //\r
       //\r
       // Padding bits in this byte should be ignored.\r
       //\r
-      Byte = *(Data + OffsetY + X);\r
+      Byte = *(Data + OffsetY + Xpos);\r
       for (Index = 0; Index < Image->Width % 8; Index++) {\r
         if ((Byte & (1 << (8 - Index - 1))) != 0) {\r
       for (Index = 0; Index < Image->Width % 8; Index++) {\r
         if ((Byte & (1 << (8 - Index - 1))) != 0) {\r
-          BitMapPtr[Y * Image->Width + X * 8 + Index] = PaletteValue[1];\r
+          BitMapPtr[Ypos * Image->Width + Xpos * 8 + Index] = PaletteValue[1];\r
         } else {\r
         } else {\r
-          BitMapPtr[Y * Image->Width + X * 8 + Index] = PaletteValue[0];\r
+          BitMapPtr[Ypos * Image->Width + Xpos * 8 + Index] = PaletteValue[0];\r
         }\r
       }\r
     }\r
         }\r
       }\r
     }\r
@@ -336,15 +330,17 @@ Output1bitPixel (
 /**\r
   Output pixels in "4 bit per pixel" format to an image.\r
 \r
 /**\r
   Output pixels in "4 bit per pixel" format to an image.\r
 \r
+  This is a internal function.\r
+\r
+\r
   @param  Image                  Points to the image which will store the pixels.\r
   @param  Data                   Stores the value of output pixels, 0 ~ 15.\r
   @param  Image                  Points to the image which will store the pixels.\r
   @param  Data                   Stores the value of output pixels, 0 ~ 15.\r
-  @param  PaletteInfo            PaletteInfo which stores the color of the output\r
+  @param[in]  PaletteInfo            PaletteInfo which stores the color of the output\r
                                  pixels. Each entry corresponds to a color within\r
                                  [0, 15].\r
 \r
 \r
 **/\r
                                  pixels. Each entry corresponds to a color within\r
                                  [0, 15].\r
 \r
 \r
 **/\r
-STATIC\r
 VOID\r
 Output4bitPixel (\r
   IN OUT EFI_IMAGE_INPUT             *Image,\r
 VOID\r
 Output4bitPixel (\r
   IN OUT EFI_IMAGE_INPUT             *Image,\r
@@ -352,8 +348,8 @@ Output4bitPixel (
   IN EFI_HII_IMAGE_PALETTE_INFO      *PaletteInfo\r
   )\r
 {\r
   IN EFI_HII_IMAGE_PALETTE_INFO      *PaletteInfo\r
   )\r
 {\r
-  UINT16                             X;\r
-  UINT16                             Y;\r
+  UINT16                             Xpos;\r
+  UINT16                             Ypos;\r
   UINTN                              OffsetY;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      *BitMapPtr;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      PaletteValue[16];\r
   UINTN                              OffsetY;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      *BitMapPtr;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      PaletteValue[16];\r
@@ -383,23 +379,23 @@ Output4bitPixel (
   //\r
   // Convert the pixel from 4 bit to corresponding color.\r
   //\r
   //\r
   // Convert the pixel from 4 bit to corresponding color.\r
   //\r
-  for (Y = 0; Y < Image->Height; Y++) {\r
-    OffsetY = BITMAP_LEN_4_BIT (Image->Width, Y);\r
+  for (Ypos = 0; Ypos < Image->Height; Ypos++) {\r
+    OffsetY = BITMAP_LEN_4_BIT (Image->Width, Ypos);\r
     //\r
     // All bits in these bytes are meaningful\r
     //\r
     //\r
     // All bits in these bytes are meaningful\r
     //\r
-    for (X = 0; X < Image->Width / 2; X++) {\r
-      Byte = *(Data + OffsetY + X);\r
-      BitMapPtr[Y * Image->Width + X * 2]     = PaletteValue[Byte >> 4];\r
-      BitMapPtr[Y * Image->Width + X * 2 + 1] = PaletteValue[Byte & 0x0F];\r
+    for (Xpos = 0; Xpos < Image->Width / 2; Xpos++) {\r
+      Byte = *(Data + OffsetY + Xpos);\r
+      BitMapPtr[Ypos * Image->Width + Xpos * 2]     = PaletteValue[Byte >> 4];\r
+      BitMapPtr[Ypos * Image->Width + Xpos * 2 + 1] = PaletteValue[Byte & 0x0F];\r
     }\r
 \r
     if (Image->Width % 2 != 0) {\r
       //\r
       // Padding bits in this byte should be ignored.\r
       //\r
     }\r
 \r
     if (Image->Width % 2 != 0) {\r
       //\r
       // Padding bits in this byte should be ignored.\r
       //\r
-      Byte = *(Data + OffsetY + X);\r
-      BitMapPtr[Y * Image->Width + X * 2]     = PaletteValue[Byte >> 4];\r
+      Byte = *(Data + OffsetY + Xpos);\r
+      BitMapPtr[Ypos * Image->Width + Xpos * 2]     = PaletteValue[Byte >> 4];\r
     }\r
   }\r
 }\r
     }\r
   }\r
 }\r
@@ -408,15 +404,17 @@ Output4bitPixel (
 /**\r
   Output pixels in "8 bit per pixel" format to an image.\r
 \r
 /**\r
   Output pixels in "8 bit per pixel" format to an image.\r
 \r
+  This is a internal function.\r
+\r
+\r
   @param  Image                  Points to the image which will store the pixels.\r
   @param  Data                   Stores the value of output pixels, 0 ~ 255.\r
   @param  Image                  Points to the image which will store the pixels.\r
   @param  Data                   Stores the value of output pixels, 0 ~ 255.\r
-  @param  PaletteInfo            PaletteInfo which stores the color of the output\r
+  @param[in]  PaletteInfo        PaletteInfo which stores the color of the output\r
                                  pixels. Each entry corresponds to a color within\r
                                  [0, 255].\r
 \r
 \r
 **/\r
                                  pixels. Each entry corresponds to a color within\r
                                  [0, 255].\r
 \r
 \r
 **/\r
-STATIC\r
 VOID\r
 Output8bitPixel (\r
   IN OUT EFI_IMAGE_INPUT             *Image,\r
 VOID\r
 Output8bitPixel (\r
   IN OUT EFI_IMAGE_INPUT             *Image,\r
@@ -424,8 +422,8 @@ Output8bitPixel (
   IN EFI_HII_IMAGE_PALETTE_INFO      *PaletteInfo\r
   )\r
 {\r
   IN EFI_HII_IMAGE_PALETTE_INFO      *PaletteInfo\r
   )\r
 {\r
-  UINT16                             X;\r
-  UINT16                             Y;\r
+  UINT16                             Xpos;\r
+  UINT16                             Ypos;\r
   UINTN                              OffsetY;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      *BitMapPtr;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      PaletteValue[256];\r
   UINTN                              OffsetY;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      *BitMapPtr;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      PaletteValue[256];\r
@@ -454,14 +452,14 @@ Output8bitPixel (
   //\r
   // Convert the pixel from 8 bits to corresponding color.\r
   //\r
   //\r
   // Convert the pixel from 8 bits to corresponding color.\r
   //\r
-  for (Y = 0; Y < Image->Height; Y++) {\r
-    OffsetY = BITMAP_LEN_8_BIT (Image->Width, Y);\r
+  for (Ypos = 0; Ypos < Image->Height; Ypos++) {\r
+    OffsetY = BITMAP_LEN_8_BIT (Image->Width, Ypos);\r
     //\r
     // All bits are meaningful since the bitmap is 8 bits per pixel.\r
     //\r
     //\r
     // All bits are meaningful since the bitmap is 8 bits per pixel.\r
     //\r
-    for (X = 0; X < Image->Width; X++) {\r
-      Byte = *(Data + OffsetY + X);\r
-      BitMapPtr[OffsetY + X] = PaletteValue[Byte];\r
+    for (Xpos = 0; Xpos < Image->Width; Xpos++) {\r
+      Byte = *(Data + OffsetY + Xpos);\r
+      BitMapPtr[OffsetY + Xpos] = PaletteValue[Byte];\r
     }\r
   }\r
 \r
     }\r
   }\r
 \r
@@ -471,20 +469,22 @@ Output8bitPixel (
 /**\r
   Output pixels in "24 bit per pixel" format to an image.\r
 \r
 /**\r
   Output pixels in "24 bit per pixel" format to an image.\r
 \r
+  This is a internal function.\r
+\r
+\r
   @param  Image                  Points to the image which will store the pixels.\r
   @param  Data                   Stores the color of output pixels, allowing 16.8\r
                                  millions colors.\r
 \r
 \r
 **/\r
   @param  Image                  Points to the image which will store the pixels.\r
   @param  Data                   Stores the color of output pixels, allowing 16.8\r
                                  millions colors.\r
 \r
 \r
 **/\r
-STATIC\r
 VOID\r
 Output24bitPixel (\r
   IN OUT EFI_IMAGE_INPUT             *Image,\r
   IN EFI_HII_RGB_PIXEL               *Data\r
   )\r
 {\r
 VOID\r
 Output24bitPixel (\r
   IN OUT EFI_IMAGE_INPUT             *Image,\r
   IN EFI_HII_RGB_PIXEL               *Data\r
   )\r
 {\r
-  UINT16                             Y;\r
+  UINT16                             Ypos;\r
   UINTN                              OffsetY;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      *BitMapPtr;\r
 \r
   UINTN                              OffsetY;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      *BitMapPtr;\r
 \r
@@ -492,8 +492,8 @@ Output24bitPixel (
 \r
   BitMapPtr = Image->Bitmap;\r
 \r
 \r
   BitMapPtr = Image->Bitmap;\r
 \r
-  for (Y = 0; Y < Image->Height; Y++) {\r
-    OffsetY = BITMAP_LEN_8_BIT (Image->Width, Y);\r
+  for (Ypos = 0; Ypos < Image->Height; Ypos++) {\r
+    OffsetY = BITMAP_LEN_8_BIT (Image->Width, Ypos);\r
     CopyRgbToGopPixel (&BitMapPtr[OffsetY], &Data[OffsetY], Image->Width);\r
   }\r
 \r
     CopyRgbToGopPixel (&BitMapPtr[OffsetY], &Data[OffsetY], Image->Width);\r
   }\r
 \r
@@ -503,7 +503,12 @@ Output24bitPixel (
 /**\r
   Convert the image from EFI_IMAGE_INPUT to EFI_IMAGE_OUTPUT format.\r
 \r
 /**\r
   Convert the image from EFI_IMAGE_INPUT to EFI_IMAGE_OUTPUT format.\r
 \r
+  This is a internal function.\r
+\r
+\r
   @param  BltBuffer              Buffer points to bitmap data of incoming image.\r
   @param  BltBuffer              Buffer points to bitmap data of incoming image.\r
+  @param  BltX                   Specifies the offset from the left and top edge of\r
+                                  the output image of the first pixel in the image.\r
   @param  BltY                   Specifies the offset from the left and top edge of\r
                                   the output image of the first pixel in the image.\r
   @param  Width                  Width of the incoming image, in pixels.\r
   @param  BltY                   Specifies the offset from the left and top edge of\r
                                   the output image of the first pixel in the image.\r
   @param  Width                  Width of the incoming image, in pixels.\r
@@ -517,7 +522,6 @@ Output24bitPixel (
   @retval EFI_INVALID_PARAMETER  Any incoming parameter is invalid.\r
 \r
 **/\r
   @retval EFI_INVALID_PARAMETER  Any incoming parameter is invalid.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ImageToBlt (\r
   IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL   *BltBuffer,\r
 EFI_STATUS\r
 ImageToBlt (\r
   IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL   *BltBuffer,\r
@@ -530,8 +534,8 @@ ImageToBlt (
   )\r
 {\r
   EFI_IMAGE_OUTPUT                   *ImageOut;\r
   )\r
 {\r
   EFI_IMAGE_OUTPUT                   *ImageOut;\r
-  UINTN                              X;\r
-  UINTN                              Y;\r
+  UINTN                              Xpos;\r
+  UINTN                              Ypos;\r
   UINTN                              OffsetY1; // src buffer\r
   UINTN                              OffsetY2; // dest buffer\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      SrcPixel;\r
   UINTN                              OffsetY1; // src buffer\r
   UINTN                              OffsetY2; // dest buffer\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      SrcPixel;\r
@@ -552,17 +556,17 @@ ImageToBlt (
 \r
   ZeroMem (&ZeroPixel, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));\r
 \r
 \r
   ZeroMem (&ZeroPixel, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));\r
 \r
-  for (Y = 0; Y < Height; Y++) {\r
-    OffsetY1 = Width * Y;\r
-    OffsetY2 = ImageOut->Width * (BltY + Y);\r
-    for (X = 0; X < Width; X++) {\r
-      SrcPixel = BltBuffer[OffsetY1 + X];\r
+  for (Ypos = 0; Ypos < Height; Ypos++) {\r
+    OffsetY1 = Width * Ypos;\r
+    OffsetY2 = ImageOut->Width * (BltY + Ypos);\r
+    for (Xpos = 0; Xpos < Width; Xpos++) {\r
+      SrcPixel = BltBuffer[OffsetY1 + Xpos];\r
       if (Transparent) {\r
         if (CompareMem (&SrcPixel, &ZeroPixel, 3) != 0) {\r
       if (Transparent) {\r
         if (CompareMem (&SrcPixel, &ZeroPixel, 3) != 0) {\r
-          ImageOut->Image.Bitmap[OffsetY2 + BltX + X] = SrcPixel;\r
+          ImageOut->Image.Bitmap[OffsetY2 + BltX + Xpos] = SrcPixel;\r
         }\r
       } else {\r
         }\r
       } else {\r
-        ImageOut->Image.Bitmap[OffsetY2 + BltX + X] = SrcPixel;\r
+        ImageOut->Image.Bitmap[OffsetY2 + BltX + Xpos] = SrcPixel;\r
       }\r
     }\r
   }\r
       }\r
     }\r
   }\r
@@ -793,9 +797,6 @@ HiiNewImage (
   @param  ImageId                The image's id,, which is unique within\r
                                  PackageList.\r
   @param  Image                  Points to the image.\r
   @param  ImageId                The image's id,, which is unique within\r
                                  PackageList.\r
   @param  Image                  Points to the image.\r
-  @param  ImageSize              On entry, points to the size of the buffer pointed\r
-                                 to by Image, in bytes.  On return, points to the\r
-                                 length of the image, in bytes.\r
 \r
   @retval EFI_SUCCESS            The new image was returned successfully.\r
   @retval EFI_NOT_FOUND           The image specified by ImageId is not in the\r
 \r
   @retval EFI_SUCCESS            The new image was returned successfully.\r
   @retval EFI_NOT_FOUND           The image specified by ImageId is not in the\r
@@ -1197,6 +1198,8 @@ HiiSetImage (
                                  will be allocated to hold  the generated image and\r
                                  the pointer updated on exit. It is the caller's\r
                                  responsibility to free this buffer.\r
                                  will be allocated to hold  the generated image and\r
                                  the pointer updated on exit. It is the caller's\r
                                  responsibility to free this buffer.\r
+  @param  BltX                   Specifies the offset from the left and top edge of\r
+                                 the  output image of the first pixel in the image.\r
   @param  BltY                   Specifies the offset from the left and top edge of\r
                                  the  output image of the first pixel in the image.\r
 \r
   @param  BltY                   Specifies the offset from the left and top edge of\r
                                  the  output image of the first pixel in the image.\r
 \r
@@ -1226,8 +1229,8 @@ HiiDrawImage (
   UINTN                               BufferLen;\r
   UINTN                               Width;\r
   UINTN                               Height;\r
   UINTN                               BufferLen;\r
   UINTN                               Width;\r
   UINTN                               Height;\r
-  UINTN                               X;\r
-  UINTN                               Y;\r
+  UINTN                               Xpos;\r
+  UINTN                               Ypos;\r
   UINTN                               OffsetY1;\r
   UINTN                               OffsetY2;\r
   EFI_FONT_DISPLAY_INFO               *FontInfo;\r
   UINTN                               OffsetY1;\r
   UINTN                               OffsetY2;\r
   EFI_FONT_DISPLAY_INFO               *FontInfo;\r
@@ -1309,11 +1312,11 @@ HiiDrawImage (
     if (Width == ImageIn->Width && Height == ImageIn->Height) {\r
       CopyMem (BltBuffer, ImageIn->Bitmap, BufferLen);\r
     } else {\r
     if (Width == ImageIn->Width && Height == ImageIn->Height) {\r
       CopyMem (BltBuffer, ImageIn->Bitmap, BufferLen);\r
     } else {\r
-      for (Y = 0; Y < Height; Y++) {\r
-        OffsetY1 = ImageIn->Width * Y;\r
-        OffsetY2 = Width * Y;\r
-        for (X = 0; X < Width; X++) {\r
-          BltBuffer[OffsetY2 + X] = ImageIn->Bitmap[OffsetY1 + X];\r
+      for (Ypos = 0; Ypos < Height; Ypos++) {\r
+        OffsetY1 = ImageIn->Width * Ypos;\r
+        OffsetY2 = Width * Ypos;\r
+        for (Xpos = 0; Xpos < Width; Xpos++) {\r
+          BltBuffer[OffsetY2 + Xpos] = ImageIn->Bitmap[OffsetY1 + Xpos];\r
         }\r
       }\r
     }\r
         }\r
       }\r
     }\r
@@ -1442,6 +1445,8 @@ HiiDrawImage (
                                  allocated to hold  the generated image and the\r
                                  pointer updated on exit. It is the caller's\r
                                  responsibility to free this buffer.\r
                                  allocated to hold  the generated image and the\r
                                  pointer updated on exit. It is the caller's\r
                                  responsibility to free this buffer.\r
+  @param  BltX                   Specifies the offset from the left and top edge of\r
+                                 the  output image of the first pixel in the image.\r
   @param  BltY                   Specifies the offset from the left and top edge of\r
                                  the  output image of the first pixel in the image.\r
 \r
   @param  BltY                   Specifies the offset from the left and top edge of\r
                                  the  output image of the first pixel in the image.\r
 \r
index 007be630da1e8ca6ed3e5e8cf43c38502ad3aba4..7c3e9b8b35162a6148f439f51a6f0721c0c73da9 100644 (file)
@@ -1,4 +1,6 @@
-/**@file\r
+/** @file\r
+Implement a utility function named R8_EfiLibCompareLanguage.\r
+\r
   Copyright (c) 2007 - 2008, Intel Corporation\r
 \r
   All rights reserved. This program and the accompanying materials\r
   Copyright (c) 2007 - 2008, Intel Corporation\r
 \r
   All rights reserved. This program and the accompanying materials\r
index 9ca8d1548215d86dab66a069e9155de8c3f3283c..9a4f966a463e1b831a8632f39b03a411fbd5ed87 100644 (file)
@@ -1,4 +1,6 @@
-/**@file
+/** @file
+Implement a utility function named R8_EfiLibCompareLanguage.
+
   Copyright (c) 2007 - 2008, Intel Corporation
 
   All rights reserved. This program and the accompanying materials
   Copyright (c) 2007 - 2008, Intel Corporation
 
   All rights reserved. This program and the accompanying materials
index f6a4cdf02d028b2dd05c894487d645ac88f0c732..9850cba8e04c3873f7e7ba34a430b92bdea38b36 100644 (file)
@@ -1,4 +1,6 @@
 /** @file\r
 /** @file\r
+Implementation for EFI_HII_STRING_PROTOCOL.\r
+\r
 \r
 Copyright (c) 2007, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 \r
 Copyright (c) 2007, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -9,17 +11,6 @@ http://opensource.org/licenses/bsd-license.php
 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
-\r
-    String.c\r
-\r
-Abstract:\r
-\r
-    Implementation for EFI_HII_STRING_PROTOCOL.\r
-\r
-Revision History\r
-\r
-\r
 **/\r
 \r
 \r
 **/\r
 \r
 \r
@@ -38,6 +29,9 @@ CHAR16 mLanguageWindow[16] = {
   font info list or not. (i.e. HII_FONT_INFO is generated.) If not, create\r
   a HII_FONT_INFO to refer it locally.\r
 \r
   font info list or not. (i.e. HII_FONT_INFO is generated.) If not, create\r
   a HII_FONT_INFO to refer it locally.\r
 \r
+  This is a internal function.\r
+\r
+\r
   @param  Private                Hii database private structure.\r
   @param  StringPackage          HII string package instance.\r
   @param  FontId                Font identifer, which must be unique within the string package.\r
   @param  Private                Hii database private structure.\r
   @param  StringPackage          HII string package instance.\r
   @param  FontId                Font identifer, which must be unique within the string package.\r
@@ -53,7 +47,6 @@ CHAR16 mLanguageWindow[16] = {
   @retval FALSE                  Not referred before calling this function.\r
 \r
 **/\r
   @retval FALSE                  Not referred before calling this function.\r
 \r
 **/\r
-STATIC\r
 BOOLEAN\r
 ReferFontInfoLocally (\r
   IN  HII_DATABASE_PRIVATE_DATA   *Private,\r
 BOOLEAN\r
 ReferFontInfoLocally (\r
   IN  HII_DATABASE_PRIVATE_DATA   *Private,\r
@@ -104,8 +97,12 @@ ReferFontInfoLocally (
 /**\r
   Convert Ascii string text to unicode string test.\r
 \r
 /**\r
   Convert Ascii string text to unicode string test.\r
 \r
-  @param  StringSrc              Points to current null-terminated Ascii string.\r
-  @param  StringDest             Buffer to store the converted string text.\r
+  This is a internal function.\r
+\r
+\r
+  @param  StringDest             Buffer to store the string text. If it is NULL,\r
+                                 only the size will be returned.\r
+  @param  StringSrc              Points to current null-terminated string.\r
   @param  BufferSize             Length of the buffer.\r
 \r
   @retval EFI_SUCCESS            The string text was outputed successfully.\r
   @param  BufferSize             Length of the buffer.\r
 \r
   @retval EFI_SUCCESS            The string text was outputed successfully.\r
@@ -114,7 +111,6 @@ ReferFontInfoLocally (
                                  size.\r
 \r
 **/\r
                                  size.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 ConvertToUnicodeText (\r
   OUT EFI_STRING       StringDest,\r
 EFI_STATUS\r
 ConvertToUnicodeText (\r
   OUT EFI_STRING       StringDest,\r
@@ -146,8 +142,11 @@ ConvertToUnicodeText (
   Calculate the size of StringSrc and output it. If StringDest is not NULL,\r
   copy string text from src to dest.\r
 \r
   Calculate the size of StringSrc and output it. If StringDest is not NULL,\r
   copy string text from src to dest.\r
 \r
+  This is a internal function.\r
+\r
+  @param  StringDest             Buffer to store the string text. If it is NULL,\r
+                                 only the size will be returned.\r
   @param  StringSrc              Points to current null-terminated string.\r
   @param  StringSrc              Points to current null-terminated string.\r
-  @param  StringDest             Buffer to store the string text.\r
   @param  BufferSize             Length of the buffer.\r
 \r
   @retval EFI_SUCCESS            The string text was outputed successfully.\r
   @param  BufferSize             Length of the buffer.\r
 \r
   @retval EFI_SUCCESS            The string text was outputed successfully.\r
@@ -156,7 +155,6 @@ ConvertToUnicodeText (
                                  size.\r
 \r
 **/\r
                                  size.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 GetUnicodeStringTextOrSize (\r
   OUT EFI_STRING       StringDest, OPTIONAL\r
 EFI_STATUS\r
 GetUnicodeStringTextOrSize (\r
   OUT EFI_STRING       StringDest, OPTIONAL\r
@@ -194,6 +192,8 @@ GetUnicodeStringTextOrSize (
 /**\r
   Copy string font info to a buffer.\r
 \r
 /**\r
   Copy string font info to a buffer.\r
 \r
+  This is a internal function.\r
+\r
   @param  StringPackage          Hii string package instance.\r
   @param  FontId                 Font identifier which is unique in a string\r
                                  package.\r
   @param  StringPackage          Hii string package instance.\r
   @param  FontId                 Font identifier which is unique in a string\r
                                  package.\r
@@ -204,7 +204,6 @@ GetUnicodeStringTextOrSize (
   @retval EFI_NOT_FOUND          The specified font id does not exist.\r
 \r
 **/\r
   @retval EFI_NOT_FOUND          The specified font id does not exist.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 GetStringFontInfo (\r
   IN  HII_STRING_PACKAGE_INSTANCE     *StringPackage,\r
 EFI_STATUS\r
 GetStringFontInfo (\r
   IN  HII_STRING_PACKAGE_INSTANCE     *StringPackage,\r
@@ -567,6 +566,8 @@ FindStringBlock (
 /**\r
   Parse all string blocks to get a string specified by StringId.\r
 \r
 /**\r
   Parse all string blocks to get a string specified by StringId.\r
 \r
+  This is a internal function.\r
+\r
   @param  Private                Hii database private structure.\r
   @param  StringPackage          Hii string package instance.\r
   @param  StringId               The string's id, which is unique within\r
   @param  Private                Hii database private structure.\r
   @param  StringPackage          Hii string package instance.\r
   @param  StringId               The string's id, which is unique within\r
@@ -587,7 +588,6 @@ FindStringBlock (
                                  hold the string.\r
 \r
 **/\r
                                  hold the string.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 GetStringWorker (\r
   IN HII_DATABASE_PRIVATE_DATA        *Private,\r
 EFI_STATUS\r
 GetStringWorker (\r
   IN HII_DATABASE_PRIVATE_DATA        *Private,\r
@@ -676,6 +676,8 @@ GetStringWorker (
 /**\r
   Parse all string blocks to set a String specified by StringId.\r
 \r
 /**\r
   Parse all string blocks to set a String specified by StringId.\r
 \r
+  This is a internal function.\r
+\r
   @param  Private                HII database driver private structure.\r
   @param  StringPackage          HII string package instance.\r
   @param  StringId               The string's id, which is unique within\r
   @param  Private                HII database driver private structure.\r
   @param  StringPackage          HII string package instance.\r
   @param  StringId               The string's id, which is unique within\r
@@ -693,7 +695,6 @@ GetStringWorker (
                                  task.\r
 \r
 **/\r
                                  task.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 SetStringWorker (\r
   IN  HII_DATABASE_PRIVATE_DATA       *Private,\r
 EFI_STATUS\r
 SetStringWorker (\r
   IN  HII_DATABASE_PRIVATE_DATA       *Private,\r
@@ -1557,14 +1558,14 @@ HiiGetLanguages (
                                  FirstLanguage. If there are no secondary\r
                                  languages, the function  returns successfully, but\r
                                  this is set to NULL.\r
                                  FirstLanguage. If there are no secondary\r
                                  languages, the function  returns successfully, but\r
                                  this is set to NULL.\r
-  @param  SecondaryLanguageSize  On entry, points to the size of the buffer pointed\r
-                                 to  by SecondLanguages, in bytes. On return,\r
-                                 points to the length of SecondLanguages in bytes.\r
+  @param  SecondaryLanguagesSize On entry, points to the size of the buffer pointed\r
+                                 to  by SecondaryLanguages, in bytes. On return,\r
+                                 points to the length of SecondaryLanguages in bytes.\r
 \r
   @retval EFI_SUCCESS            Secondary languages were correctly returned.\r
 \r
   @retval EFI_SUCCESS            Secondary languages were correctly returned.\r
-  @retval EFI_INVALID_PARAMETER  FirstLanguage or SecondLanguages or\r
-                                 SecondLanguagesSize was NULL.\r
-  @retval EFI_BUFFER_TOO_SMALL   The buffer specified by SecondLanguagesSize is\r
+  @retval EFI_INVALID_PARAMETER  FirstLanguage or SecondaryLanguages or\r
+                                 SecondaryLanguagesSize was NULL.\r
+  @retval EFI_BUFFER_TOO_SMALL   The buffer specified by SecondaryLanguagesSize is\r
                                  too small to hold the returned information.\r
                                  SecondLanguageSize is updated to hold the size of\r
                                  the buffer required.\r
                                  too small to hold the returned information.\r
                                  SecondLanguageSize is updated to hold the size of\r
                                  the buffer required.\r
@@ -1579,8 +1580,8 @@ HiiGetSecondaryLanguages (
   IN CONST EFI_HII_STRING_PROTOCOL   *This,\r
   IN EFI_HII_HANDLE                  PackageList,\r
   IN CONST CHAR8                     *FirstLanguage,\r
   IN CONST EFI_HII_STRING_PROTOCOL   *This,\r
   IN EFI_HII_HANDLE                  PackageList,\r
   IN CONST CHAR8                     *FirstLanguage,\r
-  IN OUT CHAR8                       *SecondLanguages,\r
-  IN OUT UINTN                       *SecondLanguagesSize\r
+  IN OUT CHAR8                       *SecondaryLanguages,\r
+  IN OUT UINTN                       *SecondaryLanguagesSize\r
   )\r
 {\r
   LIST_ENTRY                          *Link;\r
   )\r
 {\r
   LIST_ENTRY                          *Link;\r
@@ -1595,7 +1596,7 @@ HiiGetSecondaryLanguages (
   if (This == NULL || PackageList == NULL || FirstLanguage == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if (This == NULL || PackageList == NULL || FirstLanguage == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  if (SecondLanguages == NULL || SecondLanguagesSize == NULL) {\r
+  if (SecondaryLanguages == NULL || SecondaryLanguagesSize == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if (!IsHiiHandleValid (PackageList)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if (!IsHiiHandleValid (PackageList)) {\r
@@ -1637,10 +1638,10 @@ HiiGetSecondaryLanguages (
       Languages++;\r
 \r
       ResultSize = AsciiStrSize (Languages);\r
       Languages++;\r
 \r
       ResultSize = AsciiStrSize (Languages);\r
-      if (ResultSize <= *SecondLanguagesSize) {\r
-        AsciiStrCpy (SecondLanguages, Languages);\r
+      if (ResultSize <= *SecondaryLanguagesSize) {\r
+        AsciiStrCpy (SecondaryLanguages, Languages);\r
       } else {\r
       } else {\r
-        *SecondLanguagesSize = ResultSize;\r
+        *SecondaryLanguagesSize = ResultSize;\r
         return EFI_BUFFER_TOO_SMALL;\r
       }\r
 \r
         return EFI_BUFFER_TOO_SMALL;\r
       }\r
 \r