/*++\r
\r
-Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
--*/\r
STATUS\r
StringDBCreateHiiExportPack (\r
- INT8 *FileName\r
+ INT8 *FileName,\r
+ WCHAR_STRING_LIST *LanguagesOfInterest\r
)\r
{\r
FILE *Fptr;\r
WCHAR *TempStringPtr;\r
WCHAR *LangName;\r
STRING_IDENTIFIER *StringIdentifier;\r
+ WCHAR_STRING_LIST *LOIPtr;\r
+ BOOLEAN LanguageOk;\r
+\r
\r
if ((Fptr = fopen (FileName, "wb")) == NULL) {\r
Error (NULL, 0, 0, FileName, "failed to open output HII export file");\r
//\r
ZeroString[0] = 0;\r
for (Lang = mDBData.LanguageList; Lang != NULL; Lang = Lang->Next) {\r
+ //\r
+ // If we have a language list, then make sure this language is in that\r
+ // list.\r
+ //\r
+ LanguageOk = TRUE;\r
+ if (LanguagesOfInterest != NULL) {\r
+ LanguageOk = FALSE;\r
+ for (LOIPtr = LanguagesOfInterest; LOIPtr != NULL; LOIPtr = LOIPtr->Next) {\r
+ if (wcsncmp (LOIPtr->Str, Lang->LanguageName, LANGUAGE_IDENTIFIER_NAME_LEN) == 0) {\r
+ LanguageOk = TRUE;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+\r
+ if (!LanguageOk) {\r
+ continue;\r
+ }\r
+\r
//\r
// Process each string for this language. We have to make 3 passes on the strings:\r
// Pass1: computes sizes and fill in the string pack header\r