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