OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcUnicodeCollationEngInternal.h File Reference
#include <Uefi.h>
#include <Guid/GlobalVariable.h>
#include <Protocol/UnicodeCollation.h>
#include <Library/BaseLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/DebugLib.h>
#include <Library/OcMiscLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>

Go to the source code of this file.

Macros

#define CHAR_FAT_VALID   0x01
 
#define MAP_TABLE_SIZE   0x100
 
#define TO_UPPER(a)
 
#define TO_LOWER(a)
 

Functions

INTN EFIAPI EngStriColl (IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN CHAR16 *Str1, IN CHAR16 *Str2)
 
BOOLEAN EFIAPI EngMetaiMatch (IN EFI_UNICODE_COLLATION_PROTOCOL *This, IN CHAR16 *String, IN CHAR16 *Pattern)
 
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)
 
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)
 
VOID OcUnicodeCollationInitializeMappingTables (VOID)
 
VOID OcUnicodeCollationUpdatePlatformLanguage (VOID)
 

Variables

EFI_UNICODE_COLLATION_PROTOCOL gInternalUnicode2Eng
 

Detailed Description

Head file for Unicode Collation Protocol (English)

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

Definition in file OcUnicodeCollationEngInternal.h.

Macro Definition Documentation

◆ CHAR_FAT_VALID

#define CHAR_FAT_VALID   0x01

Definition at line 29 of file OcUnicodeCollationEngInternal.h.

◆ MAP_TABLE_SIZE

#define MAP_TABLE_SIZE   0x100

Definition at line 34 of file OcUnicodeCollationEngInternal.h.

◆ TO_LOWER

#define TO_LOWER ( a)
Value:
(CHAR16) ((a) <= 0xFF ? mEngLowerMap[a] : (a))
CHAR8 mEngLowerMap[MAP_TABLE_SIZE]

Definition at line 44 of file OcUnicodeCollationEngInternal.h.

◆ TO_UPPER

#define TO_UPPER ( a)
Value:
(CHAR16) ((a) <= 0xFF ? mEngUpperMap[a] : (a))
CHAR8 mEngUpperMap[MAP_TABLE_SIZE]

Definition at line 39 of file OcUnicodeCollationEngInternal.h.

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 408 of file OcUnicodeCollationEngCommon.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 272 of file OcUnicodeCollationEngCommon.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 198 of file OcUnicodeCollationEngCommon.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 226 of file OcUnicodeCollationEngCommon.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 445 of file OcUnicodeCollationEngCommon.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 247 of file OcUnicodeCollationEngCommon.c.

◆ OcUnicodeCollationInitializeMappingTables()

VOID OcUnicodeCollationInitializeMappingTables ( VOID )

Initializes mapping tables for the protocol.

Definition at line 153 of file OcUnicodeCollationEngCommon.c.

◆ OcUnicodeCollationUpdatePlatformLanguage()

VOID OcUnicodeCollationUpdatePlatformLanguage ( VOID )

Sets EFI_PLATFORM_LANG_VARIABLE_NAME when it is missing and ensures that our installed protocol supports the language obtained from the existing EFI_PLATFORM_LANG_VARIABLE_NAME.

Definition at line 66 of file OcUnicodeCollationEngCommon.c.

Variable Documentation

◆ gInternalUnicode2Eng

EFI_UNICODE_COLLATION_PROTOCOL gInternalUnicode2Eng
extern

Unicode collation instance.

Definition at line 55 of file OcUnicodeCollationEngCommon.c.