TianoCore EDK2 master
Loading...
Searching...
No Matches
UnicodeCollationEng.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI InitializeUnicodeCollationEng (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
INTN EFIAPI EngStriColl (IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN CHAR16 *Str1, IN CHAR16 *Str2)
 
VOID EFIAPI EngStrLwr (IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN OUT CHAR16 *Str)
 
VOID EFIAPI EngStrUpr (IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN OUT CHAR16 *Str)
 
BOOLEAN EFIAPI EngMetaiMatch (IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN CHAR16 *String, IN CHAR16 *Pattern)
 
VOID EFIAPI EngFatToStr (IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN UINTN FatSize, IN CHAR8 *Fat, OUT CHAR16 *String)
 
BOOLEAN EFIAPI EngStrToFat (IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN CHAR16 *String, IN UINTN FatSize, OUT CHAR8 *Fat)
 

Variables

CHAR8 mEngUpperMap [MAP_TABLE_SIZE]
 
CHAR8 mEngLowerMap [MAP_TABLE_SIZE]
 
CHAR8 mEngInfoMap [MAP_TABLE_SIZE]
 
CHAR8 mOtherChars []
 
EFI_HANDLE mHandle = NULL
 
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_COLLATION_PROTOCOL UnicodeEng
 
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_COLLATION_PROTOCOL Unicode2Eng
 

Detailed Description

Driver to implement English version of Unicode Collation Protocol.

Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UnicodeCollationEng.c.

Function Documentation

◆ EngFatToStr()

VOID EFIAPI EngFatToStr ( IN EFI_UNICODE_COLLATION_PROTOCOL This,
IN UINTN  FatSize,
IN CHAR8 *  Fat,
OUT CHAR16 *  String 
)

Converts an 8.3 FAT file name in an OEM character set to a Null-terminated string.

Parameters
ThisProtocol instance pointer.
FatSizeThe size of the string Fat in bytes.
FatA pointer to a Null-terminated string that contains an 8.3 file name using an 8-bit OEM character set.
StringA pointer to a Null-terminated string. The string must be preallocated to hold FatSize characters.

Definition at line 388 of file UnicodeCollationEng.c.

◆ EngMetaiMatch()

BOOLEAN EFIAPI EngMetaiMatch ( IN EFI_UNICODE_COLLATION_PROTOCOL This,
IN CHAR16 *  String,
IN CHAR16 *  Pattern 
)

Performs a case-insensitive comparison of a Null-terminated pattern string and a Null-terminated string.

Parameters
ThisProtocol instance pointer.
StringA pointer to a Null-terminated string.
PatternA pointer to a Null-terminated pattern string.
Return values
TRUEPattern was found in String.
FALSEPattern was not found in String.

Definition at line 252 of file UnicodeCollationEng.c.

◆ EngStriColl()

INTN EFIAPI EngStriColl ( IN EFI_UNICODE_COLLATION_PROTOCOL This,
IN CHAR16 *  Str1,
IN CHAR16 *  Str2 
)

Performs a case-insensitive comparison of two Null-terminated strings.

Parameters
ThisProtocol instance pointer.
Str1A pointer to a Null-terminated string.
Str2A pointer to a Null-terminated string.
Return values
0Str1 is equivalent to Str2
>0 Str1 is lexically greater than Str2
<0 Str1 is lexically less than Str2

Definition at line 178 of file UnicodeCollationEng.c.

◆ EngStrLwr()

VOID EFIAPI EngStrLwr ( IN EFI_UNICODE_COLLATION_PROTOCOL This,
IN OUT CHAR16 *  Str 
)

Converts all the characters in a Null-terminated string to lower case characters.

Parameters
ThisProtocol instance pointer.
StrA pointer to a Null-terminated string.

Definition at line 206 of file UnicodeCollationEng.c.

◆ EngStrToFat()

BOOLEAN EFIAPI EngStrToFat ( IN EFI_UNICODE_COLLATION_PROTOCOL This,
IN CHAR16 *  String,
IN UINTN  FatSize,
OUT CHAR8 *  Fat 
)

Converts a Null-terminated string to legal characters in a FAT filename using an OEM character set.

Parameters
ThisProtocol instance pointer.
StringA pointer to a Null-terminated string. The string must be preallocated to hold FatSize characters.
FatSizeThe size of the string Fat in bytes.
FatA pointer to a Null-terminated string that contains an 8.3 file name using an OEM character set.
Return values
TRUEFat is a Long File Name
FALSEFat is an 8.3 file name

Definition at line 425 of file UnicodeCollationEng.c.

◆ EngStrUpr()

VOID EFIAPI EngStrUpr ( IN EFI_UNICODE_COLLATION_PROTOCOL This,
IN OUT CHAR16 *  Str 
)

Converts all the characters in a Null-terminated string to upper case characters.

Parameters
ThisProtocol instance pointer.
StrA pointer to a Null-terminated string.

Definition at line 227 of file UnicodeCollationEng.c.

◆ InitializeUnicodeCollationEng()

EFI_STATUS EFIAPI InitializeUnicodeCollationEng ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

The user Entry Point for English module.

This function initializes unicode character mapping and then installs Unicode Collation & Unicode Collation 2 Protocols based on the feature flags.

Parameters
ImageHandleThe firmware allocated handle for the EFI image.
SystemTableA pointer to the EFI System Table.
Return values
EFI_SUCCESSThe entry point is executed successfully.
otherSome error occurs when executing this entry point.

Definition at line 90 of file UnicodeCollationEng.c.

Variable Documentation

◆ mEngInfoMap

CHAR8 mEngInfoMap[MAP_TABLE_SIZE]

Definition at line 13 of file UnicodeCollationEng.c.

◆ mEngLowerMap

CHAR8 mEngLowerMap[MAP_TABLE_SIZE]

Definition at line 12 of file UnicodeCollationEng.c.

◆ mEngUpperMap

CHAR8 mEngUpperMap[MAP_TABLE_SIZE]

Definition at line 11 of file UnicodeCollationEng.c.

◆ mHandle

EFI_HANDLE mHandle = NULL

Handle for the Capsule Update Policy Protocol

Definition at line 47 of file UnicodeCollationEng.c.

◆ mOtherChars

CHAR8 mOtherChars[]

Definition at line 15 of file UnicodeCollationEng.c.

◆ Unicode2Eng

Initial value:
= {
"en"
}
BOOLEAN EFIAPI EngStrToFat(IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN CHAR16 *String, IN UINTN FatSize, OUT CHAR8 *Fat)
VOID EFIAPI EngStrLwr(IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN OUT CHAR16 *Str)
VOID EFIAPI EngFatToStr(IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN UINTN FatSize, IN CHAR8 *Fat, OUT CHAR16 *String)
VOID EFIAPI EngStrUpr(IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN OUT CHAR16 *Str)
BOOLEAN EFIAPI EngMetaiMatch(IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN CHAR16 *String, IN CHAR16 *Pattern)
INTN EFIAPI EngStriColl(IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN CHAR16 *Str1, IN CHAR16 *Str2)

Definition at line 65 of file UnicodeCollationEng.c.

◆ UnicodeEng