]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/HiiDatabaseDxe/R8Lib.c
1) Add BufToHexString, HexStringToBuf and IsHexDigit to BaseLib.
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / R8Lib.c
CommitLineData
93e3992d 1/**@file\r
36fe40c2 2 Copyright (c) 2007 - 2008, Intel Corporation\r
93e3992d 3\r
4 All rights reserved. This program and the accompanying materials\r
5 are licensed and made available under the terms and conditions of the BSD License\r
6 which accompanies this distribution. The full text of the license may be found at\r
7 http://opensource.org/licenses/bsd-license.php\r
8\r
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12\r
13**/\r
14\r
15#include "HiiDatabase.h"\r
16\r
17\r
93e3992d 18/**\r
19 Compare whether two names of languages are identical.\r
20\r
21 @param Language1 Name of language 1\r
22 @param Language2 Name of language 2\r
23\r
24 @retval TRUE same\r
25 @retval FALSE not same\r
26\r
27**/\r
28BOOLEAN\r
29R8_EfiLibCompareLanguage (\r
30 IN CHAR8 *Language1,\r
31 IN CHAR8 *Language2\r
32 )\r
33{\r
34 //\r
35 // Porting Guide:\r
36 // This library interface is simply obsolete.\r
37 // Include the source code to user code.\r
38 //\r
39 UINTN Index;\r
40\r
41 for (Index = 0; (Language1[Index] != 0) && (Language2[Index] != 0); Index++) {\r
42 if (Language1[Index] != Language2[Index]) {\r
43 return FALSE;\r
44 }\r
45 }\r
46\r
47 if (((Language1[Index] == 0) && (Language2[Index] == 0)) || \r
48 ((Language1[Index] == 0) && (Language2[Index] != ';')) ||\r
49 ((Language1[Index] == ';') && (Language2[Index] != 0)) ||\r
50 ((Language1[Index] == ';') && (Language2[Index] != ';'))) {\r
51 return TRUE;\r
52 }\r
53\r
54 return FALSE;\r
55}\r
56\r
57\r
58\r