]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Retire HiiLibGetNextLanguage() API from HII Library class.
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 17 Apr 2009 02:38:11 +0000 (02:38 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 17 Apr 2009 02:38:11 +0000 (02:38 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8109 6f19259b-4bc3-4df7-8a09-765794883524

EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.h
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Strings.c
IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
IntelFrameworkModulePkg/Universal/BdsDxe/Language.c
IntelFrameworkModulePkg/Universal/BdsDxe/Language.h
MdeModulePkg/Include/Library/HiiLib.h
MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c

index 5a3df71aab52d25e68777d72dbddc08659644495..74ddad0130ceff988595a8932aa29950c6307d13 100644 (file)
@@ -334,7 +334,7 @@ LangCodes3066To639 (
   Index = 0;\r
   AsciiLangCodes = LangCodes3066;\r
   while (AsciiStrLen (AsciiLangCodes) != 0) {\r
-    HiiLibGetNextLanguage (&AsciiLangCodes, Lang);\r
+    GetNextLanguage (&AsciiLangCodes, Lang);\r
     Index++;\r
   }\r
 \r
@@ -352,7 +352,7 @@ LangCodes3066To639 (
   AsciiLangCodes = LangCodes3066;\r
 \r
   for (Index = 0; Index < Count; Index++) {\r
-    HiiLibGetNextLanguage (&AsciiLangCodes, Lang);\r
+    GetNextLanguage (&AsciiLangCodes, Lang);\r
     Status = ConvertRfc3066LanguageToIso639Language (Lang, *LangCodes639 + Index * ISO_639_2_ENTRY_SIZE);\r
     ASSERT_EFI_ERROR (Status);\r
   }\r
index 1583745d80420a9bde00d548f7c6805e3a2ff6d9..8a999b315ce1af1643b098c8db7651437961ad38 100644 (file)
@@ -529,6 +529,26 @@ ConvertIso639LanguageToRfc3066Language (
   )\r
 ;\r
 \r
+/**\r
+  Get next language from language code list (with separator ';').\r
+\r
+  If LangCode is NULL, then ASSERT.\r
+  If Lang is NULL, then ASSERT.\r
+\r
+  @param  LangCode    On input: point to first language in the list. On\r
+                                 output: point to next language in the list, or\r
+                                 NULL if no more language in the list.\r
+  @param  Lang           The first language in the list.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+GetNextLanguage (\r
+  IN OUT CHAR8      **LangCode,\r
+  OUT CHAR8         *Lang\r
+  )\r
+;\r
+\r
 #include "Utility.h"\r
 #include "ConfigAccess.h"\r
 \r
index caa702d5dda17b49fb4ee14afc61ffccc93a2947..3fab323dc70c2c9901bff793af16752a7b5fd646 100644 (file)
@@ -267,6 +267,47 @@ ConvertIso639LanguageToRfc3066Language (
   return NULL;\r
 }\r
 \r
+/**\r
+  Get next language from language code list (with separator ';').\r
+\r
+  If LangCode is NULL, then ASSERT.\r
+  If Lang is NULL, then ASSERT.\r
+\r
+  @param  LangCode    On input: point to first language in the list. On\r
+                                 output: point to next language in the list, or\r
+                                 NULL if no more language in the list.\r
+  @param  Lang           The first language in the list.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+GetNextLanguage (\r
+  IN OUT CHAR8      **LangCode,\r
+  OUT CHAR8         *Lang\r
+  )\r
+{\r
+  UINTN  Index;\r
+  CHAR8  *StringPtr;\r
+\r
+  ASSERT (LangCode != NULL);\r
+  ASSERT (*LangCode != NULL);\r
+  ASSERT (Lang != NULL);\r
+\r
+  Index = 0;\r
+  StringPtr = *LangCode;\r
+  while (StringPtr[Index] != 0 && StringPtr[Index] != ';') {\r
+    Index++;\r
+  }\r
+\r
+  CopyMem (Lang, StringPtr, Index);\r
+  Lang[Index] = 0;\r
+\r
+  if (StringPtr[Index] == ';') {\r
+    Index++;\r
+  }\r
+  *LangCode = StringPtr + Index;\r
+}\r
+\r
 /**\r
   Test if all of the characters in a string have corresponding font characters.\r
 \r
index 99abf1460af827181ac4ca5b09926a3b974e1df0..2719a723fbdbc32ca339258fefde47bbe95b7b06 100644 (file)
@@ -195,7 +195,7 @@ FrontPageCallback (
     Index = 0;\r
     LangCode = LanguageString;\r
     while (*LangCode != 0) {\r
-      HiiLibGetNextLanguage (&LangCode, Lang);\r
+      GetNextLanguage (&LangCode, Lang);\r
 \r
       if (Index == Value->u8) {\r
         break;\r
@@ -419,7 +419,7 @@ InitializeFrontPage (
   OptionCount = 0;\r
   LangCode = LanguageString;\r
   while (*LangCode != 0) {\r
-    HiiLibGetNextLanguage (&LangCode, Lang);\r
+    GetNextLanguage (&LangCode, Lang);\r
 \r
     if (gFrontPagePrivate.LanguageToken == NULL) {\r
       //\r
index 5b154e98ee18c958fda8117b85799881da737f1a..ea66006b4cb65e81543cee751134a11da268824a 100644 (file)
@@ -448,6 +448,47 @@ ConvertRfc3066LanguageToIso639Language (
   return EFI_NOT_FOUND;\r
 }\r
 \r
+/**\r
+  Get next language from language code list (with separator ';').\r
+\r
+  If LangCode is NULL, then ASSERT.\r
+  If Lang is NULL, then ASSERT.\r
+\r
+  @param  LangCode    On input: point to first language in the list. On\r
+                                 output: point to next language in the list, or\r
+                                 NULL if no more language in the list.\r
+  @param  Lang           The first language in the list.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+GetNextLanguage (\r
+  IN OUT CHAR8      **LangCode,\r
+  OUT CHAR8         *Lang\r
+  )\r
+{\r
+  UINTN  Index;\r
+  CHAR8  *StringPtr;\r
+\r
+  ASSERT (LangCode != NULL);\r
+  ASSERT (*LangCode != NULL);\r
+  ASSERT (Lang != NULL);\r
+\r
+  Index = 0;\r
+  StringPtr = *LangCode;\r
+  while (StringPtr[Index] != 0 && StringPtr[Index] != ';') {\r
+    Index++;\r
+  }\r
+\r
+  CopyMem (Lang, StringPtr, Index);\r
+  Lang[Index] = 0;\r
+\r
+  if (StringPtr[Index] == ';') {\r
+    Index++;\r
+  }\r
+  *LangCode = StringPtr + Index;\r
+}\r
+\r
 /**\r
   Determine the current language that will be used\r
   based on language related EFI Variables.\r
index 91bbe9b90de72f6c1f7fc1c4c3779e267e84a047..3ec8aad68d8d478a4d322fb3265b1e34020081c1 100644 (file)
@@ -34,6 +34,25 @@ ConvertRfc3066LanguageToIso639Language (
   OUT CHAR8   *LanguageIso639\r
   );\r
 \r
+/**\r
+  Get next language from language code list (with separator ';').\r
+\r
+  If LangCode is NULL, then ASSERT.\r
+  If Lang is NULL, then ASSERT.\r
+\r
+  @param  LangCode    On input: point to first language in the list. On\r
+                                 output: point to next language in the list, or\r
+                                 NULL if no more language in the list.\r
+  @param  Lang           The first language in the list.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+GetNextLanguage (\r
+  IN OUT CHAR8      **LangCode,\r
+  OUT CHAR8         *Lang\r
+  );\r
+\r
 /**\r
   Determine the current language that will be used\r
   based on language related EFI Variables.\r
index 17420b483d39ad4c5a8989eadd4519bd49da9772..3f0e096fbace2476ce7929c8c2bcbabeeb3ba280 100644 (file)
@@ -223,26 +223,6 @@ HiiGetHiiHandles (
   )\r
 ;\r
 \r
-/**\r
-  Get next language from language code list (with separator ';').\r
-\r
-  If LangCode is NULL, then ASSERT.\r
-  If Lang is NULL, then ASSERT.\r
-\r
-  @param  LangCode    On input: point to first language in the list. On\r
-                                 output: point to next language in the list, or\r
-                                 NULL if no more language in the list.\r
-  @param  Lang           The first language in the list.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-HiiLibGetNextLanguage (\r
-  IN OUT CHAR8      **LangCode,\r
-  OUT CHAR8         *Lang\r
-  )\r
-;\r
-\r
 /**\r
   Retrieves a pointer to the a Null-terminated ASCII string containing the list \r
   of languages that an HII handle in the HII Database supports.  The returned \r
index 45e178c44646ddb7e36cef6a659b4cc17547d56e..07fc59312180f60a70167fa5915841b13d67f59c 100644 (file)
 \r
 #include "InternalHiiLib.h"\r
 \r
-/**\r
-  Get next language from language code list (with separator ';').\r
-\r
-  If LangCode is NULL, then ASSERT.\r
-  If Lang is NULL, then ASSERT.\r
-\r
-  @param  LangCode    On input: point to first language in the list. On\r
-                                 output: point to next language in the list, or\r
-                                 NULL if no more language in the list.\r
-  @param  Lang           The first language in the list.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-HiiLibGetNextLanguage (\r
-  IN OUT CHAR8      **LangCode,\r
-  OUT CHAR8         *Lang\r
-  )\r
-{\r
-  UINTN  Index;\r
-  CHAR8  *StringPtr;\r
-\r
-  ASSERT (LangCode != NULL);\r
-  ASSERT (*LangCode != NULL);\r
-  ASSERT (Lang != NULL);\r
-\r
-  Index = 0;\r
-  StringPtr = *LangCode;\r
-  while (StringPtr[Index] != 0 && StringPtr[Index] != ';') {\r
-    Index++;\r
-  }\r
-\r
-  CopyMem (Lang, StringPtr, Index);\r
-  Lang[Index] = 0;\r
-\r
-  if (StringPtr[Index] == ';') {\r
-    Index++;\r
-  }\r
-  *LangCode = StringPtr + Index;\r
-}\r
-\r
-\r
 /**\r
   Retrieves a pointer to the a Null-terminated ASCII string containing the list \r
   of languages that an HII handle in the HII Database supports.  The returned \r