mirror of https://github.com/acidanthera/audk.git
Update HiiCompareLanguage() function to use GetBestLanguage() API to do RFC4646 language compare.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11319 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8dc8879ab3
commit
7a07cec6c0
|
@ -1967,23 +1967,7 @@ HiiCompareLanguage (
|
||||||
IN CHAR8 *Language2
|
IN CHAR8 *Language2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//
|
if (GetBestLanguage (Language1, FALSE, Language2, NULL) != NULL) {
|
||||||
// Porting Guide:
|
|
||||||
// This library interface is simply obsolete.
|
|
||||||
// Include the source code to user code.
|
|
||||||
//
|
|
||||||
UINTN Index;
|
|
||||||
|
|
||||||
for (Index = 0; (Language1[Index] != 0) && (Language2[Index] != 0); Index++) {
|
|
||||||
if (Language1[Index] != Language2[Index]) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (((Language1[Index] == 0) && (Language2[Index] == 0)) ||
|
|
||||||
((Language1[Index] == 0) && (Language2[Index] != ';')) ||
|
|
||||||
((Language1[Index] == ';') && (Language2[Index] != 0)) ||
|
|
||||||
((Language1[Index] == ';') && (Language2[Index] != ';'))) {
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue