From 7a07cec6c0ad8f6f7cc26643fb14330efc2641ed Mon Sep 17 00:00:00 2001 From: lgao4 Date: Wed, 16 Feb 2011 06:02:07 +0000 Subject: 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 --- MdeModulePkg/Universal/HiiDatabaseDxe/String.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c index 0846abfe42..c568f19607 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c @@ -1967,23 +1967,7 @@ HiiCompareLanguage ( IN CHAR8 *Language2 ) { - // - // 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] != ';'))) { + if (GetBestLanguage (Language1, FALSE, Language2, NULL) != NULL) { return TRUE; } -- cgit v1.2.3