diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-17 02:38:11 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-17 02:38:11 +0000 |
commit | 0f2685219d6acfbb308cd9c795e2fbb2f6b2371a (patch) | |
tree | 7ae934e8ba026afed2a386c7c09a0ae61b1cc0be /IntelFrameworkModulePkg/Universal | |
parent | bd72aa1a3138c64f9d04ba8f4a93c27173eff7fb (diff) | |
download | edk2-platforms-0f2685219d6acfbb308cd9c795e2fbb2f6b2371a.tar.xz |
Retire HiiLibGetNextLanguage() API from HII Library class.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8109 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c | 4 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/Language.c | 41 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/Language.h | 19 |
3 files changed, 62 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c index 99abf1460a..2719a723fb 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c @@ -195,7 +195,7 @@ FrontPageCallback ( Index = 0;
LangCode = LanguageString;
while (*LangCode != 0) {
- HiiLibGetNextLanguage (&LangCode, Lang);
+ GetNextLanguage (&LangCode, Lang);
if (Index == Value->u8) {
break;
@@ -419,7 +419,7 @@ InitializeFrontPage ( OptionCount = 0;
LangCode = LanguageString;
while (*LangCode != 0) {
- HiiLibGetNextLanguage (&LangCode, Lang);
+ GetNextLanguage (&LangCode, Lang);
if (gFrontPagePrivate.LanguageToken == NULL) {
//
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c b/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c index 5b154e98ee..ea66006b4c 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c @@ -449,6 +449,47 @@ ConvertRfc3066LanguageToIso639Language ( }
/**
+ Get next language from language code list (with separator ';').
+
+ If LangCode is NULL, then ASSERT.
+ If Lang is NULL, then ASSERT.
+
+ @param LangCode On input: point to first language in the list. On
+ output: point to next language in the list, or
+ NULL if no more language in the list.
+ @param Lang The first language in the list.
+
+**/
+VOID
+EFIAPI
+GetNextLanguage (
+ IN OUT CHAR8 **LangCode,
+ OUT CHAR8 *Lang
+ )
+{
+ UINTN Index;
+ CHAR8 *StringPtr;
+
+ ASSERT (LangCode != NULL);
+ ASSERT (*LangCode != NULL);
+ ASSERT (Lang != NULL);
+
+ Index = 0;
+ StringPtr = *LangCode;
+ while (StringPtr[Index] != 0 && StringPtr[Index] != ';') {
+ Index++;
+ }
+
+ CopyMem (Lang, StringPtr, Index);
+ Lang[Index] = 0;
+
+ if (StringPtr[Index] == ';') {
+ Index++;
+ }
+ *LangCode = StringPtr + Index;
+}
+
+/**
Determine the current language that will be used
based on language related EFI Variables.
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Language.h b/IntelFrameworkModulePkg/Universal/BdsDxe/Language.h index 91bbe9b90d..3ec8aad68d 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/Language.h +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Language.h @@ -35,6 +35,25 @@ ConvertRfc3066LanguageToIso639Language ( );
/**
+ Get next language from language code list (with separator ';').
+
+ If LangCode is NULL, then ASSERT.
+ If Lang is NULL, then ASSERT.
+
+ @param LangCode On input: point to first language in the list. On
+ output: point to next language in the list, or
+ NULL if no more language in the list.
+ @param Lang The first language in the list.
+
+**/
+VOID
+EFIAPI
+GetNextLanguage (
+ IN OUT CHAR8 **LangCode,
+ OUT CHAR8 *Lang
+ );
+
+/**
Determine the current language that will be used
based on language related EFI Variables.
|