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