]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Strings.c
Fix some inconsistencies in EFIAPI usage.
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiOnUefiHiiThunk / Strings.c
Content-type: text/html ]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Strings.c


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 6) line 1, <$fd> line 201.
CommitLineData
4259256b 1/**@file\r
0368663f 2 This file implements the protocol functions related to string package.\r
3 \r
4259256b 4Copyright (c) 2006 - 2008, Intel Corporation\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15\r
16#include "HiiDatabase.h"\r
17\r
133a9dfb 18typedef struct {\r
19 CHAR8 *Iso639;\r
20 CHAR8 *Rfc3066;\r
21} ISO639TORFC3066MAP;\r
22\r
23ISO639TORFC3066MAP Iso639ToRfc3066Map [] = {\r
24 {"eng", "en-US"},\r
25 {"fra", "fr-FR"},\r
26};\r
27\r
28CHAR8 *\r
29ConvertIso639ToRfc3066 (\r
30 CHAR8 *Iso638Lang\r
31 )\r
32{\r
33 UINTN Index;\r
66df2531
LG
34 CHAR8 AsciiLanguage[ISO_639_2_ENTRY_SIZE + 1];\r
35 \r
36 AsciiStrnCpy (AsciiLanguage, Iso638Lang, sizeof (AsciiLanguage));\r
37 for (Index = 0; Index < ISO_639_2_ENTRY_SIZE + 1; Index ++) {\r
38 if (AsciiLanguage [Index] == 0) {\r
39 break;\r
40 } else if (AsciiLanguage [Index] >= 'A' && AsciiLanguage [Index] <= 'Z') {\r
98b16b9d 41 AsciiLanguage [Index] = (CHAR8) (AsciiLanguage [Index] - 'A' + 'a');\r
66df2531
LG
42 }\r
43 }\r
133a9dfb 44\r
45 for (Index = 0; Index < sizeof (Iso639ToRfc3066Map) / sizeof (Iso639ToRfc3066Map[0]); Index++) {\r
66df2531 46 if (AsciiStrnCmp (AsciiLanguage, Iso639ToRfc3066Map[Index].Iso639, AsciiStrSize (AsciiLanguage)) == 0) {\r
133a9dfb 47 return Iso639ToRfc3066Map[Index].Rfc3066;\r
48 }\r
49 }\r
50\r
51 return (CHAR8 *) NULL;\r
52}\r
53\r
3321fa09 54/**\r
55 Test if all of the characters in a string have corresponding font characters.\r
56\r
57 This is a deprecated API. No Framework HII module is calling it. This function will ASSERT and\r
58 return EFI_UNSUPPORTED.\r
133a9dfb 59\r
3321fa09 60 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
61 @param StringToTest A pointer to a Unicode string.\r
62 @param FirstMissing A pointer to an index into the string. On input, the index of \r
63 the first character in the StringToTest to examine. On exit, the index \r
64 of the first character encountered for which a glyph is unavailable. \r
65 If all glyphs in the string are available, the index is the index of the terminator \r
66 of the string. \r
67 @param GlyphBufferSize A pointer to a value. On output, if the function returns EFI_SUCCESS, \r
68